Skip to content

check-plugin: content-hash dist-lockstep, not mtime#3

Merged
Codestz merged 1 commit into
mainfrom
fix/dist-lockstep-content-hash
Jun 14, 2026
Merged

check-plugin: content-hash dist-lockstep, not mtime#3
Codestz merged 1 commit into
mainfrom
fix/dist-lockstep-content-hash

Conversation

@Codestz

@Codestz Codestz commented Jun 14, 2026

Copy link
Copy Markdown
Owner

The dist-lockstep check compared dist-vs-src mtimes, but git doesn't preserve mtimes — a clone/checkout/squash-merge rewrites them, producing a false "dist is older than src" warning when the bundle was never stale (hit twice, after merging #1 and #2). Repeated false warnings erode the gate.

Fix: build.mjs stamps a SHA-256 of all src file contents into dist/.srchash; check-plugin recomputes + compares. Checkout-proof, and it catches the real failure (src edited, dist not rebuilt). Shared scripts/lib/src-hash.mjs so the two sides can't drift.

Verified: touching a src file (mtime only) → "up to date"; a content change without rebuild → "stale".

🤖 Generated with Claude Code

The dist-lockstep check compared dist-vs-src mtimes, but git doesn't preserve
mtimes — a clone, checkout, or squash-merge rewrites them, producing a false
"dist is older than src" warning when the bundle was never actually stale
(seen twice after merging PRs #1 and #2). Repeated false warnings train
contributors to ignore the gate.

Fix: build.mjs stamps a SHA-256 of all src file contents into dist/.srchash;
check-plugin recomputes and compares. Checkout-proof, and it catches the real
failure (src edited but dist not rebuilt). Shared scripts/lib/src-hash.mjs so
the two sides can't drift.

Verified: touching a src file (mtime only) stays "up to date"; a content
change without rebuild reports "stale".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Codestz Codestz merged commit 820c7ba into main Jun 14, 2026
@Codestz Codestz deleted the fix/dist-lockstep-content-hash branch June 14, 2026 19:39
Codestz added a commit that referenced this pull request Jun 17, 2026
The selfeval routing probe measured systematic UNDER-routing (run #2: 3/7;
both decision-hiding traps and a multi-component build one-shotted) — the
conductor wasn't applying its own undecided-fork veto. Root cause: the rubric
stated escalation as a passive bias ("escalate only on evidence") with no
forcing function. Tune (generic, not teaching-to-test):
- rebalance Prime Directive #1: a silently-guessed fork ships fragile and
  invisible; "no reason to escalate" only counts if the check was run.
- add a MANDATORY pre-flight escalation checklist (hidden decision / real
  unknown / multiple components / irreversible) — a YES on any line forbids
  one-shot. Illustrations are generic, deliberately unlike the fixture tasks.

Re-measure pending (run #3). Same-fixture re-measure is suggestive, not proof.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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