Repository navigation
fix(teardown): pgrep -f orphan sweep + 3 TDD scenarios - #327
Merged
Merged
Conversation
cmd_teardown #326 follow-up: macOS BSD ps doesn't expose env vars for processes started by other shells, so the original ps eww + AIRC_HOME match couldn't see anything. Switched to pgrep -f "$AIRC_WRITE_DIR" which catches every process whose argv contains the scope path — including all airc python children (handshake, monitor_formatter, bearer_cli) which all pass scope paths on argv. The bash parent doesn't have scope on argv but its python children dying cascades it down via SIGCHLD/SIGPIPE. Three new test/integration_smoke.sh scenarios for the loop- liveness + teardown layer Joel asked about: orphan_loops_self_reap: kill bash parent, assert subshell loops self-reap within 9s. Verifies #325. Currently 2/3 expected (reminder + flush exit; the foreground monitor() loop dies when its parent dies, not via subshell self-reap). teardown_kills_env_tagged_orphans: corrupts airc.pid to simulate broken-tracking state, then asserts airc teardown's pgrep -f sweep still kills every scope-path-tagged process. 15s timeout so a hung teardown can't wedge the test. my_scope_in_mesh: 'remember you need to be part of it'. Spawns a fresh test peer + asserts the user's primary running scope (~/Development/ideem/authenticator/.airc) receives the test peer's broadcast in its local log. Catches issues that only manifest with multiple already-running peers. orphan_loops_self_reap passes locally (2 of 3 bash subshells exit within 9s post-kill). teardown_kills_env_tagged_orphans + my_scope_in_mesh require a clean shell — current session has too many zombie test processes from earlier runs. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switches the AIRC_HOME env-var sweep to pgrep -f scope-path (ps eww doesn't expose env on macOS for cross-shell processes). Plus 3 new scenarios for orphan-loops self-reap, teardown sweep, and 'my own scope in mesh' (Joel's 'you need to be part of it').