fix(ufs): parity derives its runtimes instead of naming directories - #20
Merged
Conversation
The cross-runtime ERR_* check globbed `src/*.zig`, `agentsfleet/src/*.{js,jsx,
ts,tsx}` and `ui/packages/*/src/*.ts{,x}` — one repository's directory names
inside a gate every repository receives. `agentsfleet/src/` stopped existing,
so the JavaScript half matched ZERO files and "every client ERR_* has a Zig
twin" passed by scanning nothing. Three real codes in `cli/src/` went
uncompared for as long as it took someone to read the glob.
That is this audit's own failure mode: a check aimed at a path that resolves to
nothing reports green over what it never opened. Swapping in `cli/src/` would
have moved the landmine, not removed it. So the scan now reads `*.zig` as the
source of truth and every other in-scope runtime file as the client side,
anywhere in the tree. A runtime-derived glob has no directory left to go stale.
Two things fall out of doing it properly.
Where a repository ships no Zig there is no source of truth, so the check
prints that it skipped. Without that branch, fixing the globs would have turned
every error code in a single-runtime repository into an orphan on the next
`orly update` — a worse bug than the one being fixed.
Test exclusion is directory-shaped now (`test/`, `tests/`, `__tests__/`,
`fixtures/`), not `.test.` infix alone. `cli/test/acceptance/fixtures/install-
negatives-ops.ts` declares two codes that are INPUTS to a negative test; an
infix filter walked past it and would have graded both as production orphans.
`evals/dispatch/parity.sh` holds the whole thing down, and every case asserts
what the check FOUND rather than its exit code — a vacuous pass and a real pass
are the same status, which is precisely why nobody noticed. Run against the
previous implementation, 2 of the 5 fail, and the first failure reads "OK: no
violations" with an orphan sitting in the tree.
Measured: agentsfleet byte-identical (its three real codes now compared, all
present); cache-kit.rs and extended-ceph-exporter gain only the skip line.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Follow-up to #19, which found this while fixing the scope hole and deliberately left it out.
The bug
The cross-runtime
ERR_*parity check globbed three fixed directories. One of them stopped existing:So "every client
ERR_*must have a Zig twin" passed by scanning nothing. Three real codes incli/src/—ERR_UNAUTHORIZED,ERR_WORKSPACE_NAME_EXISTS,ERR_CLI_CREDENTIAL_EXCHANGE_FAILED— went uncompared for as long as it took someone to read the glob.That is this audit's own failure mode, and one repository's directory names sitting inside a gate every repository receives.
Swapping the path would move the landmine, not remove it
agentsfleet/src/→cli/src/is the same bug waiting for the next reorg. The scan now reads*.zigas the source of truth and every other in-scope runtime file as the client side, anywhere in the tree. A runtime-derived glob has no directory left to go stale.Two things fall out of doing it properly:
No Zig means skipped, with a reason. Without that branch, fixing the globs would turn every error code in a single-runtime repository into an orphan on the next
orly update— a worse bug than the one being fixed.Test exclusion is directory-shaped (
test/,tests/,__tests__/,fixtures/), not.test.infix alone.cli/test/acceptance/fixtures/install-negatives-ops.tsdeclares two codes that are inputs to a negative test; an infix filter walked past it and would have graded both as production orphans.The eval asserts what was FOUND, not the exit code
A vacuous pass and a real pass are the same status — precisely why nobody noticed.
evals/dispatch/parity.shchecks the output text of five cases. Against the previous implementation:Against this branch: 5 passed, 0 failed. Wired into
make auditand available asmake dispatch-parity-evals.Measured — no behaviour change for anyone
string-dupcounts unchanged from #19: 30 / 16 / 0.Also
Verification
make auditgreen (69 PASS, exit 0) · dispatch-evals 17/17 · parity-evals 5/5 · install-evals 23/23 · coverage check (h) green.🤖 Generated with Claude Code