fix(despawn): handle OS-terminal placements - #548
Conversation
|
Fixed the failing cross-platform checks in |
|
Thanks for this — the gap is real and worth closing. A codex member started in an OS terminal has no watcher and no actas lock, so graceful despawn had nothing to act on and the member stayed up. Recording the boot PID as a placement and teaching both teardown paths to use it is the right shape, and the five tests cover the paths rather than the happy line. We want this, and we would like to take it in the next cycle rather than this release. Review turned up three things that all sit on the same surface, so it seemed better to raise them together than to land and follow up. The recorded PID is not checked for still being ours. The numeric check itself is worth widening while you are there: it currently accepts Teardown reports success without establishing it. One test depends on the host's login shell. None of this is a disagreement with the approach. If you would rather we took the safety changes ourselves and landed it with your commits, say so and we will — otherwise we will pick it up as soon as an updated branch is ready. |
|
Thanks for the detailed safety review. Please go ahead and take the PID-identity, bounded teardown, and deterministic-shell changes on this branch as you offered; preserving the existing commits is fine with me. |
Summary
Validation
bats --print-output-on-failure --filter 'OS-terminal boot records|kills recorded OS-terminal PID|terminates OS-terminal descendants|graceful OS-terminal member|errors when there is no placement record|kills a herdr: placement|kills recorded placement and drops registration|graceful no-op when' tests/test_spawn.bats tests/test_despawn.bats(9 tests)bash -n scripts/spawn.sh scripts/despawn.shgit diff --check upstream/main...HEADThe complete Bats suite is deferred to CI because it is intentionally sharded across Linux and macOS and takes substantially longer than the focused local validation.
Fixes #228