Repository navigation
Spec 014's checks: the holes the review of 20 Oct found - #575
Merged
Merged
Conversation
- boundaries.spec: the contract's table, row by row. Each shared module
imports only what its row names (answers may not import body); the
server never a family; the registry only the families; every other
module is a leaf and imports only leaves, so one reaching the registry,
a family or the service fails, a new module included; nothing in the
service imports the tools that read the list (diff, invalid-inputs).
The old rules passed all three of the review's cases (shown).
- check-baseline-totals: a module the base already counts may not rise,
whatever falls elsewhere -- moves create their modules -- so a rise
cannot hide behind a fall at an unchanged total (shown on a scratch
baseline).
- check-types and check-lint fail on a per-module fall not locked in, so
room left by typing cannot be spent later unseen.
- check-move: every name a moved declaration uses must be bound where it
now is as it was where it came from -- a receiving module's own
declaration of the name, or a global where the original had a
declaration or import, is `rebound` (shown on scratch moves; names the
moved code declares itself are not compared).
- registry.spec: the lookup backstop reads the AST of every module, and
sees a lookup however written (wrapped, destructured, findLast,
endpointFor('/...'), a for-of).
- invalid-inputs.spec: a URL counts for the endpoint that answers it (the
first match, as routing takes it), not any template it fits; a corpus
skipping /search/diagram/{diagram} now fails (it passed before).
- snapshot-files.spec: the domain snapshot's flag is the one value 'D'.
- contracts/checks.md says what the checks now report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The Endpoint, Handler, Answer and Request types move from registry.ts to endpoint.ts, a types-only leaf: families declare Endpoint[] and answers' cached returns a Handler, and neither may import the registry (a cycle). The boundary test rejected both; it now allows them, shown. T026 creates the registry proper. The contract, plan, research and tasks say so. - check-move compares the bindings of code that stays as well as code that moves: a caller left in service.ts pointed at another module's javaTrim in the same change is `rebound` (shown: 20 callers flagged; the same move done right, none). - check-baseline-totals: the split's own modules (shared, families, registry, server) may rise -- a later move may add a forgotten helper to one -- held by the total; every other existing module may not. - registry.spec's lookup backstop also sees a family's own list (dataQueryEndpoints), registry.endpoints, a constant path, a template with substitutions, and a partial path. - contracts/boundaries.md: leaves, and that shared modules and families may import them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-module loose check now fails on a fall not locked in (the commit before); service.ts had fallen from 1677 to 1529, and three modules of the tools with it, without the baseline following. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adamjohnwright
added a commit
that referenced
this pull request
Oct 20, 2026
After #575 the loose check held service.ts to its locked-in count, and this branch's outOfBounds calls had raised it (1529 -> 1539): javaSplit returned an untyped value. Typed, with fourParts (the first four parts, or Java's index failure in the order given) at the four sites, the count falls instead: loose 2769 -> 2709, implicit any 794 -> 789, both locked in. Answers on beta unchanged (flag and Solr capture sets identical). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Spec 014 (
specs/014-content-service-modules). From the review of everything merged since #485, and a review of this PR. These are the checks every move in the split relies on. Each hole below was shown passing before and failing now.boundaries.spec.ts: the contract's table, row by rowanswersmay not importbody.service.tsfails, a new module included. Nothing in the service imports the two tools that read the list.endpoint.ts. TheEndpoint,Handler,AnswerandRequesttypes move fromregistry.tsto a types-only leaf. Families declareEndpoint[]andcachedreturns aHandler, and neither may import the registry, since that would be a cycle. T026 creates the registry proper.check-move: every name used is bound as beforejavaTrimis flagged. So is a helper left behind that falls through to a global.service.tsthat is pointed at another module'sjavaTrimin the same change. Shown with 20 callers flagged; the same move done right flags none.check-baseline-totals: no rise in a module the base countsUnlocked falls fail.
check:typesandcheck:lintnow fail on a per-module fall that hasn't been locked in with--update, so room left by typing can't be spent later unseen. It found 159 loose values #570 typed away without the baseline following; they are locked in here (2928 → 2769).Smaller fixes:
registry.spec.ts: the lookup backstop reads the syntax tree of every module. It sees a lookup however it is written: wrapped, destructured, a family's own list,registry.endpoints, a constant or template path,endpointFor('/…'), or a for-of loop.invalid-inputs.spec.ts: a URL counts for the endpoint routing gives it, not for any template it happens to fit.snapshot-files.spec.ts: the domain snapshot's flag must be exactly'D'.contracts/boundaries.md,contracts/checks.md, plan, research and tasks say all of this.Checks
check-moveon this branch: 4 declarations moved (the types), 0 changed, 0 missing, 0 added, 0 rebound.🤖 Generated with Claude Code