Repository navigation
fix(qa): stop lifecycle CI failing on reused PGIDs - #123161
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 11:23 PM ET / August 21, 2026, 03:23 UTC. ClawSweeper reviewWhat this changesRemoves a post-settlement descendant-PID probe and forced cleanup fallback from the QA Lab POSIX lifecycle test. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open. The test-only fix is still needed on current main and correctly relies on the lifecycle owner’s recorded settlement result; it needs refreshed merge-result validation before landing. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherQA Lab launches scenario commands in POSIX process groups, settles their cleanup, and returns captured output plus any settlement failure. The changed test verifies that final result to keep CI reliable under PID reuse. flowchart LR
A[Scenario command] --> B[Lifecycle wrapper]
B --> C[POSIX settlement owner]
C --> D[Group cleanup verification]
D --> E[Final command result]
E --> F[QA lifecycle test]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -6. Total -6 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or validate the merge result, then retain the final lifecycle result as the sole proof for original-process-group cleanup while preserving explicit cleanup for deliberately detached descendants. Do we have a high-confidence way to reproduce the issue? Yes. Current source proves that a settlement failure reaches the exact result assertion, while the removed later numeric PID operation can target a reused identity; the PR also reports an exact-head real-process run. Is this the best way to solve the issue? Yes. The shared settlement owner already owns verification of the original process group, and the sibling test keeps direct cleanup only where a descendant intentionally escapes that owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 59e9765e7779. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
0b15dce to
93b62b8
Compare
|
Rebased onto current main and deliberately reconciled the rewritten descendant-PID assertion at exact head Evidence:
@clawsweeper re-review |
93b62b8 to
e1450f4
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Follow-up at Proof at this head:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* test(qa): avoid reused PGID lifecycle assertion * test(qa): drop reused PID cleanup fallback
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where the QA scenario-command lifecycle test could fail after a clean process-group settlement when concurrent CI reused the released numeric PGID or descendant PID for an unrelated process.
Why This Change Was Made
The real-process regression now treats the lifecycle owner's exact public result as the cleanup proof. A settlement that still observes the original process group records a settlement failure, so the later bare-identity probes duplicated that contract after process identity was no longer owned.
Polling the descendant PID instead would retain the same reuse race and would also misclassify zombie-only cleanup on Linux. Changing production ownership was rejected because production does not perform the failing post-settlement poll.
Best-fix verdict: remove the test-only identity-invalid assertion and its PID-based cleanup fallback while retaining the real inherited-stdio output, leader result, bounded settlement, and absence-of-settlement-failure checks.
User Impact
Maintainers get reliable QA lifecycle CI under concurrent process churn. There is no production or end-user runtime change.
Evidence
test-file-scenario-command-lifecycle.test.ts:156; its permitted exact-job rerun reproduced the same bare-PGID assertion.tbx_01kzxdkwm5xm5ekzx8kbap7hz8: 8/8 lifecycle tests passed, including the real inherited-stdio leader/descendant case.$autoreview --mode branch --base origin/main: TruffleHog clean, no accepted/actionable findings, patch-correct confidence 0.99.AI-assisted; the implementation, current-main owner path, history, fail-first CI, and validation evidence were inspected directly.