# W1 #209 — lane state and next steps (todlando)

## STATUS 2026-08-21: BUILT, WITNESSED RED, GREEN, PUSHED — AT DOYLE'S GATE

`fix/209-er-inbound-local-bypass` @ **`562599df`** (one commit on base main
`c62904e7` = v0.59.0), pushed to origin. Sibling `fix/190-read-frame-deadline`
@ **`e50a1d63`**, also pushed and at the same gate.

- Witnessed red: the SAME rig file against the stashed pre-fix tree. Restored
  and verified the tracked diff byte-identical against a pre-stash backup.
  Pre-fix table: uninvited send QUEUED with its row spooled; BOTH authorship
  forgeries delivered; `folds_case=true` on this NTFS box with the folded
  spelling landing on the engine room's own perch; `membership=["work"]` so the
  hole-punch arm is non-vacuous.
- Post-fix: both rigs green (`spt::er_inbound_local` 1.330s,
  `spt-daemon::er_inbound_local_notify` 0.229s).
- clippy `--workspace --all-targets` 0/0 (two warnings I introduced authoring
  `gate.rs` were FIXED, not waived). `traceable-reqs check` exit 0.
- Full workspace sweep: 3048 tests, 758.840s, 3047 passed, 1 failed —
  `spt-msg ring::tests::ring_gets_reply_and_cleans_up` at 10.802s. Classified
  NOT MINE structurally, not by re-run alone: isolated `SPT_HOME`, no ER perch
  to canonicalize against, no rules in the store ⇒ a `Refused` outcome is
  UNREACHABLE on that path; the 5s ring reply timeout was blown under 3048-test
  contention. 21/21 isolated, 0.165s–2.210s.

