Repository navigation
fix(ci): exit outside cyclic exception handlers - #138189
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 7:10 AM ET / 11:10 UTC. ClawSweeper reviewWhat this changesThis PR defers checkout-owner process termination until after Python exception handlers finish, then regenerates the embedded CI workflow copy. Merge readiness⛔ Blocked before merge - 1 item remains No blocking findings. The regenerated workflow copy now matches the canonical checkout-owner action, and the post-handler exit preserves the existing classified statuses; this maintainer-owned PR should remain open for normal exact-head CI handling. Priority: P2 Review scores
Verification
How this fits togetherThe checkout-owner action runs Git checkout work and converts failures into diagnostic output and exit statuses. The CI workflow embeds a generated copy for its early checkout step. flowchart LR
A[Git checkout work] --> B[Checkout owner]
B --> C[Classify failure]
C --> D[Exit after handler]
D --> E[CI job result]
Before merge
Agent review detailsSecurityNone. PR surfaceConfig +2. Total +2 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the single post-handler terminal exit in the canonical owner and its generated workflow projection, with normal exact-head CI validating the affected host path. Do we have a high-confidence way to reproduce the issue? No: the PR supplies a macOS Python 3.9.6 native-process result, but its trace and the upstream CPython source were not independently accessible in this review environment. Source inspection does verify the changed owner boundary and existing cyclic-context subprocess coverage. Is this the best way to solve the issue? Yes: selecting the exit status inside the handlers and raising once after they clear is the narrowest repair; it preserves diagnostic, retry, and exit-status policy while the generator keeps the workflow copy synchronized. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 93d3f565a7a6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
The first CI run caught a missing generated projection: the canonical Python owner was fixed, but the embedded copy in The generator check reproduced the failure before regeneration and now passes. Both affected tooling suites pass: 523 tests, with 34 existing skips. Full changed-file checks pass, and independent review found no actionable P0–P2 defects. The generated change mirrors the reviewed exit handling exactly; it changes no workflow jobs or policy. Total delta is +1 line in the canonical tooling source and +1 generated line; production and test source are unchanged. |
|
Resolved the Before merge dependency-inspection item: I personally read CPython 3.9.6 The actual unchanged checkout owner on The first CI run also hit an unrelated service-child lifecycle observation deadline. Its unchanged 24-test native suite passes; the exact failed CI job is being rerun, and landing remains contingent on green checks. |
215af28 to
edf0318
Compare
Reduce unrelated host-process enumeration during owned Git cleanup while preserving zombie handling, native observation failures, cancellation, and terminal fencing. Keep the initial absent-group fast path and validate native group/session selection with real-process regression coverage. Controlled native Mac proof reduced system CPU by about 23% with only a modest wall-time change. Current-base owner/platform tests pass without altered watchdogs or assertions. Related: #138034, #138189.
Reduce unrelated host-process enumeration during owned Git cleanup while preserving zombie handling, native observation failures, cancellation, and terminal fencing. Keep the initial absent-group fast path and validate native group/session selection with real-process regression coverage. Controlled native Mac proof reduced system CPU by about 23% with only a modest wall-time change. Current-base owner/platform tests pass without altered watchdogs or assertions. Related: #138034, #138189.
* fix(ci): exit outside cyclic exception handlers * fix(ci): regenerate the cyclic-error-safe Git owner
Reduce unrelated host-process enumeration during owned Git cleanup while preserving zombie handling, native observation failures, cancellation, and terminal fencing. Keep the initial absent-group fast path and validate native group/session selection with real-process regression coverage. Controlled native Mac proof reduced system CPU by about 23% with only a modest wall-time change. Current-base owner/platform tests pass without altered watchdogs or assertions. Related: openclaw#138034, openclaw#138189.
What Problem This Solves
On macOS Python 3.9.6, a cyclic exception context lets the Git checkout owner print its redacted diagnostic but hang when raising
SystemExitinside the handler. The same problem affects terminal fetch-timeout and Git-failure exits. Python's implicit exception chaining traverses that cycle while attaching the new exit exception.Why This Change Was Made
Choose the terminal exit code in the existing handlers, then raise it after the active exception has been cleared. Success stays 0, fetch timeout stays 124, Git failure keeps its own code, and ownership/setup failure stays 125. Diagnostic redaction, checkout fencing, cancellation, cleanup and retry policy are unchanged.
User Impact
Failed checkouts terminate promptly with the original diagnostic and documented exit status on the system Python shipped with affected macOS hosts.
Evidence
/usr/bin/python33.9.6: self-contextPermissionError,FetchTimeoutandGitFailureeach exceeded the bounded process deadline. Successful and ordinary-failure controls returned their expected codes.ci-platform-checkout.test.tspass, including the existing cyclic-context regression, diagnostic redaction, ownership/cancellation and cleanup contracts.Dependency source was inspected directly: CPython 3.9.6 implicit exception chaining. No Python upgrade, timeout increase, or weakened assertion is required. Tooling delta: +6/-5, net +1 including the explanatory comment; tests unchanged.