Skip to content

fix(facts-lock): 0 frozen facts reads PENDING, not "agree with all 0" (#519) - #549

Merged
MendixMau merged 2 commits into
masterfrom
claude/loving-gates-hauc1n-519
Oct 22, 2026
Merged

MendixMau merged 2 commits into
masterfrom
claude/loving-gates-hauc1n-519

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Part of #519: the empty-lock half only (issue's expected point 2 / suggested fix 2). Harvesting name keys (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 (KEYED reads only operationid/entity/page-style keys) combined with the check summary at :249-256: a corpus whose identifiers sit only under name keys (domainEntities[].name, pages[].name) froze an empty lock, and check printed facts-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, check prints PENDING 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 prints PENDING ... run build first; check compared nothing. build prints 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.

Row Answer
Process none (nothing new blocks; exit codes unchanged)
Dependencies bin/facts-lock.sh only. No script parses its output (grep of bin/, project-bin/, skills for "agree with all": no hits outside this script and its fixture).
Context cost none: no routed or always-loaded file touched. render-routing.sh --check: Baseline 73828 words before and after (budget 80000).
Behaviour n/a: scripts only
Runtime n/a

Fixture evidence (tests/wave2/test-facts-lock.sh, new block "0 facts is not agreement"): the issue's two-file name-keyed repro (check says PENDING, not agree; build says the lock is empty) plus an entity-keyed BRD with no lock built (check says run build first).

  • master: PASS=16 FAIL=3 (facts-lock: 2 BRD(s) agree with all 0 frozen fact(s))
  • this branch: 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.

  • No client data anywhere in the diff
  • Size cap
  • Test tier: T1 (scoped fixture above)
  • CHANGELOG.md line appended, crediting AlvinnYeo

Review: MERGE-AFTER-FIX (independent review: sound; "Fixes" changed to "Part of")


Generated by Claude Code

…#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
@MendixMau
MendixMau merged commit c0dad40 into master Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants