# Memory index

- [`spt api` autostarts the daemon](spt-api-autostarts-daemon.md) — every `spt api` verb spawns a real daemon tree (REQ-DAEMON-3): a "pure local read" e2e is still HEAVY and still leaks an exe-holding daemon; psyche_download_e2e has the unfixed shape.
- [Teardown before assert](teardown-before-assert.md) — a panicking assertion skips trailing teardown; the leaked daemon holds target/debug/spt.exe and the NEXT cargo build dies with os error 5.
- [Fixture perch pid refuses daemon stop](fixture-perch-pid-refuses-daemon-stop.md) — seeding `std::process::id()` triggers DAEMON_STOP_REFUSED and hands bare-terminal children an endpoint identity; seed pid 0, parent_pid None.
- [DOORBELL W5 int rows](doorbell-w5-int-rows.md) — the four W5 e2e rows + the light seeding route each replaced a heavier rig with (registry snapshot file beats two-home pairing; unsealed local code beats a daemon; RELATIVE commune_dir is required).

- [Breadcrumb reaper auth lane (#32)](breadcrumb-reaper-auth-lane.md) — daemon.pid CLOSED (AUTH 18/RAW 0 @c1f52ba), brain.ready still RAW in brain_split+twohost_cli; run the census SCRIPT not a grep (prose false-positives); `observed=None` for cleanup-only reads.

- [TEARDOWN W1 oracle soundness](teardown-w1-oracle-soundness.md) — broker-row reads must be Result (unreachable != empty, KH 7.50 inside the instrument); ENDPOINT_RUN `session=` is the harness token, `pid=` IS SessionInfo.pid; no fmt gate — never cargo fmt this repo.

- [IDLE-EDGE W1 legs B/C/D](idle-edge-w1-bcd-tests.md) — DigestEntry is externally-tagged JSON ({"Agent":{seq}}); twohost.rs can't run on one box → use dispatch.rs 2-broker real-QUIC rig; N-1 peer HANGS the digest-pull caller (no FIN, no deadline); blink reseal GREEN.
- [MSG-IDENTITY W1 (F-036)](msg-identity-w1-f036.md) — identity-env scrub (runtime.rs, IDENTITY_ENV_VARS scrubbed LAST in command_for) + psyche-custody squat guard (custody_squatter, establish_perch → BindError::PsycheCustodySquat); spt is bin-only (--bins not --lib).
- [MSG-IDENTITY W2 (F-034) doyle rework](w2-f034-doyle-rework-tests.md) — seed spend-vs-restore (StaleSeed/EmptySession SPEND: reg.peek none + retry=NoSeed; recoverable RESTORE); custody-squat guard widened to 3 seams (bind/auth re-pin/boundary); ANOMALY startup.rs:144 clippy redundant_closure blocks -D warnings.
- [MSG-IDENTITY W3 (F-032)](f032-commune-ingest-blackhole-tests.md) — commune-ingest black-hole commit-before-delete: empty-project_id defers project slice to pending form, `Ingested.preserved`, idempotent-retry byte-equality, marker-only-not-preserved; int via pulse::tick (not pulse_tick), spt-live has no tests/ dir.
- [MSG-IDENTITY W4 carrier-claim](msg-identity-w4-carrier-claim.md) — REQ-CARRIER-CLAIM-EXCLUSIVE/RELAY-NO-BUSY: teeth are in the two-thread WAL race INT (spt-store/tests/carrier_claim_int.rs, N=100 exactly-once); one-winner unit is sequential (passes on old code) = API-semantics guard; release clears taken_* rider; spt-store is lib crate → tests/ use spool:: API directly.
- [MSG-IDENTITY W4 delivery](msg-identity-w4-delivery.md) — F-033 live_agent inject-exclusion breaks EVERY `live_agent`+controllable inject-predicate fixture (unit homes + inject_control_wedge L1815/L2908/L3069) → retag `gateway` by intent; SPT_ENDPOINT_ID leg-b2 unit (isolated_home env-lock, remove SPT_ENDPOINT_ID/SPT_AGENT_ID at end) + NO-daemon int via peek_all_at from-column (socket hashes spt_home → is_running false in isolated home).
- [MSG-IDENTITY W2 (F-034)](msg-identity-w2-f034.md) — seed consume-after-bind (take→bind_taken_seed, restore-on-post-take-Err; unit forces Conflict via pre-establish + int forces HOME_REFUSED via multi-subnet), listen --session-id fallback (NoSeed-only, bind_from_session_id), group-level `spt api --adapter` hint (matches-count guard).
- [MSG-IDENTITY W6 (F-039) blackhole-lifecycle harness](w6-f039-blackhole-lifecycle-harness.md) — five-invariant rig generalizing r4 gate; conn_handler_count `<=1` (not `==0`) floor gotcha w/ persistent unrelated viewer; Windows-only, 3 sync'd filter sites.
- [MSG-IDENTITY W5 (F-038)](msg-identity-w5-f038-autostart.md) — REQ-ENDPOINT-AUTOSTART: config startup_endpoints round-trip + upsert (append=false/replace=true) under with_home; autostart loud-skip units (empty=no-op, unresolved-adapter skips-before-launch, watchdog-bounded); restart e2e keystone = ENDPOINT_AUTOSTART:<id> token in SPT_HOME/logs sink + fresh session_id.
- [Daemon stderr sink supersedes spawn redirect](daemon-stderr-sink-supersedes-spawn-redirect.md) — e2e gotcha: `daemon run` re-redirects its OWN stderr FD to SPT_HOME/logs/daemon.stderr.log(+.1), so Stdio::from(file) at spawn = EMPTY; grep the logs sink for daemon-side tokens. CLI-process tokens still land on Command::output().stderr.
- [spt-daemon lib test_home helper](spt-daemon-lib-test-home-helper.md) — crate::test_home::with_home / env_lock isolates SPT_HOME (process-mutex) for canonical-path lib unit tests; new DaemonConfig field breaks full-struct-literal tests (E0063); scoped-filter runs only (--lib deadlock hazard), one positional filter per cargo test invocation.

- [RT-A4a minter-namespace](rt-a4a-minter-namespace-blocker.md) — REQ-OPID-MINTER-NAMESPACE BUILT: Minter{Legacy,Cli,Pump,Rc,Shell,Wake}+MintedOp newtype thru brain/daemon; 8 stamp sites; tag names SEQ SOURCE not subsystem (2 map-misses: shellchan, forward_wake).

- [RT-A4b tracing-retry](rt-a4b-tracing-retry.md) — REQ-OPID-TRACING-RETRY BUILT: with_tracing_retry helper + FROZEN marker builder-fns (effect.rs), 3 wrapped sites (wansend/forward_wake/rc-attach) ALL re-dial-in-run (broker restart drops conn too); 5 effect:: unit tests; F-1 public terminal string.

- [RT-A1 effective_rest_state](rt-a1-effective-rest-state.md) — REQ-EFFECTIVE-INSTANCE-STATE shared derivation; liveness-aware apply_event `from` breaks fixtures that are "live in prose but statusless" — set_status(ONLINE) for live, OFFLINE for cold.
- [spt crate test conventions](spt-test-conventions.md) — bin-only crate (no lib), unit-test commands, isolated_home, dummy-harness e2e fixture pattern, scoped pid reaping.
- [F028 wave-final int patterns](f028-wavefinal-int-patterns.md) — real-auth-via-binary C2-ROOT (`api presence <ID>` positional, bin-only=no mock); broker-session-map dup probe B1/B4 (spt_daemon::Brain::sessions dev-dep, --start=headless refuse); reconcile-direct sticky sweep B3 (pub reconcile_hosted_liveness, decoy live set, boot-sweep arm).
- [W3b crc_swap rollback forcing](w3b-crc-swap-rollback-forcing.md) — REQ-ADAPTER-LIVE-UPDATE: force apply_crc_swap mid-loop fail via pre-seeded non-empty `<second>.old` dir (move-aside-then-rename-in defeats the naive dir trick); rename->non-empty-dir = Win os-err-5; cmp_owned uses Path::new not PathBuf::from; filter names after `--`.
- [W3c live-update reload tests](w3c-live-update-reload-tests.md) — REQ-ADAPTER-LIVE-UPDATE: ManifestCell refresh + reload-on-dirty units in spt-daemon lifecycle.rs; assert BOTH manifest_snapshot + runtime_snapshot().manifest() versions; unparseable keeps last-good + no `last` advance; impl `manifest_cell()` gap filled mid-session.
- [W3e live-update int keystone](w3e-live-update-int-keystone.md) — REQ-ADAPTER-LIVE-UPDATE + REQ-HAZARD-STOP-PATH-PSYCHE-ORPHAN-REAP NO-MOCKS int A (own-copy lock-free + stop reaps orphan psyche) + int B (Brain::adapter_apply swaps a Windows-LOCKED translation binary, endpoint never restarts); `live_adapt_*` NOT `live_update_*` (os-740 UAC name).
- [W3 (a)+(c) stop-reap + own-copy tests](w3ac-stop-reap-owncopy-tests.md) — REQ-HAZARD-STOP-PATH-PSYCHE-ORPHAN-REAP + REQ-INSTALL-11: WIN lingering-owned-Child-handle keeps is_process_alive TRUE post-TerminateProcess (drop Child before reap); own-copy fake-binary at install_dir/<token>; copy_if_changed no-op = mtime-preserved (deterministic).
- [W2 gh-transport unit tests](w2-gh-transport-unit-tests.md) — REQ-ADAPTER-GH-TRANSPORT: pure resolve_transport (explicit-never-probes via `|| unreachable!()`), gh command-shape builders (None drops `{tag}` token+key), clap conflicts_with; int is HITL/unit-covered-not-int.
- [Effect journal wedge tests](effect-journal-wedge-tests.md) — repro-first patterns for REQ-HAZARD-EFFECT-JOURNAL-PTY-WEDGE: structural lock-across-effect unit, file-content fsync proxy, real loopback-attach facet-B int; Windows-absorb vs forkpty-park.
- [ConPTY injected-echo loss](conpty-injected-echo-loss.md) — Windows ConPTY won't echo programmatically-injected PTY input (nor deliver it to a custom io::stdin child); assert injected byte-receipt cfg(unix), capture on Windows. Whole conn ignores read deadline — use cold_start_pump.
- [W5 driven_by self-heal](w5-driven-by-selfheal.md) — CONVERGED: ships Gap B only (GREEN unit+int); Gap A reconcile-clear REJECTED, reframed as invariant; A2 deferred to REQ-HAZARD-DRIVEN-BY-IDLE-REMOTE-EVICT.
- [W5 driven_by characterization (A1/A2)](w5-driven-by-selfheal-characterization.md) — EMPIRICAL: A2 (abandoned remote controller, idle session) keeps controller_by=Some ⇒ controller_by==None is NOT sufficient for Gap A; fix must be broker-side eviction. Pre-seed perch info.json or driven_by won't latch.
- [RC attach online-race repro](rc-attach-online-race.md) — REQ-HAZARD-RC-ATTACH-ONLINE-RACE int RED: endpoint run (no --start) attaches before ONLINE; observed face = connect-then-empty-detach (no heartbeat), not the named offline/no-session bails.
- [Resume-template marker fixture](resume-template-marker-fixture.md) — REQ-SESSION-RESUME-TEMPLATE: mock-session --marker-file proves which [session.role] ran + cwd; --start (no PTY race); daemon e2e flake under parallel → run --test-threads=1.
- [P0 PTY input-writer wedge tests](p0-pty-input-writer-wedge-tests.md) — REQ-HAZARD-PTY-INPUT-WRITER-WEDGE: build InputWriter struct directly (spawn hard-wired to PtySession), empty endpoint = no-op stamp; SPT_INPUT_QUEUE_DEPTH leak hygiene; seed perch for input_backpressure read.
- [P1b input ack-deadlock tests](p1b-input-ack-deadlock-tests.md) — REQ-HAZARD-INPUT-ACK-BACKPRESSURE: ack-gate by FIFO ordering, exactly-once via journal anchor, flood keystone. Watchdog every read_frame (Windows blocks); quiet child + pump flooder + direct KIND_SESSIONS probe; FLOOD_N=64 RED is forkpty-only.
- [P1c controller-writer reorder tests](p1c-controller-writer-reorder-tests.md) — REQ-HAZARD-CONTROLLER-WRITER-REORDER: unit pins send.lock() across two become_controller for deterministic [0,1] wire (unit=gate RED carrier); int asserts CONSUMER-dedup level (stays green on neutered gate by design); handoff seeds session_cursor==prior.next_seq. No blocking EOF probe (Windows pipe hang).
- [IDLE-EDGE W1 Leg A activity tests](idle-edge-w1-lega-activity-tests.md) — REQ-ACTIVITY-LINK-PUSH: observer lives in the BRAIN CHILD ⇒ int needs a REAL `spt daemon run` (in-process hub rig passes on unwired code); relink refuses while online; same-poll drive+activity must settle past the 200ms tick.
