Repository navigation
chore: give CONTRIBUTING.md a consumer (TRA-1219) - #624
Merged
Merged
Conversation
TRA-1219 item 3. Items 1 and 2 fixed the file; nothing stopped it rotting
again. It rotted in the first place because no gate, no session and no CI
read it -- platform's README stayed correct while CONTRIBUTING.md three
directories away did not. Same repo, same vintage, different consumers.
Checks two claims, both chosen because they are the ones that actually
broke and because neither can fire on a correct file:
1. every `just` recipe the doc names still exists, root and workspace
2. every repo path it names is TRACKED
Tracked, not merely present. `existsSync` passes on a file that exists
only on the author's machine, which is a false green for exactly the
audience a contributor guide is written for. `.env` and `.env.local` are
named in the doc, exist locally and are correctly absent from a fresh
clone; the tracked test handles them without a skip list.
Hung off `lint` rather than given its own job, so it runs inside the
existing `lint-test` required check instead of adding a context the
main-branch-protection ruleset would have to be taught -- same reasoning
as the changelog gate.
Deliberately NOT checked: pnpm script names. The root package.json has no
scripts, so that rule would have nothing to catch here. A rule with
nothing to catch is unexercised surface that breaks unnoticed.
The path rule requires the first segment to be a real top-level entry.
trakrf/docs rejected that rule for its repo and was right to: it has no
vocabulary that needs it. Platform does -- `/api/v1/`, `ghcr.io/...`,
`${assetId}`, and a frontend-relative `services/` all appear in this file
and must be skipped. The rule set belongs to the repo, not to the idea.
Verified by deliberate breakage, because a check that has not been shown
to fail has not been shown to work. Five injected faults, five caught:
the original `backend/.env.example` bug, a dead root recipe, a dead
workspace recipe, a moved path, and a file present locally but untracked.
Two bugs found that way, both of which would have shipped a check that
passed on the bug it was built for:
- `.example` was outside the extension whitelist, so the historical
`cp backend/.env.example` fault was invisible on the first run
- the no-workspace case emitted a leading empty field, and `read` strips
leading IFS whitespace -- with either a space or a tab delimiter the
recipe name landed in $ws and $name came back empty, which the -z
guard then skipped. Every single-word recipe was silently unchecked
while the workspace form kept working. Now an explicit "-" sentinel.
`just validate` green.
Refs: TRA-1219
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7p2hFrE6ZFWS91XvyFQcV
Contributor
|
🚀 Preview Deployment Update ✅ This PR has been successfully merged into the preview branch. The preview environment will update shortly at: https://app.preview.trakrf.id |
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.
Closes platform's share of TRA-1219 item 3 — the last of the four repos. Items 1 and 2 fixed the file in #623; nothing stopped it rotting again.
It rotted because no gate, no session and no CI read it. Platform's
README.mdstayed correct whileCONTRIBUTING.mdthree directories away did not: same repo, same vintage, different consumers. This is the consumer.What it checks
Two claims, both chosen because they are the ones that actually broke and because neither can fire on a correct file:
justrecipe the doc names still exists — root and workspace forms both.Tracked, not merely present.
existsSyncpasses on a file that exists only on the author's machine, which is a false green for precisely the audience a contributor guide is written for..envand.env.localare named in the doc, exist locally, and are correctly absent from a fresh clone — the tracked test handles them with no skip list.Verified by deliberate breakage
A check that has not been shown to fail has not been shown to work. Five injected faults, five caught:
cp backend/.env.examplebugjust bootstrap-everything)just backend migrate-checksum)backend/api/routes.go)That process found two bugs, either of which would have shipped a check that passed on the exact fault it was built for:
.examplewas outside the extension whitelist, so the historicalbackend/.env.examplefault was invisible on the first run.readstrips leading IFS whitespace — so with either a space or a tab delimiter the recipe name landed in$wsand$namecame back empty, which the-zguard then skipped. Every single-word recipe was silently unchecked while the workspace form kept working, which is why one break test fired and the other didn't. Now an explicit-sentinel.Two deliberate omissions
pnpm script names are not checked. The root
package.jsonhas no scripts, so that rule would have nothing to catch here — and a rule with nothing to catch is unexercised surface that breaks unnoticed.The path rule requires the first segment to be a real top-level entry. trakrf/docs rejected that rule for its repo and was right to; it has no vocabulary needing it. Platform does —
/api/v1/,ghcr.io/trakrf/backend:sha-<short>,${assetId}and a frontend-relativeservices/all appear in this file and must be skipped. The rule set belongs to the repo, not to the idea, and all three repos ended up with genuinely different ones.Wiring
Hung off
lintrather than given its own job, so it runs inside the existinglint-testrequired check instead of adding a context the main-branch-protection ruleset would have to be taught. Same reasoning as the changelog gate, andjust validatepicks it up locally for free.just validate— exit 0.Refs: TRA-1219
🤖 Generated with Claude Code
https://claude.ai/code/session_01W7p2hFrE6ZFWS91XvyFQcV