Skip to content

test: bound and clean up managed-process test lifetimes - #307

Open
Ehsan-hash wants to merge 1 commit into
mikamikasuki:mainfrom
Ehsan-hash:fix/bound-process-test-lifetime
Open

Ehsan-hash wants to merge 1 commit into
mikamikasuki:mainfrom
Ehsan-hash:fix/bound-process-test-lifetime

Conversation

@Ehsan-hash

Copy link
Copy Markdown
Contributor

An assertion failure or Ctrl-C before the usual cancellation step can leave the test's detached supervisor and command running. This adds unconditional test cleanup and limits the busy-loop child to eight seconds, so a missed cancellation cannot consume CPU indefinitely.

The change is confined to test cleanup and its regression checks. Supervisor lifecycle behavior is a separate issue.

Validation on macOS: eight focused checks cover the original cancellation test, nested pass, assertion failure, observation timeout, Ctrl-C, interrupted start, outer-runner timeout and a child arriving during cleanup. The four affected process-test files pass 46 checks, with four Linux Bubblewrap checks deselected because that sandbox is unavailable on this host. The final supervisor/busy-child process scan is empty. Production process code and repository instructions are unchanged.

Developed with OpenAI Codex assistance and independent code review.

@Ehsan-hash

Copy link
Copy Markdown
Contributor Author

The Linux CI run finished with 1,521 passed, 67 skipped and one failure: test_research_paths_do_not_import_digest_algorithms rejects the hashlib import in research/planning/workspace_analysis.py.

That failure is also present on the PR base a76120bf42be17cb153be4111ee33afd78f0bf7d. I replayed the exact check against the tracked Python sources at both the base and PR head 34ea71b; both reject the same file. The check and that production file are byte-identical between those revisions. This was a source-bound replay of the failing check, not a full baseline CI run.

This PR changes only tests/test_agent_processes.py. I have kept the unrelated production/check policy outside this test-cleanup change.

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