feat(atlas): release-truth doctor + error-atlas acceptance harness + loader hardening#5
Merged
Conversation
…loader hardening Dogfood of T2Helix v0.10.0 against its own repo. Three threads: LOADER HARDENING (lib/atlas.js, scripts/import-atlas.js) - Isolate per-record failures in importAtlas(): a thrown record() (e.g. content over the 100KB MAX_CONTENT_BYTES cap) is now counted as `dropped` (fingerprint only, no content leak) instead of aborting the whole batch and stranding the valid entries after it. Found by dogfood: a single 300KB line previously killed the entire load. Restores the "load the valid subset, report the rest" contract. - detectConflicts(): same-pattern / different-resolution entries are SURFACED (importAtlas() returns `conflicts`; the CLI warns on stderr) instead of silently buried. Both still load (append-only — an error can have >1 valid fix); the resolution text is never exposed (secret-bearing field), only pattern + fps. ACCEPTANCE MATRIX (test/atlas-acceptance.js, +15 tests) - Explicit 12-case matrix: valid minimal / dense-with-extra-fields / duplicate same-resolution / duplicate CONFLICTING-resolution / missing pattern / missing resolution / non-string pattern / non-string resolution / huge-entry-does-not- abort-the-batch / malformed JSON / empty-array+empty-file / mixed valid+invalid, plus two CLI end-to-end cases (huge→exit 1 partial, conflict→exit 0 + stderr). RELEASE-TRUTH DOCTOR (scripts/release-doctor.js, npm run release:doctor) - Verifies README/docs prose against machine sources: package↔CHANGELOG version, README version currency, tool count (static TOOLS-registry parse — not a server spawn, which can truncate a one-shot tools/list on stdin-close), hook count, test count (live or non-brittle), Node range vs engines, atlas-documented, manifest-version. Exit nonzero on any drift. Caught: stale "203 tests total", README changelog lagging 6 versions, manifest has no version field. DOC TRUTH (README.md, package.json) - Reworded the brittle hardcoded test count, fixed the npm-test suite list, added a "Current release: v0.10.0 → CHANGELOG" pointer. release:doctor now STATUS:TRUE. Suite 268 green (was 253). No existing behavior changed; all additions backward compatible (the importAtlas return-shape addition is non-breaking). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
templetwo
pushed a commit
that referenced
this pull request
Jun 17, 2026
…ce harness Patch release for the hardening/verification merged in #5 (no behavior change): - lib/atlas.js: oversized entry isolated as a dropped row, no longer aborts the batch - lib/atlas.js: detectConflicts() surfaces divergent-resolution duplicates - scripts/release-doctor.js + npm run release:doctor - test/atlas-acceptance.js (15-case matrix) - README release-truth corrections Validated by the new doctor: release:doctor STATUS:TRUE (version 0.10.1 consistent across package.json / CHANGELOG / README). Suite 268 green. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Dogfood of T2Helix v0.10.0 against its own repo. The mission premise held: the README lagged the implementation, and probing the atlas loader surfaced a real robustness bug. Both are now fixed, detectable, and locked by tests.
What changed
Loader hardening (
lib/atlas.js,scripts/import-atlas.js)importAtlas()now wrapsrecord()per-entry: a throw (e.g. content over the 100KBMAX_CONTENT_BYTEScap) is counted as adroppedrow (fingerprint only, no content leak) instead of aborting the whole batch. Found by dogfood — a single 300KB line previously killed the entire load and stranded every valid entry after it. Restores the loader's "load the valid subset, report the rest" contract.detectConflicts()+ aconflictsfield on the return: same-pattern / different-resolution entries are surfaced (CLI warns on stderr) instead of silently buried. Both still load (append-only — an error can have more than one valid fix); the resolution text is never exposed (secret-bearing), only pattern + fingerprints.Acceptance matrix (
test/atlas-acceptance.js, +15 tests)Release-truth doctor (
scripts/release-doctor.js,npm run release:doctor)TOOLS-registry parse — not a server spawn, which can truncate a one-shottools/liston stdin-close), hook count, test count (live or non-brittle), Node range vsengines, atlas-documented, manifest-version. Exits nonzero on drift. First run caught: stale "203 tests total", README changelog lagging 6 versions, manifest has no version field.Doc truth (
README.md,package.json)npm testsuite list, added a "Current release: v0.10.0 → CHANGELOG" pointer.release:doctornow reportsSTATUS: TRUE.Receipts
npm test— 268 passed, 0 failed (was 253; +15 acceptance). No existing behavior changed; theimportAtlasreturn-shape addition is non-breaking (existing 18 import-atlas tests untouched).npm run release:doctor—STATUS: TRUE, exit 0.Open follow-up (not in this PR)
Give
.claude-plugin/plugin.jsonaversionfield synced frompackage.json— the first concrete surface of "should there be a single machine-readable release-truth source?", and it upgrades the doctor's manifest↔package check from informational to a hard cross-check.🤖 Generated with Claude Code