Skip to content

fix(projection): stamp entity docs against a canonical body digest - #106

Merged
Ancienttwo merged 1 commit into
mainfrom
fix/projection-canonical-body-digest
Aug 15, 2026
Merged

fix(projection): stamp entity docs against a canonical body digest#106
Ancienttwo merged 1 commit into
mainfrom
fix/projection-canonical-body-digest

Conversation

@Ancienttwo

Copy link
Copy Markdown
Owner
  • Follow-up to fix(projection): scope entity stamp digest per node #105 (same 0.4.3, not yet shipped in the archctx main package).
  • Problem: the 0.4.3 node-scoped key {scale signal, proof digest} was not a complete body predicate — renderEntitySummary also renders status/summary/localContracts/entrypoints/relations, absent from both the semantic compilation and the footprint measurement. A model-level status flip rewrote the body while reusing the old stamp; once the new body landed, drift went clean — a permanently silent false verifiedAgainst.
  • Fix: per-node key = digestJson of the entity body rendered with a fixed placeholder stamp. Total function of every body input except the stamp; future body inputs covered by construction. Sticky decision logic untouched.
  • Evidence: independent end-to-end scenario (status flip → restamp → re-land → fixed point): main shows the false stamp going silent from run 3; this branch restamps at run 2 and holds the honest stamp. Regression tests cover status/summary/localContracts flips. bun test 1233 pass / 0 fail; tsc --noEmit clean; read-only docs plan smoke confirms one-time entity digest reshape with non-entity bodies byte-identical to main.
  • Not changed: renderer stays v3 (never shipped), versions stay 0.4.3, evidence/catalog digests unaffected.
  • Out of scope: ARCHCTX_FEATURES token naming; repo-internal docs re-projection (one-time re-render after upgrade).

The node-scoped key introduced for 0.4.3 ({scale signal, semantic
proof}) was not a complete "body would be byte-identical" predicate:
renderEntitySummary also prints node status, summary, localContracts,
entrypoints, and relations, none of which enter the semantic
compilation. A model-level status flip rewrote the body while the
stamp was reused, and once the new body landed the marker outputDigest
matched, so drift went clean — a permanently silent false stamp.

Hash the entity body rendered with a fixed placeholder stamp
(CANONICAL_STICKY_STAMP) instead. The digest is a total function of
every body input except the stamp itself, so future body inputs are
covered by construction and restamping stays truthful. Sticky
decision logic, restamp-unmeasured semantics, non-entity targets,
renderer version (v3), and package versions (0.4.3) are unchanged.
@Ancienttwo
Ancienttwo merged commit 21b35d3 into main Aug 15, 2026
14 of 15 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.

1 participant