**STILL OWED, declared:** P16 (pin that the ER perch never runs a
`PollListener`, or hand receiver-side gating to the #211-adjacent pile) — NOT
built, doyle to rule. R3/R4 go in the fulfillment comment in words at the gate,
R4's wording SHARED with #200 and not forked.

**W5/#211: DO NOT START.** `W5-211-DESIGN.md` is REWRITTEN v2 and supersedes v1
in full — re-read it fresh, never from memory of v1. Headline: no new tier, no
new `Subject` kind, no schema change; intra-node governance is SELF-REFERENTIAL
`Node` subjects at the existing tiers, rules-only. The S3 work in this commit
already provides the machinery (own-node rules match a local origin through
`first_match` with zero new code, and modes keep abstaining local — the
hole-punch by construction). Wait for doyle's re-brief.

Lane `fix/209-er-inbound-local-bypass` @ `.worktrees/fix-209`, base main `c62904e7`.
Pool claimed `fix-209` from its own worktree. Census: `W1-209-CENSUS.md` (this dir),
accepted by doyle with riders R1–R5 + F1/F2, all ruled GO.

## LANDED so far (workspace `cargo check --all-targets` CLEAN, zero warnings)

1. **Chain LOWERED to `spt_store::gate`** (R1). `crates/spt-daemon/src/access.rs`
   imported from `spt_store` and nothing else, so the whole chain moved with no new
   dependency; `spt-msg` (deps = spt-proto + spt-store only) can now reach it, which
   is what makes `ring` gateable at all. `spt_daemon::access` re-exports every moved
   item, so **no consumer call site churned**. `DiscoverGate` + `warrants_trust_warning`
   stayed in the daemon.
2. **S3** — `Origin` on `AccessRequest`, set at ONE site in the chain. Mode tiers 6–8
   abstain for local; `origin_subnets` EMPTY for local; same-node allow demoted to the
   chain BOTTOM; store-degrade falls to that bottom for a local origin (a degrade must
   not sever the box's own agents — doyle approved as its own sub-decision); a node
   with no identity reads as local. Slot 3.5 / 6.5 marked in `decide`.
3. **`Origin::LocalNode { sender }`** carries the authoring endpoint id IN THE VARIANT
   (doyle's sequencing update) — inexpressible to construct a local origin without
   deciding. Nothing reads it yet; #211's tier will.
4. **`admit_local_delivery`** in `spt_store::gate` — the ONE gate site, with the F1
   `note_outbound` half inside it (admitted sends only).
5. **F2** — `targets_engine_room` asks whether the target RESOLVES to the ER perch,
   not whether it is spelled like it. Pure half `same_resolved_dir` split out.
6. **Wired**: `cmd_send` (one call at the verb head, covering all three cascades),
   `ring::ring` (one call at the head; `RingOutcome::Refused` added),
   `notif::deliver_notify_quiet` (`SendOutcome::Refused` added — the exhaustive match
   in `cmd_send` compiles red if a future arm forgets).
7. **REQs minted registry-first**: `REQ-ER-INBOUND-LOCK-ALL-PATHS` (impl+unit+int),
   `REQ-ACL-LOCAL-ORIGIN-TIERS` (impl+unit). Both in their groups.
8. **Unit cells GREEN (4/4)**:
   - `gate::tests::the_resolution_predicate_never_disagrees_with_the_filesystem`
   - `gate::tests::an_absence_is_never_an_identity`
   - `access::tests::a_closed_posture_refuses_a_remote_send_and_still_admits_a_local_one`
   - `access::tests::a_rule_naming_the_local_origin_still_governs_it`

## THE INT RIG — AUTHORED 2026-08-21, type-clean, witnessed red PENDING

**Placement changed from what the section below planned, and doyle APPROVED the
change with its reason.** The rig is `crates/spt/tests/er_inbound_local.rs` — the
`spt` BINARY e2e — not a `spt-daemon` test. The defect is that the authoring VERB
never asks the chain, and "does the verb ask" has no unit form and no
daemon-crate form: a cell calling `admit_local_delivery` directly would prove a
function nobody skips. Driving the real binary also reproduces doyle's field
proof shape exactly (`ENDPOINT_INJECT` vs zero `ENGINE_ROOM_INBOUND_LOCKED`).
The notify class shares no entry seam with the CLI, so it has its own pin:
`crates/spt-daemon/tests/er_inbound_local_notify.rs` (arm 1 the engine room ⇒
`SendOutcome::Refused` and ZERO spooled rows; arm 2 the discriminator — the same
notif at an ordinary endpoint still `Queued` — without which `Refused` is
satisfiable by a notify engine that simply stopped notifying).

The rig is deliberately PRE-FIX COMPILABLE: its `(c)` precondition computes
subnet membership from `RosterStore`/`SubnetStore` directly instead of calling
the chain's own `subnets_of`. Two reasons — an expectation derived from the code
under test moves when that code moves, and it lets the witnessed red be THIS
EXACT FILE run against the base sha rather than a hand-cut approximation.

Arm order is load-bearing and stated in the file: `(b)` runs LAST because it
writes the durable reply window (`RecentOutbound` under `SPT_HOME`); after the
engine room has spoken to a local agent, that agent's send IS a reply and ought
to be admitted, so any refusal arm run afterwards would assert the wrong thing.

## THE ORIGINAL PLAN (kept for the cell list)


New file `crates/spt-daemon/tests/er_inbound_local.rs` (spt-test-support `TestHome`,
runner contract = nextest process-per-test). Cells:

- **(a) THE WITNESSED RED** — an unsolicited LOCAL send to the engine room. Pre-fix it
  delivers (doyle's field proof: `ENDPOINT_INJECT:engine-room`, zero
  `ENGINE_ROOM_INBOUND_LOCKED`); post-fix it is refused with the lock's own
  diagnostic. Build the red FIRST against the pre-fix behaviour to prove the rig can
  see the defect — a green rig on a fixed tree is evidence about the ladder, not the
  fix.
- **(b) REPLY EXEMPTION ALIVE ON THE LOCAL PATH (F1)** — the ER sends to a local agent,
  the agent answers, the answer is ADMITTED, and the loud arm is SILENT on that
  traffic. Assert the silence, not only the delivery.
- **(c) HOLE-PUNCH negatives** — ordinary endpoint-to-endpoint local send still
  delivers; and still delivers with (i) a subnet-scoped DENY rule and (ii) a closed
  node mode in the store. **(c) is where the `origin_subnets`-EMPTY arm gets its
  evidence** — the emptying happens in the chain's I/O half, not in `decide`, so the
  unit cells deliberately do NOT prove it (the helper would be proving itself). Say so
  in the report.
- **(d) BRIEFING-AUTHORSHIP FORGERY (R2)** — a local send to the ER wearing
  `BRIEFING_AUTHOR` is still gated and refused. The exemption is the call path.
- **(e) F2 at the delivery level** — `Engine-Room` (the folded spelling) is refused
  too, asserted via the resolution fact so the cell stays portable.
- **(f) `ring` and `notify` arms** — class-level pins are acceptable where arms share
  an entry seam (doyle); name the classes: {cmd_send ×3 cascades}, {ring}, {notify}.

## THEN

- `cargo clippy --workspace --all-targets` + full `spt-daemon`/`spt` nextest on the lane.
- `traceable-reqs check` → 0 (currently reports exactly the unit/int stages not yet
  written, nothing else).
- **R3/R4 in words in the fulfillment comment**: rows spooled pre-flip drain ungated
  exactly once; admission runs in the AUTHORING process so an old/modified binary, a
  direct spool write or a raw TCP connect never meet it; TOCTOU between resolve and
  spool-write falls under the same OS boundary. Docs amendment re-scoping the published
  claim rides the lane — **same wording as #200 will cite; do not fork it.**
- **P16**: pin that the ER perch never runs a `PollListener` (ER unreachable via
  T-TCP), or hand receiver-side gating to the #211-adjacent pile.
- Report to doyle with the lane ref + head sha.

## AFTER #209 GATES GREEN — W5 (#211), same lane

`W5-211-DESIGN.md` at repo root, doyle-ruled, 8 sections. Stacks as the next commit
series on this lane (same chain files, `decide` tiers 3.5/6.5). D7b + gate cell j were
added off my store-degrade sub-decision: once the tier exists, a degrade SUSPENDS a
ruled local deny, and the degrade warning must name suspended local governance when
intra-node entries exist.

## Sibling lane: #190 — DONE but not handed off

`fix/190-read-frame-deadline` @ `.worktrees/fix-190`, pool `fix-190`. Witnessed red
then fix, 3/3 green; `REQ-IPC-DEADLINE-UNHONORABLE-REFUSED` minted. clippy clean;
spt-daemon 1087 tests → 5 reds, all classified (1 REAL finding fixed in-lane per
doyle's ruling: `dispatch.rs` had a "bounded read" comment that a `Whole` carrier never
honored, 20.146s FAIL → 1.681s PASS; 3 cold-pool fixture-exe; 1 load flake, passes
isolated). **Owed: the remaining-package legs are RUNNING in the background** — read
that result, report the Whole-carrier-oracle count to doyle either way, then hand him
the lane ref + head sha.
