oficina / docs Public

And the third of that family: a green run against a stale artifact

Suggested by the paste-fidelity session, and it is the right third
entry: my two exit-code cases and their `amadan ci status | head` are
all "a check reported success about something it never examined", and
the artifact version is the worse half. A wrong exit code you re-check
in a second; a stale artifact you believe for hours.

The instance is from this branch's own verification. Breaking
fixtures/jump-to.mjs to prove a new check could fail came back 44/44
GREEN — fixtures/node_modules was missing, build-bundles.mjs failed, and
scripts/browser-drive.sh drove the committed bundle, which still had the
working code in it. Nothing lied about a status. The drive simply tested
something it had never looked at.

The gate's bundle step is the other instance and is deliberate rather
than a bug: on a mismatch it restores internal/docs/static/ with
`git checkout --` and `git clean -fd`, and its own comment says why —
otherwise a second run passes on a rebuild nobody committed. Verified in
10-gate:110-121 rather than taken from the report of it. The consequence
worth knowing is that a failed gate deletes the bundle you just built,
so rebuild and commit together; `git add` still reads as drift.

Their closing line is the general form and is now the entry's: before
trusting a green run, make it fail on purpose. That is the only reason
the stale bundle was caught at all.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WxucgadpWLE9XNWvfHBsnb
Paul Campbell pushed by paul@keymail.dev 68bbb4a0011638879d6f0218bfe0246fe97e9e24 parent 3eb4452
1 file changed, +20 −0
  • AGENTS.md +20 −0
diff --git a/AGENTS.md b/AGENTS.md
index 2f248ab..dee9ca2 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -386,6 +386,26 @@ time in a single afternoon:
`strings`, and pipefail then calls the pipeline failed — so a release
binary that *was* correctly version-stamped read as unstamped. Count
into a variable instead of using `grep -q`.
+- **A green run against a stale artifact**, which is the same failure as
+ the exit codes above and the worse half of it: a wrong exit code you
+ re-check in a second, a stale artifact you believe for hours.
+ `scripts/browser-drive.sh` does not rebuild the bundles — it drives
+ whatever is committed in `internal/docs/static/`. So a deliberate break
+ of `fixtures/jump-to.mjs`, made to prove a new check could fail, came
+ back **44/44 green**: `fixtures/node_modules` was missing,
+ `node fixtures/build-bundles.mjs` failed, and the drive tested the old
+ committed bundle. Nothing lied about a status; the verification simply
+ ran against something it had never examined and had no way to say so.
+ The gate's own bundle step is the other instance, and it is deliberate:
+ on a mismatch it runs `git checkout --` and `git clean -fd` over
+ `internal/docs/static/` (10-gate, and read its comment — restoring is
+ what stops a *second* run passing on a rebuild nobody committed). The
+ consequence for you is that a failed gate deletes the bundle you just
+ built, so **rebuild and commit in one step**; `git add` is not enough,
+ because staged-but-uncommitted still reads as drift.
+ Before trusting a green run, make it fail on purpose — and check that
+ the artifact under test was actually rebuilt before you believe either
+ answer.
The shape to watch for is a verification that cannot distinguish "no" from
"I can't see it". When you catch one, write it here rather than resolving