Skip to content

fix: prevent workers from inheriting supervisor queue paths - #74

Closed
peterOC26 wants to merge 6 commits into
mainfrom
fm/fm-worker-env-wake-queue-leak-l1
Closed

peterOC26 wants to merge 6 commits into
mainfrom
fm/fm-worker-env-wake-queue-leak-l1

Conversation

@peterOC26

@peterOC26 peterOC26 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Intent

Q2249 B (2026-11-18, Jobs page): "Q2249 b" - use the leftover Claude allowance on, among other things, the small fix that stops worker test runs leaking fake notifications into this home's real wake queue.
Seen twice on 2026-11-18: a worker's test drain read /root/firstmate/state/.wake-queue because the worker shell inherited FM_WAKE_QUEUE; later four fake procevent wakes (example-file, flow-source, order-source, remote-source) landed in the real queue.

What Changed

  • Clear inherited FM_WAKE_QUEUE, FM_WAKE_QUEUE_LOCK, FM_ROOT_OVERRIDE, and FM_STATE_OVERRIDE from pane-backed worker launches while preserving FM_HOME.
  • Document the environment behavior and add regression coverage for ship and secondmate launches, including allowlisted ship launches.

Risk Assessment

✅ Low: The change adds one portable export NAME= statement to pane-backed launches, and the shell consumers read these names as ${X:-default} (or as a truthy check in Python), so an empty value falls back to the default. The one consumer that checks set-versus-unset (fm-send.sh:670) still only prints an equivalent $FM_HOME/state path. The scrub also runs after the allowlist's env -i boundary, and the new test runs the actual emitted launch for both ship and secondmate, with and without the allowlist, under sh and (when installed) fish.

Testing

  • ⏭️ Test - skipped

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⏭️ **Test** - skipped

Step was skipped.

✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

… wake queue

Every pane-backed launch now unsets FM_WAKE_QUEUE, FM_WAKE_QUEUE_LOCK, the
home path overrides, FM_SNAPSHOT_CACHE_DIR and the crew-state meta/status
overrides before the worker starts, so a worker's own test runs cannot read
or write the supervising home's live queue. FM_HOME and the task inbox are
kept.
@peterOC26 peterOC26 changed the title fix: isolate worker wake queues from supervisor state fix: prevent workers from inheriting supervisor queue paths Nov 19, 2026
@peterOC26
peterOC26 force-pushed the fm/fm-worker-env-wake-queue-leak-l1 branch from fc1a7c5 to 5c90d2d Compare November 19, 2026 10:12
@peterOC26

Copy link
Copy Markdown
Owner Author

Replaced by #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant