---
name: ephemeral-ports-flag-silently-beats-spt-docs-port
description: "SPT_TEST_EPHEMERAL_ADVISORY_PORTS=1 makes the daemon ignore a set SPT_DOCS_PORT without a word (measured both boxes 2026-09-07); node start's WMI rung DOES carry the caller's env; an elevated subnet create landed in the fleet home, not the rig home"
metadata: 
  node_type: memory
  type: project
  originSessionId: b7f12e32-0eab-44ff-b86f-e5002979f90e
  modified: 2026-09-07T05:52:01.257Z
---

Measured 2026-09-07 05:42Z while staging the W2 field rig pair (hfenduleam `C:\Users\decid\spt-rig-a`,
kitsubito `/home/reavus/spt-rig-b`, installed spt 0.67.0 / 0.67.1):

1. **`SPT_TEST_EPHEMERAL_ADVISORY_PORTS=1` silently beats `SPT_DOCS_PORT`.** Both rig daemons had
   `SPT_DOCS_PORT=5480` AND the flag in their environ (read back from the child: psutil on Windows pid
   50088, `/proc/<pid>/environ` on Linux) and came up `DOCS_SERVER_UP: http://localhost:55369` /
   `:44015`. Nothing on 5480, no line saying the override was ignored. Same shape as the IR-37 file
   root (a set input ignored without refusal). For a field leg that needs a KNOWN port: drop the flag
   (and accept the 5474 collision risk with the fleet daemon) or read the port from the
   `DOCS_SERVER_UP` line. Register note handed to hertz's rig-advisory-ports lane.
2. **`spt node start` on Windows launches via WMI (`DAEMON_LAUNCH_VIA_WMI`) and the child CARRIES the
   caller's env** — SPT_HOME, SPT_DOCS_PORT and the flag all present in the daemon's environ, and
   `brain.ready` landed in the rig home. hertz's open question about the WMI rung is answered by this;
   the schtasks (at-logon) rung is NOT measured.
3. **An elevated `spt subnet create` run by the operator landed in the FLEET home**
   (`AppData\Local\spt-core\identity\subnet.json` gained `ws272-rig`), not the rig home named by
   `$env:SPT_HOME`, and the fleet node HFENDULEAM (pubkey 14efb80c…) joined the rig subnet; kitsubito's
   rig B then paired to the FLEET node. Cause not yet separated (env line skipped vs elevated spt
   ignoring SPT_HOME): the decider is `node status` under SPT_HOME in the same elevated shell — pid
   50088 = honored, 14444 = ignored. spt only self-de-elevates on the sudo path (main.rs:179), so on
   Windows there is no respawn to drop the env.

**Why:** a rig beside a fleet daemon needs the flag to avoid 5474, and the flag eats the one port
override you would use to make the rig addressable; and a ceremony that needs elevation runs in a
shell you do not control, so its SPT_HOME is a claim until the store file is found where you meant.

**How to apply:** after ANY daemon launch, read the child's environ back and the `DOCS_SERVER_UP`
line; after ANY subnet ceremony, `find` the `subnet.json` that changed before calling the pair made.
Related: [[a-battery-launched-from-a-perch-inherits-the-endpoint-identity]],
[[kitsubito-remote-launch-traps]], [[v0680-arc-in-flight]].
