---
name: liveness-aware-derivation-fixture-ripple
description: "making a rest-state derivation liveness-aware breaks statusless InfoJson::new(4242) fixtures host-dependently; gate the whole apply_event/advertised_status ripple, not just the touched module"
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 0d7e6032-2887-41c7-91d1-bb94b922907f
  modified: 2026-07-25T13:47:57.714Z
---

REMOTE-TRUTH A-1 (@5ccc817 RED → @b5c248f green): when `resting::apply_event`'s `from` became liveness-aware (routed through `effective_rest_state(alive,unbound,intent)`), it broke pre-existing tests whose fixtures wrote a statusless `InfoJson::new(id,"t",4242,"sid","live_agent")` — no `set_status`. With status absent, `is_perch_alive` falls to the pid-probe branch (liveness.rs:142) and pid **4242 is host-dependent** (dead on doyle's kitsubito gate host ⇒ cold ⇒ Suspend/wake NO_EDGEs ⇒ `read_rest().unwrap()` panics; alive on my box ⇒ passed by accident). The fix is to pin the fixture's honest status: `spt_store::info::set_status(&p, spt_store::liveness::STATUS_ONLINE|STATUS_OFFLINE)`.

**Why:** two ways this cost a bounce. (1) My local gate ran only `spt-daemon resting::`+`registryhost::` — but `apply_event` ripples workspace-wide (cli.rs cmd_shutdown/owner-shutdown, shellwake resolve_wake, lifecycle rest_event, api/reporting suspend). doyle's full-workspace nextest caught 2 cli.rs failures mine missed. (2) Pinning by wrong INTENT re-breaks: I pinned a suspended-owner shellwake test OFFLINE ("suspended=cold"), but the test **revives then re-suspends** — a cold pin collapses every intent to Suspended so the re-suspend Active→Suspended edge NO_EDGEs. Correct = ONLINE (warm + intent-refined: the written rest record drives state). Static reasoning missed it; the empirical run caught it.

**Second occurrence, SHELL side (2026-07-25, REQ-HAZARD-SHELL-STALE-ONLINE):** making a shell's online-ness derived (`status==online AND shell.pid not provably dead`) broke 3 pre-existing fixtures that modelled "online" with a mock spawn template that had ALREADY EXITED (`cmd /C exit 0` / noop mock-shell) — they were describing a corpse and asserting live-shell behavior. `linkhost::prepare_drive`'s had become a LOAD-DEPENDENT race: green in isolation, red under concurrent cargo — the shape that gets waved off as flake. **Trap when pinning these: do NOT park `std::process::id()` in any test whose path calls `close_shell`** — `kill_shell_at` kills the recorded pid, so the harness kills ITSELF and the suite exits "abnormally, code 1" with no panic text (cost two debug rounds in drive_e2e + gateway_owner_shell_e2e). Park a spawned sacrificial child (`ping -n 120` / `sleep 120`) instead; the link-break killing it is realistic, not collateral. Self-pid stays fine where nothing kills (unit `prepare_drive`).

**How to apply:** (1) after ANY change to `apply_event`/`advertised_status`/`effective_rest_state`, gate the RIPPLE surface locally before pinging: `cargo test -p spt --bin spt <rest-filter>` + `cargo test -p spt-daemon --lib shellwake::` + resting/registryhost — not just the module you edited. (2) Fix statusless-4242 fixtures by INTENT: warm-live/dormant → STATUS_ONLINE, cold-only-no-transitions → STATUS_OFFLINE; if the test transitions the owner THROUGH states (revive→re-suspend) it needs ONLINE (intent-refined), never OFFLINE. (3) `std::process::id()` (always alive) and `DEAD_PID`=2_000_000_000 (always dead) fixtures are deterministic — NOT the flake class, leave them. Related: [[spt-verification-gates]], [[delegate-tests-to-spt-test-engineer]], [[f030-psyche-ephemeral-COMPLETE]] (cross-platform-leg cousin: cfg-split fixtures).
