IMPLEMENTER BRIEF — detection-a-cancel-by-dispatch (ledger row A: cancel-by-dispatch detection)
GOAL: tests/test_cancel_by_dispatch.py enforces ledger row A's cancel-by-dispatch property: the cancel-time "was this attempt dispatched?" classification is exercised in both branches under cancel racing dispatch, and each branch's settlement is asserted — a dispatched attempt's durable actual is never laundered to 0; a never-dispatched attempt's commitment is reclaimed to 0 and a late dispatch adds no ledger liability; every attempt ends terminal and FINALLY_SETTLED; store.replay_fresh reproduces the settled state from the log alone. Every case asserts its interleave actually fired.
CONTEXT: Ledger row A (docs/record.md) reads "inverted or stale predicate laundering accounting"; its Detection reads "partial: barrier pattern in `tests/test_single_flight_concurrency.py`; cancel-by-dispatch absent". The shape shipped three times (R04, SPEND F2, Exec F3): a stale `dispatched`/`late` snapshot at cancel zeroed real liability; the fix classifies dispatched from the durable log under the admission lock (Controller._cancel_attempt, Controller._attempt_was_dispatched). Existing probes cover the retain side only: tests/test_cancel_interleavings.py window 1 forces cancel during executor flight; tests/test_batch3_execution.py::test_cancel_racing_dispatch_never_launders_the_charge loops 3 racy iterations behind `if runs["count"] > 0` after an unasserted started.wait. Nothing forces the undispatched branch under interleave, and no probe requires both orderings of the cancel × ACTION_DISPATCHED admission race to be observed. Close exactly that gap.
INHERITED: none
IN SCOPE: tests/test_cancel_by_dispatch.py
OUT OF SCOPE: src/**; every existing test module; tests/open_defects.yaml; tests/counterexamples.yaml; tests/guard_mutation_matrix.yaml; tests/fixture_fidelity.yaml; tests/verifier_registry.yaml; tests/spend_paths.yaml; tests/invariants.py; tests/helpers.py; src/orchestrator/project_oracle.py and its RUNNER_SPAWNING_MODULES; any docs/ file except your report. Define no new *Executor or *ModelClient class (the fixture-fidelity meta-test requires a registry row for every one and that registry is out of scope): use the registered orchestrator.executor.ScriptedExecutor and instance-attribute monkeypatching. Name no test test_bug_* (the open-defect registry would then own it). Spawn no sandboxes or subprocesses: the module must survive the oracle's sandboxed gate-check-tests run.
ACCEPTANCE:
- `scripts/check-tests --fast` — green, including the new module's cases
- `pytest tests/test_phase3_project_oracle.py` — green (a new module under tests/ is frozen into the oracle corpus; the fast suite and the commit hook both deselect this oracle)
- `scripts/check-static` — green
- `scripts/check-docs` — green
The module must cover these shapes (a list, not a count):
1. Forced undispatched branch (cancel-then-dispatch): the cancel is fully admitted before ACTION_DISPATCHED is emitted — block the dispatch thread at the emission window so the ordering is chosen, not raced. Settlement reclaims the commitment (attempt actual and ledger charge 0; the reclaim or reconcile-with-reclaim event present), the reduced state contains no created ACTION_DISPATCHED, and the late dispatch adds no ledger liability.
2. Forced retained branch (dispatch-then-cancel) at the dispatch boundary: ACTION_DISPATCHED is durable and the executor is in flight (blocked inside dispatch) when the cancel is admitted. Settlement retains liability (attempt actual and ledger charge > 0), the reclaim event is absent, and the retained actual is never reconciled to 0.
3. Unforced race of cancel × ACTION_DISPATCHED admission: both threads rendezvous on a barrier with no forced winner, over a stated iteration count. In every iteration the settled accounting equals that of an honest ordering — liability retained if and only if the durable log shows the attempt was dispatched — and across the loop both orderings are observed at least once. If this environment cannot produce one ordering, report that in METHOD FRICTION rather than dropping the assertion.
4. Replay in every case: store.replay_fresh reproduces the attempts' terminal and accounting states and the ledger from the log alone.
Each case: force or observe the interleave with barriers or hooks at the named window (no sleeps as synchronisation), assert the hook or barrier fired (anti-vacuity), and mark the case @pytest.mark.timeout so a deadlock fails instead of hanging. An assertion behind a condition that can be false at run time is not evidence: if a shape cannot be built, say so in your report rather than shipping a conditional.
REV: 1932f2d365fc22fb8f719915816af9685a08142a
CLOSE OUT: yes
DIVERGENCES: none

You implement one brief. You do not plan, re-scope, or decide what the work is. Read every file
in IN SCOPE before editing it; if what you find contradicts the brief, report that instead of
guessing. Modify only what IN SCOPE names. Stop and report rather than improvise when IN SCOPE is
insufficient, the brief contradicts the code, the requirement is ambiguous, or you have already
failed twice at this goal. No new dependencies, no tooling configuration, no reformatting. Run
every ACCEPTANCE command; fix what is in scope and report what is not.

Then append docs/templates/report.txt verbatim, fill it in, and write the report to
docs/research/detection-a-cancel-by-dispatch-implementer.md. METHOD FRICTION is yours to fill: record any place
you deviated from this brief, found it ambiguous, or found it silent. Report friction you worked
around — that is the section the method learns from.

REPORT — <phase>-<subject>-<role>
STEP: <implementer brief subject>
REV: <base sha>   FINAL: <sha>
CHANGED: <files, one line each>
VERIFIED: <command, duration, counts>
NOT VERIFIED: <why, or none>
FINDINGS: none | one block each:
  ID | SEVERITY: P0|P1|P2 | ORIGIN: BRIEF|CODE|DOCUMENT | STATE: fixed|declined|carried
  <root cause, one line>
  FIXED: <node id, command, and the named failing assertion at REV — or "no regression test">
         An error or a collection failure is not red. The assertion has to be the thing that
         failed; a run that merely crashed proves nothing.
SHAPES: <shapes probed that the suite does not build, or none with a reason>
TRIPPED: <residual ids, or none>
PROPOSED ROWS: <ledger rows, or none>
METHOD FRICTION: none | <where you deviated, misread the brief, or found it silent>
INHERITED:
<<every INHERITED item you received that is still open, copied verbatim; then each
  finding you marked carried, with its ID>>
Rule 2 governs the planner's copy of this block. What goes in it is yours: an implementer or
reviewer who received an obligation, finding, entry or trigger carries it forward verbatim, and
adds anything new that is still open. A block reading `none` is correct only when nothing came in
and nothing is open.

--- when CLOSE OUT is yes, the PLANNER appends, copying and adding no judgement: ---
CLOSEOUT
DECLINED: none | <finding + reason>
DIVERGENCES CLOSED: <state, with the rev or commit, per rule 5>
