Repository navigation
fix(ci): retain redacted Git ownership failure context - #138034
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 3:42 AM ET / 07:42 UTC. ClawSweeper reviewWhat this changesAdds bounded, redacted exception details to CI Git process failures, updates the generated workflow copy, and documents and tests the diagnostic output. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: current main lacks these diagnostics, and the related merged PRs solve different problems. No blocking correctness or security defect was identified. Priority: P2 Review scores
Verification
How this fits togetherThe CI Git process owner runs checkout and fetch commands while controlling child-process cleanup. Its terminal error boundary supplies failure annotations and exit codes to GitHub Actions. flowchart TD
A[CI checkout or fetch policy] --> B[Git process owner]
B --> C[Git and operating system]
C --> D[Terminal exception]
D --> E[Bounded redacted diagnostics]
E --> F[CI annotation and diagnostic log]
D --> G[Exit 125]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +228, Docs +2, Config +106. Total +336 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one bounded redacting formatter at the terminal owner boundary, with native confirmation that failure locations become distinguishable while existing exits and cleanup behavior remain intact. Do we have a high-confidence way to reproduce the issue? Not applicable as a new diagnostic capability; current source confirms the information gap, while the underlying historical Windows failure remains unattributed. Is this the best way to solve the issue? Yes: the terminal owner already holds the exception chain, making it the appropriate observation boundary. Raw traceback formatting would expose sensitive text, while per-operation phase wrappers would unnecessarily alter lifecycle code. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 57b86b840158. LabelsLabel changes:
Label 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
|
|
Native candidate proof is complete for Windows test-2 job 100948069217 passed all 14 new diagnostic cases and the existing platform lifecycle cases. The log records test merge
These are values asserted by the actual Windows CLI tests; the payload is captured and checked inside the test process, not dumped wholesale into the log. The job shows the setup, launch, and timeout-drain cases passing at 07:50:49 UTC on September 4. Redaction, numeric bounds, cause ordering, frame provenance, and diagnostic-failure exit preservation also passed. This does not attribute the original historical Windows failure. The complete first CI attempt failed only the npm production audit and aggregate gate. After a later main security job obtained results with an identical audit implementation and lockfile, I requested one failed-job-only recovery on this unchanged head. Attempt 2 completed successfully; the exact-head CI rollup is green. The recovered security job completed the audit at 08:11:39 UTC. No audit bypass, timeout/retry-policy change, or bootstrap behavior change was made. The PR body now contains the proof and successful gate status. |
|
Merged via squash.
|
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.
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.
Related: native Talk CI bootstrap investigation, specifically the original Windows checkout failure.
Additional instructions
Maintainers can update this same-repository branch.
What Problem This Solves
Resolves a problem where maintainers investigating a failed CI checkout could not distinguish process setup, launch, or cleanup failures: all could collapse to
Git ownership/setup failed (PermissionError); refusing reuse or retry, exit 125. A cleanup exception could also hide an earlier operation timeout. Approximately 90 seconds of elapsed time did not establish which path failed.This repairs the diagnostic gap, not the still-unattributed cause of the original Windows failure. The separate public pre-commit clone dependency was already removed by the network-free security-fast hook repair; this PR does not change hook pins or authentication.
Why This Change Was Made
Use exception evidence already present at the terminal owner boundary instead of adding phase state or wrappers around every operation. Retain the fail-closed annotation and exit 125, then emit a bounded redacted exception chain with known type identifiers, numeric
errno/winerror, and proven owner-code function/line locations. Policy frames, data-derived names, messages, paths, arguments, commands, environment, headers, and credentials are excluded; diagnostic failure cannot replace the authoritative exit.Every existing owner lifecycle function remains AST-identical. Job Object flags, process ownership, cleanup ordering/deadlines, cancellation precedence, retries, lock reclamation, and repository-scoped checkout authentication are unchanged. The one inline workflow copy is regenerated from the maintained owner.
Production: +55/-2 (net +53); generated projection: the same +55/-2 once; tests: +228/-0; docs: +2/-0. Growth is the new bounded observation capability, isolated to terminal formatting rather than distributed lifecycle state. There is no obsolete lifecycle path to delete without changing the protected contract.
User Impact
CI maintainers can identify the failing owner call site and numeric OS error, and see a real timeout when one is present in the exception chain, without exposing sensitive diagnostic text. Existing failures remain failures; uncertain cleanup still fences the owner. A passing rerun is not presented as proof of the original cause. There is no bot/runtime feature or configuration change.
Evidence
node scripts/run-vitest.mjs test/scripts/ci-platform-checkout.test.ts test/scripts/ci-security-fast-workflow.test.ts— 80 passed.node scripts/run-vitest.mjs test/scripts/ci-git-owner.test.ts -t 'keeps exactly|binds read-only|preserves linked|generic Git|unexpected policy exception'— 5 passed.node scripts/check-changed.mjs -- .github/actions/git-owner/owner.py .github/workflows/ci.yml docs/ci.md test/scripts/ci-platform-checkout.test.tspassed, including full root-test typechecking and selected lint/guards. Generator parity, actionlint, formatting, Python 3.9 grammar/AST preservation, andgit diff --checkpassed. Independent autoreview was scoped-clean at P0.Native candidate proof completed
Exact-head CI run 33849195943, head
595044d7651526c2cc70ec397ef98269c4c74dc2, completed both Windows jobs and all three macOS Node jobs successfully. Windows test-2 job 100948069217 executed all 14 new native diagnostic cases, including the real setup, launch, and timeout-drain failures, at 07:50:48–07:50:49 UTC on September 4. Existing platform lifecycle cases passed too.The job log records checkout of test merge
401433059ee6f5b45578112180be4d2e1ac40673. Its owner SHA-256 is7184aee343854a2c44a92d0196911b47415fd5cceae23de8016e133e2d9032af, byte-identical to the reviewed candidate. The tests capture and assert the diagnostic payload rather than dumping it: native errno 13/winerror 5; setup/launch PermissionError; timeout-drain terminal RuntimeError with PermissionError and genuine FetchTimeout context; positive owner-source frame locations; preserved exit 125; and bounded, redacted output. This is actual candidate-native execution, not the unmodified baseline or an unexecuted Testbox attempt. It addresses the fresh ClawSweeper native-proof request and rank-up move. It does not establish the original incident's cause.CI recovery status
The first complete CI attempt failed only
security-fast's production dependency audit and its aggregate gate. npm bulk did not return complete advisory results within the existing 240-second budget; no audit clearance was obtained. All other selected jobs passed. A single unchanged local recovery probe also returned incomplete/exit 2; no policy, deadline, payload, or assertion was weakened.A later main-branch security job 100953350038 successfully obtained npm bulk results at 07:57:05 UTC. Its lockfile and audit implementation have the same Git blob IDs as this PR (
2a435324ebc072a9d3bf672a84ca0c040cbf1053ande359d4f6db79114c11fb1f48a2edef75be62cb1d). On that newer recovery evidence, one failed-job-only recovery was requested for the unchanged PR head. Attempt 2 completed successfully; the exact-head CI rollup is green. Security-fast job 100956399903 completed the unchanged audit successfully at 08:11:39 UTC. This is operational recovery, not a root-cause claim or a retry-until-green loop. The audit remains fail-closed; no source or policy change was made to obtain this result.