Skip to content

[2169 by GPT-5.6 Sol] Make macOS subprocess escalation regression test deterministic under CI load - #2170

Merged
integry merged 3 commits into
1950-epic-cross-platform-dskfrom
2169/gpt-5.6-sol-make-macos-subprocess-esc-20260907-1242-uhr
Sep 7, 2026
Merged

integry merged 3 commits into
1950-epic-cross-platform-dskfrom
2169/gpt-5.6-sol-make-macos-subprocess-esc-20260907-1242-uhr

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #2169

Branch: 2169/gpt-5.6-sol-make-macos-subprocess-esc-20260907-1242-uhr
Commits: ✅ Changes committed (f6a81ac)


AI Processing Completed

Execution Details:

Summary:
Implemented the deterministic test-only fix in run-bounded-darwin-command.test.mjs.

  • Added a bounded readiness barrier for the TERM-ignoring descendant.
  • Preserved the real 500 ms timeout, 150 ms grace period, leader-close assertion, process-group cleanup, and SIGKILL verification.
  • No production behavior changed.
  • Focused test passed 25 consecutive runs.
  • All 10 bounded-command tests passed.
  • Full desktop suite passed: 642 tests, 0 failures.
  • Independent review found no issues.
  • No visual preview was applicable.

Closes #2169.

Detailed Logs:

  • Conversation: 29 messages
  • Session: 01a07be5-4f43-7c91-85bf-8988dae4868e

Log files stored at:

  • conversation: /tmp/claude-logs/issue-2169-2026-09-07T12-51-25-366Z-conversation.json
  • output: /tmp/claude-logs/issue-2169-2026-09-07T12-51-25-366Z-output.txt
Latest Conversation Messages

This PR was created automatically by ProPR after processing issue #2169.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…ssion test d

Implemented by ProPR AI using gpt-5.6-sol model.

Implementation completed successfully.
@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=9 max=2

Validate this narrow test-only macOS readiness correction against #2169. Preserve real timeout, leader-close and TERM-ignoring descendant SIGKILL assertions; no skips or swallowed startup failures. Focus on actual regression blockers, no optional polish or Windows work. Target only the desktop epic; do not merge main.

@propr-dev propr-dev Bot added the ultrafix label Sep 7, 2026
@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 9/10, max cycles: 2)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/review

Ultrafix acknowledged but no review task is present in the live queue. Run the first review on f6a81ac. Scope is the narrow #2169 test-only readiness change. Root inspected the diff and onSpawn ordering: the existing production timer is installed after the hook. Verify bounded readiness failure cleanup and preserved timeout/SIGKILL assertions. No optional polishing or Windows work; do not merge.

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Please extend this narrow test-fixture correction to the adjacent timeout terminates the owned process group including a descendant test as well. New authoritative evidence from PR #2167 retry: run 34118550647 attempt 2, job 101748633883 failed both that test (line 44, read at 61, ENOENT descendant.pid) and the SIGKILL test already covered here. Reuse bounded fixture readiness before the measured timeout for the ordinary descendant test, preserving all process-group termination assertions and existing timeout values. No production relaxation, no skips. Run both focused cases repeatedly and desktop suite. This is an ordinary follow-up implementation request based on newly completed CI, not an F-number selection. Let the current review finish; keep changes on the desktop epic target.

@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This is a focused test-only readiness correction, but it needs one minor change before merge: the newly bounded readiness-failure path can leave the already-spawned process group alive.

✅ Timeout semantics preserved — The readiness barrier runs inside onSpawn, before the existing 500 ms production timer is installed.

✅ Escalation assertions preserved — The test still requires a timeout, leader exit code 0, and termination of the TERM-ignoring descendant.

✅ Readiness is genuinely bounded — Missing readiness fails after 10 seconds, while unexpected filesystem errors remain visible.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Readiness failure leaks process group

  • Required behavior: A bounded fixture-readiness failure must clean up the process group spawned for the test; otherwise a failed setup can leak processes or keep the test runner alive.
  • Evidence: apps/desktop/scripts/run-bounded-darwin-command.test.mjs:108 — the new onSpawn hook can throw from waitForFixtureProcessId before the production timeout is armed, but it retains no child handle for cleanup; the outer finally only removes the fixture directory.
  • Minimum fix: Capture the child supplied to onSpawn and ensure its owned process group is terminated when readiness fails, then rethrow the readiness error. Preserve the 500 ms timeout, 150 ms grace period, and existing timeout/exit/SIGKILL assertions.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The intended race correction is narrow and otherwise preserves the important escalation coverage, but its setup-failure path needs localized cleanup before the test is safe to merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 2m 13s
  • Tokens: 28,400 (24,388 in / 4,012 out)
  • Cost: $0.24

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 8ae72be

Summary of Changes

Implemented the requested fixture-only follow-up in run-bounded-darwin-command.test.mjs.

  • Reused bounded descendant readiness before starting the measured timeout.
  • Preserved the 300 ms timeout, 100 ms grace period, and all process-group termination assertions.
  • No production changes, skips, or visual changes.
  • Both focused cases passed together 25/25 repeated runs.
  • Desktop suite passed: 642 tests, 0 failures.
  • git diff --check passed; only the requested test file changed.
  • Changes remain uncommitted on the existing desktop epic branch.

🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 4m 48s
  • Tokens: 338,700 (335,649 in / 3,051 out)
  • Cost: $0.46
  • Subscription usage: Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5570955343✓

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Review F1 needs evidence reconciliation before adding cleanup: root inspected run-bounded-darwin-command.mjs lines 271-286. Its catch already calls requestTermination("spawn-or-io") when child.pid exists and !primaryReason, then awaits childClosed/forcedSettlement before finally clearing timers. onSpawn is inside that try. Please verify with a focused readiness-hook-throws test whether the owned process group actually leaks; preserve/reuse existing cleanup if it works and report F1 as not reproduced with evidence. Do not add redundant production cleanup merely to satisfy a mistaken finding. Continue the separately requested ordinary descendant readiness fix. If a real leak is reproduced, address only that localized path and show the failing/passing regression.

…unded-darwin-command.test.mjs](/tmp/git-processor/worktrees/integry/propr/pr-2170-followup-2026-09-07T12-58-24/apps/desktop/scripts/run-bounded-darwin-command.test.mjs:60).

Implemented the requested fixture-only follow-up in [run-bounded-darwin-command.test.mjs](/tmp/git-processor/worktrees/integry/propr/pr-2170-followup-2026-09-07T12-58-24/apps/desktop/scripts/run-bounded-darwin-command.test.mjs:60).

- Reused bounded descendant readiness before starting the measured timeout.
- Preserved the 300 ms timeout, 100 ms grace period, and all process-group termination assertions.
- No production changes, skips, or visual changes.
- Both focused cases passed together 25/25 repeated runs.
- Desktop suite passed: 642 tests, 0 failures.
- `git diff --check` passed; only the requested test file changed.
- Changes remain uncommitted on the existing desktop epic branch.

PR: #2170
Comment by: @integry (ID: 5570955343)
Model: gpt-5.6-sol
@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit da152c8

Summary of Changes

Implemented the focused reconciliation test in run-bounded-darwin-command.test.mjs.

  • F1 not reproduced: a throwing onSpawn reports spawn-or-io, preserves the original cause, and reaps both the process-group leader and TERM-ignoring descendant.
  • No production cleanup changes were made.
  • Preserved the ordinary descendant readiness fix at line 60.
  • All three focused process-group cases passed 25/25 repeated runs.
  • Bounded-command tests: 11/11 passed.
  • Desktop suite: 643 tests, 0 failures, 26 skipped.
  • git diff --check passed.

No visual preview was created because this is test-only and has no user-visible effect.


🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 7m 54s
  • Tokens: 671,734 (665,408 in / 6,326 out)
  • Cost: $0.81

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5570992406✓

…-darwin-command.test.mjs](/tmp/git-processor/worktrees/integry/propr/pr-2170-followup-2026-09-07T13-03-43/apps/desktop/scripts/run-bounded-darwin-command.test.mjs:122).

Implemented the focused reconciliation test in [run-bounded-darwin-command.test.mjs](/tmp/git-processor/worktrees/integry/propr/pr-2170-followup-2026-09-07T13-03-43/apps/desktop/scripts/run-bounded-darwin-command.test.mjs:122).

- F1 not reproduced: a throwing `onSpawn` reports `spawn-or-io`, preserves the original cause, and reaps both the process-group leader and TERM-ignoring descendant.
- No production cleanup changes were made.
- Preserved the ordinary descendant readiness fix at [line 60](/tmp/git-processor/worktrees/integry/propr/pr-2170-followup-2026-09-07T13-03-43/apps/desktop/scripts/run-bounded-darwin-command.test.mjs:60).
- All three focused process-group cases passed 25/25 repeated runs.
- Bounded-command tests: 11/11 passed.
- Desktop suite: 643 tests, 0 failures, 26 skipped.
- `git diff --check` passed.

No visual preview was created because this is test-only and has no user-visible effect.

PR: #2170
Comment by: @integry (ID: 5570992406)
Model: gpt-5.6-sol
@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/review

Review final head da152c8 after the second fixture correction and explicit F1 reconciliation regression. All three process-group cases passed 25 repeated runs, bounded-command tests 11/11, desktop suite 643 tests with zero failures. The existing production catch handles throwing onSpawn; the new regression proves leader and TERM-ignoring descendant cleanup and preserves error cause. Reassess F1 against this concrete evidence. No optional polishing, no Windows work, no merge.

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This test-only PR is ready to merge within scope, subject to the pending checks completing successfully. The prior F1 is not reproduced: the regression verifies that the existing catch path cleans up both processes after onSpawn throws while preserving the original cause.

✅ Deterministic readiness barriers — Both timeout fixtures now establish descendant readiness before starting the measured timeout.

✅ Cleanup behavior reconciled — The new regression covers the group leader, TERM-ignoring descendant, spawn-or-io classification, and exact error-cause preservation.

✅ Strong focused validation — All three process-group cases passed 25 repeated runs, with 11/11 bounded-command tests and 643/643 desktop tests passing.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The change is narrowly scoped, preserves the intended timeout and escalation assertions, and directly resolves the earlier cleanup concern with a passing regression. No current-head failures are reported; the remaining checks are pending.

Score: 9/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 33s
  • Tokens: 28,944 (28,207 in / 737 out)
  • Cost: $0.16

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant