Skip to content

fix(projection): scope entity stamp digest per node - #105

Merged
Ancienttwo merged 2 commits into
mainfrom
fix/projection-node-scoped-stamp-digest
Aug 15, 2026
Merged

fix(projection): scope entity stamp digest per node#105
Ancienttwo merged 2 commits into
mainfrom
fix/projection-node-scoped-stamp-digest

Conversation

@Ancienttwo

Copy link
Copy Markdown
Owner
  • Problem: every merge to main restamped ALL entity-summary verifiedAgainst markers in downstream repo-harness docs/architecture (12-file SHA-only churn per merge).
  • Root cause: entitySourceDigest shared by all entity targets folded (a) plan-wide source tree digest, (b) all nodes' scale signals, (c) all nodes' proof digests — any commit broke it; the per-node measurement in stickyVerifiedAgainst never got to run.
  • Fix: per-node sticky key {sourceScaleSignal ?? null, semanticProof} computed in the render loop; plan-wide digest and sibling signals removed from the key. Non-entity targets unchanged. restamp-unmeasured and measurement-commit checks behaviorally untouched.
  • Migration: renderer v2→v3; one-time full re-render of entity docs on upgrade (covered by a test). Workspace 0.4.3.
  • Evidence: new regression test fails pre-fix (unrelated commit + sibling re-measurement restamped an untouched node) and passes post-fix; bun test 1231 pass / 0 fail; tsc --noEmit clean; gate review PASS.
  • Not in scope: ARCHCTX_FEATURES token rename (separate capabilities-contract change); npm publish + distribution readback (release-time gate, follow-up).

The sticky verifiedAgainst key for entity-summary targets folded the
plan-wide source-tree digest plus every node's scale signals and proof
digests into one shared value, so any commit invalidated every entity
stamp and each projection run rewrote all module docs with SHA-only
churn. Scope the key to the node's own {scale signal, semantic proof}:
a stamp now survives unrelated commits and sibling re-measurements, and
re-stamping is decided by the existing per-node changed-path
measurement (restamp-unmeasured semantics unchanged).

Renderer bump archcontext.docs-renderer/v2 -> v3 because the marker
sourceDigest semantics changed; upgrading re-renders entity docs once.
Version 0.4.3. The ARCHCTX_FEATURES token "architecture-docs-renderer-v2"
stays: capabilities features gate capability generations, not renderer
versions; exact renderer identity remains renderers.architectureDocs
plus each marker's rendererVersion.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20ff1c6516

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +373 to +376
targetSourceDigest = digestJson({
sourceScaleSignal: scaleSignalsByNodeId.get(nodeId) ?? null,
semanticProof: { capabilityId: compilation.capabilityId, proofDigest: compilation.proofDigest }
} as unknown as Json);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include all rendered node metadata in the sticky digest

When only .archcontext node metadata such as summary, status, extensions.localContracts, or source.entrypoints changes while the covered source footprint is unchanged, none of those fields affect this digest: the scale signal only describes the footprint and the semantic proof omits several of them. stickyVerifiedAgainst therefore reuses the previous commit, after which renderEntitySummary emits the changed metadata alongside the old Verified against value. A docs apply can consequently write new architecture facts falsely stamped as verified against an earlier commit; include every node-local render input in this key or compare the stamp-independent generated body before reusing the stamp.

Useful? React with 👍 / 👎.


```bash
npm install -g archctx@0.4.2
npm install -g archctx@0.4.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the pinned install command on the verified release

Before the separately deferred 0.4.3 publication and distribution readback occur, this command points users at an unverified and potentially nonexistent npm version. The committed docs/verification/fg6-release-distribution-readback.json still verifies 0.4.2, so the surrounding claim that this reproduces the “current verified release” is false and the command can fail while @latest still installs 0.4.2. Retain the verified version here until the 0.4.3 readback is committed, or clearly label the command as a post-publication step.

Useful? React with 👍 / 👎.

The version bump folds ARCHCONTEXT_PRODUCT_VERSION into
REVIEW_ACTION_NO_LLM_MODEL_DIGEST, so the fg4 and fg6 evidence
recordings must carry the 0.4.3 digest (same refresh as a124462
carried 0.4.2). Adds the archctx 0.4.3 release checklist.
@Ancienttwo
Ancienttwo merged commit cba1964 into main Aug 15, 2026
8 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