Repository navigation
fix(conformance): fail on a CONFORMANCE_REPO override that points nowhere - #142
Merged
chrisuthe merged 3 commits intoOct 7, 2026
Conversation
…here A CONFORMANCE_REPO_<NAME> override naming a path that does not exist was skipped, and resolution fell through to repos/<name>. The run then audited a different checkout than the one asked for, with nothing in the output saying so. A set override is now the only candidate for its repository, and resolving one that does not exist raises RepoOverrideError naming the variable and the path. run_all.py, setup_workspace.py and the build and run commands check every override before doing any work, so the error arrives at startup rather than partway through a matrix.
There was a problem hiding this comment.
🟡 Changes recommended
Unknown-user tilde paths bypass the new error handling and produce a traceback.
2 open findings
What changed in this PR
Makes repository overrides authoritative and fails early when they reference invalid paths.
Changes:
- Adds override validation and aggregated errors.
- Validates overrides at build, run, and workspace startup.
- Documents behavior and adds tests.
| File | Description |
|---|---|
README.md |
Documents repository overrides. |
src/conformance/paths.py |
Validates and resolves override paths. |
src/conformance/implementations.py |
Aggregates invalid overrides. |
src/conformance/cli.py |
Validates before build or run. |
scripts/setup_workspace.py |
Validates before workspace setup. |
scripts/run_all.py |
Validates before full execution. |
tests/test_repo_override.py |
Tests override resolution and failure behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chrisuthe
marked this pull request as ready for review
October 7, 2026 16:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What
A
CONFORMANCE_REPO_<NAME>override that points at a path which does not exist now stops the run with an error naming the variable and the path. Before, it was skipped and resolution fell through torepos/<name>, so the run audited a different checkout than the one asked for and nothing in the output said so.This is the half #125 left alone: that PR fixed the test that tripped over the fallthrough and deliberately did not change resolution.
Behaviour
repos/specexists in all three cases.CONFORMANCE_REPO_SPEC935b5ae)/nonexistent/spec)repos/spec, silentlyRepoOverrideError: CONFORMANCE_REPO_SPEC=/nonexistent/spec points at /nonexistent/spec, which does not existrepos/specrepos/specObserved before, with the override set to a nonexistent path:
After, at each entry point:
conformance buildandscripts/setup_workspace.pystop the same way.Where the error is raised, and why
Two places, on purpose.
In the resolver (
paths.repo_override_path, used bycandidate_repo_paths). A set override is now the only candidate for its repository, so no caller can fall through. The error is a newRepoOverrideErrorthat is not aFileNotFoundError: the build steps catchFileNotFoundErrorfromensure_repo_checkoutand turn it into an ordinaryfailedbuild row, after which the matrix carries on. A bad override reported that way would be one more red row in a 20-minute run rather than a stop.At startup (
validate_repo_overrides()), as the first thingscripts/run_all.py,scripts/setup_workspace.pyandconformance build/conformance rundo. Without this the error would first surface wherever a repository happens to be resolved: partway through the build, or once per case inside an adapter subprocess. It checks every known repository and reports all bad overrides in one message, before anything is built and beforerun_matrixclears the results directory.conformance reportdoes not check, because it resolves no checkout.scripts/setup_repositories.pyis unchanged: it never reads the override and clones into--repos-diras before.One deliberate tightening: overrides must be absolute
A relative override is now rejected (
CONFORMANCE_REPO_AIOSENDSPIN=./aiosendspin is not an absolute path). Adapters run with the repository root as their working directory and re-resolve the inherited variable, so a relative path that passes the startup check from another directory names a different directory inside every adapter. Today that is the same silent fallthrough; with only the nonexistent-path check it would have become a per-case failure mid-run.~is still expanded.This is the one case that worked before and no longer does: a relative override used from the repository root. Say if you would rather keep it.
Unchanged
repos/<name>then the sibling directory, first existing wins. Unpinned clones are untouched.scripts/detect_regressions.pyis not touched. NoScenarioSpecchange, so noscenario_revisionbump.Verification
python -m unittest discover -s tests: 309 pass. Newtests/test_repo_override.pycovers unset, empty, valid, nonexistent, relative, several bad at once, a build step not downgrading the error, and the CLI stopping before build or run.conformance run --from aiosendspin --to aiosendspin --jobs 1, no override, on935b5aeand on this branch against the same fresh clones (aiosendspin90cecf2, sendspin-cli2a1dbbe, spec671a34d): 11 passed, 2 failed on both, identical per case. Both failures are the client's declared lack of OPUS and legacy-unencrypted support.CONFORMANCE_REPO_AIOSENDSPINset to an absolute copy of the checkout: 11 passed, 2 failed, same cases.conformance reportrenders, andrepositories.jsonrecords the spec and aiosendspin revisions.Earlier runs of the comparison showed one to three extra
address already in usefailures on either side. Another checkout on the same machine was running a matrix on the same fixed ports at the time; the runs quoted above had none.Not in this PR
Found while tracing the consumers, and left out to keep this to one change:
ensure_repo_checkout()returnsrepos/<name>whenever it exists, even when a valid override resolved somewhere else, and the Rust, Swift, JVM, C++ and Go adapters referencerepos/<name>by relative path. WithCONFORMANCE_REPO_SENDSPIN_RSset to an existing directory and a realrepos/sendspin-rspresent,resolve_repo_pathreturns the override andensure_repo_checkoutreturnsrepos/sendspin-rs, so the build uses one checkout whilerepositories.jsonreports the other's revision. The fix needs a decision (reject the combination, or make those adapters honour the override).CONFORMANCE_REPO_AIOSENSPINmatches no repository and has no effect.repositories.jsonplus site normalisation and rendering, and until (1) is fixed the flag would be wrong for the native adapters.