docs: slim interactive replay ADR to a decision record
Summary
Slims ADR 0012 to a decision record, the same way #4277 and #4279 slimmed ADRs 0007 and 0004.
Size: 97,254 B → 16,844 B. The ADR keeps no file paths, so no stale path citation remains. It names owners instead.
Decision numbers 1–6 and rule labels R1–R7 stay the same, so code citations still resolve.
Contracts that only 0012 held now live with their owners (5 new docs, 6 files touched):
packages/ad-script/docs/target-annotation.md:target-v1/targets-v1format, bounds, record-time write, the six verification paths, and #1269/#1280/#1349.packages/replay-port/docs/replay-divergence.md: suggestion ranking, screen capture scope (#1264),repairHintmapping (R3), and the launch-race retry (#1385).packages/ad-replay/docs/divergence-and-resume.md: wire fields, level ceilings, redaction, overflow, surfaces, resume ordinals, watermark, and plan digest.packages/daemon/docs/replay-repair-transaction.md: R1–R7, the state machine, publication, tombstone, and observation exclusion (#1271).packages/command-runtime/docs/resolution-disclosure.md: resolution shapes and the six matrix cells.
Each doc keeps its part of the old decision 5 coverage inventory.
The ADR stays above the 8 KB aim. The remaining text is six decisions, their reasons, rejected alternatives, and open gaps.
The diff exceeds the 2,500-line cap because it moves contracts to owner docs and includes a migration ledger.
Part of #4205.
Validation
Head ce49ed1c4ab8e3523b09c34d35d9133057444c5f. Docs only, so runtime and device tests do not apply.
pnpm check:affected --run --head ce49ed1c4a: passed,exactCommit=true, 0 checks selected.pnpm format,node --experimental-strip-types scripts/check-doc-prose.ts, andpnpm check:doc-links: passed at this head.- A source search of all 293 backticked identifier tokens found only
allowRecordabsent; it names a rejected hypothetical argument. - Review corrections document two implementation gaps: native-ref can report exact after label recovery, and an escape-heavy target annotation can remain oversized after rect removal. No runtime code changed.
- Hosted checks and review remain separate from local validation.
The ledger below describes the original move. The review correction qualifies its earlier claims about overwrite, bounds, and native-ref disclosure.
Migration ledger
Abbreviations: TA = ad-script target-annotation, RD = replay-port replay-divergence, DR = ad-replay divergence-and-resume, RT = daemon replay-repair-transaction, RDis = command-runtime resolution-disclosure.
| Old section | Outcome | Owner or reason |
|---|---|---|
| Status: amendment list, deferred benchmark | Kept | Status |
| Status: implementation record and migration plan pointer | Deleted | Git history |
| Rules at a glance | Kept (merged) | Each rule is now a Decision paragraph |
| Decision 1: no rewrite; candidate machinery feeds suggestions | Kept | Decision 1 |
| Decision 1: ranking total order, dedup, levels | Moved | RD "Suggestions" (from the earlier worker's draft) |
| Decision 1: "one model turn" reason | Kept | Rationale |
| Decision 1: audit item (a) | Deleted | History; Context keeps "could not rescue renames" |
| Decision 2: structural collapse, rejection, pre-action diagnostics, label fallback, direct-iOS rule | Kept (short) | Decision 2 |
| Decision 2: exact shapes, native-ref, matrix cells, executed-dispatch rule, Layer-3 coverage | Moved | RDis |
| Decision 3: tiers, no rect identity, six paths, writer-parser invariant, additive format, binding | Kept (short) | Decision 3 |
| Decision 3: payload example, field order, normalization, bounds, local identity, ancestry, record-time write, parser, verification paths | Moved | TA |
| #1567 dual-endpoint evidence | Kept (short) + moved | Decision 3; TA "Format" |
| #1269, #1280, #1349, #1398 amendments | Kept (one line each) + moved | Decision 3; TA sections |
#1269/#1280 measured cases (android:id/title, linearlayout row, RN FlatList) | Deleted | Examples; the platform-neutral rules stay |
| #1349 live Android validation note | Deleted | History; the polling rule stays |
| #1385 launch-race retry | Kept (one line) + moved | Decision 3; RD "Pre-dispatch capture retry" |
| Decision 4: structured error, kinds, screen invariant, ceilings, surfaces, resume loop | Kept (short) | Decision 4 |
Decision 4: field list, matchCount presence, repairHint transport, screen forms, bounds table, redaction, overflow, surfaces, ADR 0014 partial frame, ordinals, alternateFrom, empty tail, watermark, digest, allowed vs repairSessionHeld, preflight | Moved | DR |
| #1264 capture scope and ref selection | Kept (invariant) + moved | Decision 4; RD "Screen capture scope" |
| Decision 5 inventory | Moved | Each owner's "Required coverage" section; ADR keeps the gate |
Decision 5 benchmark harness path (~/.agent-device-bench/…) | Deleted | External path; the deferred arm stays as an open gap |
| Decision 6: hand-edit measurement | Kept (one line) | Rejected alternatives |
Decision 6: core mechanism, sub-flows, R1–R7, teardown, terminal close, digest, activation, state machine, publication, scope, tombstone | Kept (short) + moved | Decision 6; RT |
| Decision 6: R3 mapping table and fail-safes | Moved | RD "Repair hint computation" |
| Decision 6: earlier publish-lock design | Kept | Rejected alternatives |
Decision 6: removed publishOverwriteAtomically, #1235 | Deleted | History |
| #1271 stage 2 observation exclusion | Kept (short) + moved | Decision 6; RT "Observation exclusion" |
| #1271 wave-3 E3 measurement | Deleted | History; the provenance rule and its reason stay |
| #1271 position-inference and policy-argument alternatives | Kept | Rejected alternatives; RT keeps the helper split |
| Consequences | Kept | Consequences |
| Alternatives considered | Kept, renamed "Rejected alternatives" | No link targets the old heading |
| Context and evidence at acceptance | Deleted (short Context kept) | Historical audit with stale paths; Context keeps the three gaps |
Wording drift
Old ADR → new text. Modality, scope, defaults, and numbers only.
- RDis: "ADR 0011's matrix must add a
resolutionDisclosureguarantee" → "has". The row exists in the guarantee matrix, so the instruction became a statement of fact. - Decision 3: "The pre-dispatch verification capture bounds-retries …" → "retries … with a bounded delay budget". RD keeps the 7 delays and 12 s budget unchanged.
- Decision 3: the writer's
"unverifiable"downgrade is stated for the bounds case only. TA keeps the other two causes, the self-check and the #1398 echo. - Decision 4: "Entered text is never serialized. Native
.adreplay replaces expanded variable values with<var:NAME>in human-readable divergence fields." DR keeps the full scope, including machine-readable fields that never get substring replacement. - Decision 6: R1–R7 are one-line summaries. RT keeps the full normative text, including every MUST.
- Decision 6 R7: "armed replay must fail before step 1" keeps "must".
- RT: the
flows/login.adexample becamelogin.ad. The sibling rule is unchanged. - RT: "This follows existing
saveScripthandling insession-lifecycle/internal/session-close.ts" became "the existing session-closesaveScripthandling". It names the owner, not the path. - RD: the
#1233/#1256references on chrome filtering were dropped. ThecollectSettleChromeRefsrule is unchanged. - TA: "Step 5's record-time self-check" → "The record-time self-check". The numbered step is in the same doc.
- Context: the audit narrative is shortened to three gaps. No decision depended on the deleted pointers.
No exception or scope was widened.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.