Repository navigation
fix(facts-lock): 0 frozen facts reads PENDING, not "agree with all 0" (#519) - #549
Merged
Merged
Conversation
…#519) A corpus whose identifiers sit only under keys the harvest does not read froze an empty lock, and check printed "N BRD(s) agree with all 0 frozen fact(s)", which reads as a pass over a comparison that never happened. With 0 frozen facts, check and build now print a PENDING line naming why (no identifiers under any known key, or no lock built yet). Exit codes are unchanged; name-key harvesting is not part of this change. Fixture: test-facts-lock.sh (3 FAIL on master; 19/19 with the fix). Fixes #519 (the safe half; see PR) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…eep both sides) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
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.
Part of #519: the empty-lock half only (issue's expected point 2 / suggested fix 2). Harvesting
namekeys (expected point 1 / fix 1) is deliberately not in this PR, and #519 stays open for it.Direct lane
What changed and why (one paragraph): Root cause
bin/facts-lock.sh:91-95(KEYEDreads onlyoperationid/entity/page-style keys) combined with thechecksummary at:249-256: a corpus whose identifiers sit only undernamekeys (domainEntities[].name,pages[].name) froze an empty lock, andcheckprintedfacts-lock: N BRD(s) agree with all 0 frozen fact(s), exit 0, which reads as a pass over a comparison that never happened. Fix: when 0 facts are frozen and there are no deviations/conflicts,checkprintsPENDING facts-lock: 0 identifiers found under any known key in N BRD(s): the lock is empty and check proves nothing (keys read: ...); if identifiers were found but no lock was built, it printsPENDING ... run build first; check compared nothing.buildprints the same empty-lock line when it froze 0 facts and found no conflicts. Exit codes are unchanged (no gate or caller flips); an exit 3 "nothing measured" is a possible follow-up.bin/facts-lock.shonly. No script parses its output (grep ofbin/,project-bin/, skills for "agree with all": no hits outside this script and its fixture).render-routing.sh --check: Baseline 73828 words before and after (budget 80000).Fixture evidence (
tests/wave2/test-facts-lock.sh, new block "0 facts is not agreement"): the issue's two-filename-keyed repro (check says PENDING, not agree; build says the lock is empty) plus anentity-keyed BRD with no lock built (check says run build first).PASS=16 FAIL=3(facts-lock: 2 BRD(s) agree with all 0 frozen fact(s))PASS=19 FAIL=0(all 16 existing assertions unchanged)Field evidence: reporter's run during a parallel-BRD freeze on a field project (AlvinnYeo, #519):
8 BRD(s) agree with all 0 frozen fact(s). Not re-run on that project here.Regression notes: after sync, a project with an empty lock sees a PENDING line instead of the "agree" line; a project with frozen facts sees no change. Exit codes, the lock file format and conflict/deviation output are unchanged. Paths untouched, both layouts unaffected.
CHANGELOG.mdline appended, crediting AlvinnYeoReview: MERGE-AFTER-FIX (independent review: sound; "Fixes" changed to "Part of")
Generated by Claude Code