Repository navigation
fix(ci): prevent Security Review checkout retry collisions - #157652
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 24, 2026, 7:04 PM ET / 23:04 UTC. ClawSweeper reviewWhat this changesThe branch gives each Security Review checkout attempt its own directory, stages the successful attempt’s trusted scripts and policy files, and updates the related checks and documentation. Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open. Current main still retries checkout in the same workspace, and the proposed isolation has no concrete correctness finding. The requested SecOps code-owner review remains outstanding. Priority: P2 Review scores
Verification
How this fits togetherSecurity Review handles pull request and CI events using scripts checked out from the trusted default branch. Its resolver selects work for the review job, which publishes security review results. flowchart LR
A[PR or CI event] --> B[Trusted checkout]
B --> C{First attempt succeeds?}
C -->|Yes| D[Primary directory]
C -->|No| E[Retry directory]
D --> F[Stage trusted files]
E --> F
F --> G[Security review result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +67, Docs +6, Config +20, Other +3. Total +96 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the successful trusted checkout as the sole source of staged scripts and policy, with separate directories for the two bounded attempts and the existing fail-closed reporting. Do we have a high-confidence way to reproduce the issue? No high-confidence reproduction of the hosted Git-process collision is available. The cited runs show failed retries, while current source and the new staging test support the isolation mechanism. Is this the best way to solve the issue? Yes. Separate checkout directories and staging from the successful trusted source address the collision without changing checkout authority, permissions, or retry limits. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against daecbc5cf54c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ...
* commit '05edd36e124dc376f63475256f45e82ec437412c': (30 commits) refactor(matrix): reuse bounded direct-room cache insertion (#157775) fix: preserve channel-owner revocation across recovery (#157709) fix(ci): stop blocking CI during release validation (#157757) refactor(tlon): remove unreachable DM summary branches (#157789) chore: speed up worktree recovery tests with Bun (#157674) fix(sessions): release PR caches when pending viewers leave (#157776) refactor(twitch): reuse setup account selection (#157787) test: skip empty task ledger resets in cron fixtures (#157767) perf: reduce gateway and state test startup (#157711) fix: preserve maintenance leases during slow heartbeat renewal (#157696) fix(channels): match non-TTY setup advice to registered flags (#157551) fix: keep failed update report uploads in the CLI (#156633) fix: preserve rejected settings reason when opening config (#157731) test(update): load real filesystem dependencies in swap fixture fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) ...
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ... Co-authored-by: Vincent Koc <[email protected]>
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits) fix(ci): prevent Security Review checkout retry collisions (openclaw#157652) fix(ci): recover interrupted Security Review response bodies (openclaw#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes Security Review checkout retries that fail with file, index, or lock conflicts after the first attempt times out. Observed in this resolver run and this review run.
User Impact
PR security review can recover without reusing the failed checkout's partial files or Git metadata. Permissions, approval requirements, trusted source selection, and the two five-minute attempt limits stay unchanged.
Why This Change Was Made
Each checkout attempt gets its own directory. A successful attempt supplies only the scripts and policy runtime needed at the existing workspace paths, keeping failed-attempt writes away from the running review. The existing Knip entrypoint inventory names the two staged scripts so unused-export analysis can still follow their production imports.
Evidence
CI results
The main CI run completed. Changed-code tests and both dependency and sensitive-code review statuses passed. No observed CI failure is caused by this PR.
The type-check, lint, build, and extension package-boundary failures come from an unrelated import in package-update-npm-pack.ts: it imports the unexported type UpdateStepResult from update-runner-types.ts. This is present in the main revision used for the CI merge; this PR does not change either file. The CI gate is red because those checks failed. Example failure.