Repository navigation
docs(gotchas): give the second gotcha 41 its own number, and check for the next one - #785
Merged
Merged
Conversation
…r the next one CLAUDE.md has carried TWO entries numbered 41 since 2026-08-24: #535's histogram re-encode entry landed on 2026-08-23 and #538 gave the cf-garage TypeScript-config entry the same number the next day. Twenty-four references pointed at `gotcha 41` across twelve files. Three meant cf-garage and twenty-one meant the histograms, and no reader could tell which without reading both entries. RENUMBERED THE HISTOGRAMS ENTRY TO 46 rather than shifting 42-45 up by one. The shift would have rewritten every cross-reference in a 6000-line file to fix a collision between two of them, over a file whose own layout note warns that a path rewrite cannot be run blind. So the number moved and the position did not, and the list now reads 40, 41, 42, 43, 44, 45, 46-where-41-was. It was already out of order: 22 has sat above 21 since 2026-08-06. Each reference was resolved from its own sentence, never by pattern. The reference surface was wider than a grep of CLAUDE.md suggests: eighteen of the twenty-four live in ci.yml, derivations.json, infra.json, a contract test, two derive modules and five photo-pipeline files, and two of those were buried mid-line where a fixed-width context grep missed them on the first pass. ONE JUDGMENT CALL, flagged rather than buried. infra.json's token-probe note ("Gotcha 41's lesson through another door") fits both entries: the discriminator reading suits the histograms entry's self-agreeing check, and the misread-refusal reading suits cf-garage's "which door it comes through". Git dates settle nothing, since both entries predate it. It reads as cf-garage, on the refusal shape and the echoed word, and the reference now NAMES cf-garage so the next reader inherits a decision instead of the ambiguity. contract-gotcha-numbers-resolve asserts every number names one entry and every reference repo-wide resolves to one. UNIQUENESS ONLY, never order: this entry and the 21/22 pair both break order, and asserting it would invite renumbering the file to satisfy a test. Both assertions carry a floor, on the a-dict precedent, since a scanner that has stopped matching reports a clean pass over an empty list. Three controls, each failing by name: reintroduce the duplicate, reference a gotcha that does not exist, move the section anchor. The heading scan is anchored at the section header deliberately. CLAUDE.md opens with several ordinary numbered lists at column 0, and a whole-document scan reads those as gotchas 1, 2 and 3 and reports duplicates that are not there. No served bytes move: a build here and a build from a detached worktree at HEAD produce all 1829 files byte-for-byte identical.
Contributor
Wire-size diff vs merge base
Brotli q11, the quality the edge serves. Every number here is deterministic: Client assetsNo change. 25 files, 86.83 KiB Brotli total. PagesNo change. 55 files, 578.04 KiB Brotli total. Worker bundleNo change. 243.60 KiB gzip. Dictionary transportFamily dictionary acquisition: no change, 14.41 KiB q11.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
aadhar-sh | 641d3af | Sep 10 2026, 07:06 PM |
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.
CLAUDE.md has carried two entries numbered 41 since 2026-08-24. #535's histogram re-encode entry landed on 2026-08-23, and #538 gave the cf-garage TypeScript-config entry the same number the next day. Twenty-four references pointed at
gotcha 41across twelve files: three meant cf-garage and twenty-one meant the histograms, and no reader could tell which without opening both entries and deciding from the sentence.Pre-existing, unrelated to #783, which is where I found it.
The number moved, the position did not
The histograms entry is 46. Renumbering it to 42 would have collided, and shifting 42 through 45 up by one would have rewritten every cross-reference in a 6000-line file to fix a clash between two of them, over a file whose own layout note warns that a path rewrite cannot be run blind. So the list now reads 40, 41, 42, 43, 44, 45, 46-where-41-was. It was already out of order: 22 has sat above 21 since 2026-08-06.
The entry carries a paragraph explaining its own number, so a reader hitting 46 between 40 and 42 gets the reason without going to git.
The reference surface was wider than a grep of CLAUDE.md suggests
Eighteen of the twenty-four live outside it, in
ci.yml,derivations.json,infra.json, a contract test, twotools/libderive modules and five photo-pipeline files.AGENTS.mdis a symlink toCLAUDE.md, so those are one file.Two were buried mid-line where a fixed-width context grep missed them on the first pass, and both are real:
config/derivations.json:303— "the exact script whose standalone use caused gotcha 41"tools/photos/zenc-reproducible.ts:133— "Suspect the INPUT bytes instead (CLAUDE.md gotcha 41)"Every reference was resolved from its own sentence, never by pattern. No
s/gotcha 41/gotcha 46/gwas run anywhere.One judgment call, flagged rather than buried
config/infra.json:329read "Gotcha 41's lesson through another door" and fits both entries. The discriminator framing (a well-formed fake is the only probe that reaches the auth path) suits the histograms entry's self-agreeing check; the misread-refusal framing suits cf-garage's "which door it comes through". Git dates settle nothing, since both entries predate the line, and the commit that added it never names a gotcha.I read it as cf-garage, on the refusal shape and the echoed word, and the reference now names cf-garage explicitly. Leaving it bare was not the neutral option: with 41 unique again, a bare 41 resolves silently either way, so the choice was going to be made regardless. Naming it makes the decision greppable and challengeable. Overrule it by editing three lines in
infra.json.The check
tools/contract-gotcha-numbers-resolve.test.mjs, two assertions:gotcha Nreference in the repository resolves to an entry, which catches a deleted entry rather than a duplicated one. That is the quieter failure: it reads as a pointer right up until somebody follows it.Uniqueness only, never order. This entry and the 21/22 pair both break order, and asserting it would invite renumbering the file to satisfy a test, which is the change the check exists to make unnecessary.
Both assertions carry a floor, on the a-dict precedent: a scanner that has quietly stopped matching reports a clean pass over an empty list, and an empty list is trivially unique.
The heading scan is anchored at the section header deliberately. CLAUDE.md opens with several ordinary numbered lists at column 0 (the two homepage fragments, the converter's two rules, the three MCP deviations), and a whole-document scan reads those as gotchas 1, 2 and 3 and reports duplicates that are not there.
Three controls, each failing by name:
gotcha numbers used more than once: 41gotcha 99references to gotchas that do not exist: 99CLAUDE.md no longer carries the gotchas section headerValidation
bun run lintclean,bun run typecheckclean (matches the baseline; all 328 files held by one of 10 programs),bun run test681 pass / 0 fail.Two things caught on the way: the type ratchet flagged a possible-null
h.match(...)[1]in the new test, fixed rather than baselined; and my own comment carried the "not X, it is Y" negation, which a line wrap had hidden from the grep that should have caught it.