Repository navigation
Conversation
…apture Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the macOS measurements and the red-first test. This is on the crew's pick-up list: a crew lane will rebuild it on current main and credit you as co-author when it lands, then close this PR. |
|
Thanks @vilano93. Your report and measurements led to the fix in #4170, which merged as 1e25057 and credits you as co-author. #4170 takes a slightly different approach from this PR. It doesn't treat EPERM on macOS as "gone" outright. Instead, after an EPERM it checks the process group itself: We couldn't run macOS on our side. The teardown state is inferred from XNU and |
Why (in your own words)
On macOS,
gstack-qa-evidence capturesometimes records a successful command asstatus: incomplete,exitCode: 2. The QA chain then refuses--afteron that capture, so /ship's exploratory QA stalls on a command that worked. The cause is the cleanup kill inrunQaDeadlineCommand: after the child exits, it signals the process group and treats everything exceptESRCHas a containment failure. While an exited group is still being torn down, macOS can answerEPERM. This change treatsEPERMon macOS the same asESRCHfor that kill. Every other error, andEPERMon other platforms, still fails closed.Live evidence
The kill error, measured directly: 14 runs of a multi-threaded Rust CLI that exits 0, with the same detached spawn and
process.kill(-pid, 'SIGKILL')on theexitevent:The same program through
gstack-qa-evidence capture --public --deadline ...(the program itself exits 0 when run directly):The new test was red first (
processGroupAlreadyGonein place, still only acceptingESRCH), then green:The 4-5 failures on main are existing
qa-deadlinetests (timeout and interruption closing the owned process tree). They pass with this change, so they appear to hit the sameEPERM.Scope
lib/qa-deadline.ts: newprocessGroupAlreadyGone(code, platform), used by the group kill.test/qa-deadline.test.ts:EPERMis tolerated on macOS only; other errors and other platforms still fail closed.changelog.d/fix-qa-deadline-macos-group-kill.md: the changelog fragment.bun run typecheckclean;bun run typecheck:test"812 known diagnostics, none new";bun run buildpasses.gstack-checksreported the selection as too broad (1711 files), so I ran the qa-deadline and qa-evidence tests.test/qa-evidence*.test.tsstill has 5 failures on this Mac. All 5 also fail on clean main, which has 7 there.EPERMcannot be told apart from teardown.lib/claude-code.ts:100has a similar group kill with the sameESRCHcheck. I did not reproduce a failure there.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)🤖 Generated with Claude Code