refactor(review): rename byte-size, digest, and conformance-registry modules for the roles they play - #737
Merged
Merged
Conversation
`noteBounds.ts` measures a note's serialized *bytes*, but CLAUDE.md reserves "bounds" for one concrete visible extent, and the codebase honors that spatially everywhere else (`rowBounds`, `hunkBounds`, `selectedNoteBounds` in DiffPane, `VerticalBounds`). This was the one vocabulary break, and it collided greppably with the spatial note-card concept in the same feature area. Rename the module to `noteSize.ts` and `reviewNoteWithinBounds` to `reviewNoteWithinSizeLimit`; `MAX_REVIEW_NOTE_BYTES` and `reviewNoteByteLength` were already unambiguous and stay put. The conformance fixture file and its exports follow, along with the audit doc's references to the current code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
`src/app/review/digest.ts` called itself "the producer's hashing implementation", but the daemon (`src/session/broker/state.ts`) imports it too, which dragged a broker -> app-tier import edge across the codebase for three lines of Node hashing. `src/lib/` already holds tier-neutral primitives (`sourceText.ts`, `osPath.ts`, `terminalText.ts`), so the digest belongs there and its header now says what it is rather than who owns it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
`MAX_REVIEW_RESOURCE_CACHE_BYTES` and `MAX_REVIEW_DAEMON_CACHE_BYTES` are identical 64 MB budgets living in two tiers, and only the daemon's said which tier it belonged to — so the producer's read like the resource budget rather than one of two. Rename it to `MAX_REVIEW_PRODUCER_RESOURCE_BYTES` so the pair is greppable and each name states its own side. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
`test/review-conformance/` runs four peer registries — geometry, navigation, ordering, wire — and three are named for the question they answer. The first wore the harness's generic name (`REVIEW_CONFORMANCE_CONSUMERS`, `REVIEW_CONFORMANCE_FIXTURES`, `fixtures.ts`), so a future consumer would read it as "the" registry and join the wrong one. The doc comments already call them the geometry consumers; the code now says so too, types included (`ReviewGeometryConsumer`/`Fixture`/`Projection`). The `Conformance*` shapes stay as they are — they are shared harness vocabulary, not registry names. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
The header already sends a reader to `core/review/document.ts` for the document it publishes, but said nothing about where a generation's address and ordering rules live — so `generationOrder.ts` was reachable only by grep. One sentence, following the existing pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
Rename-only maintenance with no user-visible behavior change, so it should not appear in release notes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR consistently renames review modules, limits, fixtures, registries, and related documentation to clarify their roles without changing behavior.
Confidence Score: 5/5The PR appears safe to merge because the renames and module relocation are complete and preserve existing behavior. Repository-wide references, registry memberships, configuration coverage, and the relocated digest implementation remain consistent, with no concrete changed-code failure identified. Important Files Changed
Reviews (1): Last reviewed commit: "chore: add an empty changeset for the re..." | Re-trigger Greptile |
…eader autopsies (#739) Co-authored-by: Claude <noreply@anthropic.com>
benvinegar
pushed a commit
that referenced
this pull request
Aug 14, 2026
The dedup and rename PRs (#736, #737) landed while this branch was in review: the digest implementation moved to src/lib/reviewDigest, the broker's resource ceiling became core's reviewResourceCeiling, and the geometry conformance registry took its dimension name. Point the phase-4 modules at the new homes instead of re-declaring the old ones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018L6h5GBz6RAxRXbgUS4mx4
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.
Second cleanup PR from the post-merge Opus review (follows #736): naming fixes only, no logic changes.
Renames
core/review/noteBounds.ts→noteSize.ts,reviewNoteWithinBounds→reviewNoteWithinSizeLimit. The module measures serialized bytes, but CLAUDE.md reserves "bounds" for a concrete visible extent and the codebase honors that spatially everywhere (rowBounds,hunkBounds,selectedNoteBounds,VerticalBounds) — this was the one vocabulary break, sitting greppably next to the spatial note-card concept in the same feature area.MAX_REVIEW_NOTE_BYTESandreviewNoteByteLengthwere already unambiguous and keep their names. The conformance fixture file follows (ReviewNoteSizeFixture,REVIEW_NOTE_SIZE_FIXTURES, fixture fieldwithinSizeLimit).app/review/digest.ts→src/lib/reviewDigest.ts. Its header claimed "the producer's hashing implementation", but the daemon imports it too — the location made the broker carry an import edge into the app tier for three lines of Node hashing.src/lib/is the existing home for tier-neutral primitives; the header now says what it is: the Node implementation of the sharedReviewDigestFn, injected by whichever tier owns bytes.MAX_REVIEW_RESOURCE_CACHE_BYTES→MAX_REVIEW_PRODUCER_RESOURCE_BYTES. It andMAX_REVIEW_DAEMON_CACHE_BYTESare identical 64 MB budgets in two tiers; only the daemon's named its tier, so a contributor tuning "the cache" had a coin-flip.REVIEW_CONFORMANCE_CONSUMERS/FIXTURES→REVIEW_GEOMETRY_CONSUMERS/FIXTURES(filefixtures.ts→geometryFixtures.ts), with the geometry-specific types following (ReviewGeometryConsumeretc.). Four peer registries exist — geometry, navigation, ordering, wire — and three were named for what they cover while the first wore the harness's generic name, so a future consumer would join the wrong registry. Genuinely shared harness vocabulary (ConformanceGap,ConformanceLineAddress,ConformanceSelection) keeps its prefix.app/review/publication.tsheader gains one cross-reference: the addressing/ordering vocabulary lives incore/review/generationOrder.ts(matching its existing pointer atcore/review/document.ts).Doc references in
docs/browser-review-seam-audit.mdwere updated only where they'd now be wrong as instructions; historical narrative is untouched. No gate path-lists referenced the renamed files.Gates
bun run typecheckclean; conformance + core + app + session suites 725 pass / 0 fail after rebasing onto main (post-#736 squash);bun run lint0/0;bun run formatclean. Fullbun teston the pre-rebase branch matched its baseline (one PTY flake, passes in isolation; the two pre-existing@axe-core/playwrightwebsite errors). Empty changeset (maintenance).Generated by Claude Code