docs(gate): assertion-strength audit of the live compiled bundle - #97
Conversation
Audits every step of the live create-stat-dashboard-from-testdata bundle against the question "if this step silently did nothing, would its assertion fail?" — 6/12 steps are load-bearing by that reading, matching the compiler's existing strong/weak split. Empirical verification (required by the issue) against a live 9.5.21 instance confirmed steps 0 and 1 as genuinely load-bearing, but also found that step 3's "strong" assertion currently passes regardless of whether its step ran: its target is a recorded structural locator that resolves to zero elements on a freshly booted, unmodified 9.5.21 instance — a locator-stability defect (ADR-0006's open #24 question), not an assertion-strength one. The same defect makes at least two "weak" steps (2, 4) fail unconditionally instead of merely failing to discriminate. Both directions are called out explicitly since either would corrupt a section 9 number computed from this bundle before any cross-version comparison even starts. No assertion or strength label is changed. Counts are reproducible via scripts/assertion-audit.mjs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@copilot review this PR |
I reviewed this PR and found no high-confidence issues requiring changes. |
ReviewDocs-only PR (no product code touched): a new What it doesPer-step audit of all 12 rows in the committed Verification performedI checked this PR's claims against the actual repo rather than taking the prose at face value:
Everything checked out. This is unusually well fact-checked for a docs PR — every specific code reference, line number, and data value I spot-checked was accurate rather than approximate. Issue-checklist complianceMatches issue #61's "before you open the PR" checklist item-for-item: every step has a row, the fraction is derived mechanically (not hand-counted), every weak step maps to a blind spot, the gate-memo consequence is stated explicitly and in plain language, no Minor observations (non-blocking)
RiskVery low. No product code changed; the two runner-level bugs surfaced (locator staleness, Recommendation: approve. |
Closes #61.
Summary
Audits every step of
artifacts/compiled/traj-gate-live-create-stat-dashboard-from-testdata-9.5.21.bundle.jsonagainst the audit's central question: if this step silently did nothing, would its assertion fail? No assertion orstrengthlabel is changed — this is the audit, strengthening is follow-up work.node scripts/assertion-audit.mjs.docs/gate/compiler.mdblind spot, with astrengthen/needs richer fingerprint/inherently weakrecommendation each. Two are novel, code-grounded findings: step 8 already has an unused new-landmark signal (newLandmarks()is computed but never used as the assertion target when a click has its own locator —src/compiler/assertions.ts:286); step 2 has an unuseddom_digestdiff the compiler's own priority-8 fallback could use instead of a non-discriminating "is the clicked button still visible" check.Empirical verification (required by the issue)
Ran against a freshly booted, freshly seeded
9.5.21testbed (npm run testbed -- --version 9.5.21), through the unmodifiedReplayRunner/evaluateAssertion/bundleToProgram— no product code patched. Method: swap the target step'scompiled_actionfor a genuine{ type: "wait" }no-op, leave the assertion untouched, run.url-matches, strong): confirmed. Neutered runs producedASSERTION_FAILEDwith the expected URL mismatch in both cases — satisfies the issue's "at least two claims verified empirically."PASS. Root cause: the assertion's target is a recorded structural/positional CSS path that resolves to zero elements on a fresh, unmodified 9.5.21 instance — the same version it was recorded on, no version bump involved. This is exactly the "is the structural locator stable run-to-run" question ADR-0006 left open for Record the ADR-0006 gate task live against the seeded base version #24, now answered empirically: no, at least not for this row.This cuts both ways on any published number: step 3 would currently score a no-op step as valid, while steps 2/4-shaped rows would currently score a correct execution as a failure. The doc's "Statement of consequence" section spells this out for whoever writes the gate memo, as the issue requires.
A smaller, secondary finding (documented, not fixed):
url-matchesinsrc/runner/assertions.tsreadspage.url()once with no poll loop despite carryingtimeout_ms, unlikeelement-visible. Grafana 9.5.21 appends?orgId=1to/dashboard/newclient-side ~500ms afterdomcontentloaded(confirmed manually), so a fresh full-page navigate races that evaluator — worked around in the verification harness by settling manually, not fixed in product code.Test plan
npm run lint:docs— clean (46 docs)npm run ci— clean (secret-scan, contracts, lint, typecheck, unit + integration tests all pass)node scripts/assertion-audit.mjsreproduces the 6 strong / 6 weak / 6-load-bearing counts mechanically from the committed bundle9.5.21testbed instance (see above) — container torn down afterward, no scratch files committedChecklist (from the issue)
docs/README.mdindex row addedtrack1/b3-assertion-audit🤖 Generated with Claude Code