Repository navigation
facts-lock.sh harvests no identifiers from BRDs that use name keys, then check reports "agree with all 0 frozen fact(s)" #519
Description
File: bin/facts-lock.sh lines 91-95 (KEYED), 100-116 (walk), 249-256 (check summary) · Toolkit: eec646e · Found: 21 Oct 2026, while running the parallel-BRD freeze step
Summary
facts-lock.sh build freezes an identifier only when it sits under one of these keys (lowercased):
operationid, operationids, operation, entity, entityname, targetentity, aggregate, page, pagename,
pageid (plus *_CODE_SET tokens anywhere). BRDs whose arrays of objects carry the identifier as name
(domainEntities[].name, microflows[].name, pages[].name) give it nothing to harvest. The lock is written with
"facts": {}, and check then prints:
facts-lock: 8 BRD(s) agree with all 0 frozen fact(s)
exit 0
That reads as a pass. Nothing was compared. A later BRD that respells an entity, page or microflow will not be caught,
which is the job the script exists for (its header: N agents re-deriving the same identifiers).
The toolkit disagrees with itself on the key
tests/wave2/test-facts-lock.sh:45,50fixtures usedomainEntities[].entity.bin/coverage-check.sh:172documents pointer cells as/domainEntities/0/name, and enumerates leaves that way
(:220-222).
So a BRD that satisfies coverage-check.sh can be invisible to facts-lock.sh.
Reproduce
mkdir -p P/analysis/x/knowledge-base/brd
echo '{"id":"F001","domainEntities":[{"name":"PaymentPlan"}],"pages":[{"name":"PaymentPlan_Overview"}]}' > P/analysis/x/knowledge-base/brd/F001-a.brd.json
echo '{"id":"F002","domainEntities":[{"name":"Paymentplan"}],"pages":[{"name":"PaymentPlan_Overview"}]}' > P/analysis/x/knowledge-base/brd/F002-b.brd.json
bin/facts-lock.sh P build
facts-lock: 0 fact(s) frozen across 0 namespace(s), from 2 BRD(s) exit 0
bin/facts-lock.sh P check
facts-lock: 2 BRD(s) agree with all 0 frozen fact(s) exit 0
Same two files with every "name" key renamed to "entity" (run in a second scratch folder):
bin/facts-lock.sh Q build
facts-lock: 1 fact(s) frozen across 1 namespace(s), from 2 BRD(s)
CONFLICT entities/paymentplan — 2 spellings, nothing frozen:
PaymentPlan F001-a.brd.json
Paymentplan F002-b.brd.json exit 1
Same content, same disagreement; only the key name differs. (Run 21 Oct 2026 in $TMPDIR, toolkit eec646e.)
Expected
- Names under
nameinside the BRD's identifier-bearing arrays are harvested, into a namespace named for the array
(entitiesfordomainEntities,pagesforpages,microflowsformicroflows,operationsfor
integrations). - A build or check that freezes or compares 0 facts over N > 0 BRDs is not reported as agreement. Say
"0 identifiers found under any known key in N BRD(s): the lock is empty and check proves nothing", and exit
non-zero (or 3, "nothing measured"), so a gate cannot count it as green.
Suggested fix (ranked)
- In
walk(), carry the parent array's key: when the current key isnameand the parent is one of
domainEntities,entities,pages,microflows,nanoflows,integrations, harvest it into that
namespace. Keeps the "identifiers only, no prose" rule: stilllen <= 80and no spaces. - Add the empty-lock guard to
buildandcheck(expected point 2). - Add a fixture with
name-keyed BRDs totest-facts-lock.sh, and one asserting that an empty harvest is not "agree".
How to retest
The two-file repro above: expect CONFLICT entities/paymentplan after the fix, and an empty-lock warning (not
"agree") on any corpus where nothing was harvested.
Activity
fix(facts-lock): 0 frozen facts reads PENDING, not "agree with all 0" (…
Bug sweep 2026-10-26: gates, runners, doctor, lint receipt, git hooks…
MendixMau commentedon Oct 26, 2026
Shipped in #578 (squash a088b4e) as warn-only, the maintainer's earlier lean: name-keyed identifiers are listed as WARN lines, never frozen, and exit codes are unchanged. Promoting them to frozen facts / CONFLICT is on the roadmap: #579.
Generated by Claude Code