Skip to content

fix(ci): recover security review from inconsistent file lists - #155129

Merged
joshavant merged 1 commit into
mainfrom
fix/security-review-file-list-recovery
Sep 21, 2026
Merged

joshavant merged 1 commit into
mainfrom
fix/security-review-file-list-recovery

Conversation

@joshavant

@joshavant joshavant commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #155109

What Problem This Solves

Security Review can leave a PR red when GitHub's reported changed-file count and returned file list temporarily disagree. The failed evaluation also caches the incomplete list for the second guard and incorrectly tells the author to split the PR.

User Impact

Transient inconsistencies recover automatically in the same workflow run. Incomplete file lists and changes to the PR's head, target branch, or author still prevent approval.

Why This Change Was Made

The shared file-list reader retries after one, two, and four seconds, rereads PR metadata, and fetches each list again from page one. Both guards share the validated snapshot or exhausted recovery result. Persistent failures report the expected, returned, and current counts. Consistent reads incur no additional API requests.

Evidence

  • Observed failure on #155109: the same head now returns 42 expected and 42 actual files; the original mismatching counts were not logged.

  • Four entry-point regression cases failed on the original code. Recovery, pagination, approval enforcement, changed-head/target rejection, and bounded failure now pass.

  • All 186 focused guard tests pass. Changed test-file times: combined review 7.62 s; security-sensitive guard 5.28 s. The three-file suite completed in 15.59 s.

  • Independent review found no actionable P0–P2 issues.

  • Changed-file checks passed, including formatting, root test typechecking, lint, and dead-code scans; git diff --check passed.

  • Hosted CI passed, including all 186 focused guard cases. CI reported summed test times of 12.33 s for combined review and 8.68 s for the security-sensitive guard.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@joshavant
joshavant marked this pull request as ready for review September 21, 2026 19:42
@joshavant
joshavant requested a review from a team as a code owner September 21, 2026 19:42
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 21, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 21, 2026, 3:50 PM ET / 19:50 UTC.

ClawSweeper review

What this changes

Adds bounded retries for inconsistent GitHub changed-file lists, shares the result between security guards, and documents and tests recovery.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The fix remains useful: current main still rejects transient file-list inconsistencies without recovery. No actionable introduced defect was found.

Priority: P2
Reviewed head: 625c1b1d4123e44d96cee58a0ca75ea093a7a86d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused shared-owner repair with meaningful regression coverage and no identified blocking code defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This collaborator-authored internal CI repair is exempt from external-contributor proof. Mocked GitHub entrypoint scenarios cover the changed reader; the linked historical workflow establishes incident context, not after-fix recovery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This collaborator-authored internal CI repair is exempt from external-contributor proof. Mocked GitHub entrypoint scenarios cover the changed reader; the linked historical workflow establishes incident context, not after-fix recovery.
Evidence reviewed 7 items Introduced patch and merge ownership: Reviewed the pinned merge-base-to-head diff. The verified test merge has the fetched main followed by the original PR head as parents, and its guard-helper delta matches the introduced change.
Current-main necessity and release boundary: Fetched main still caches the first file list and immediately throws on a count mismatch. The latest supplied release, v2026.9.5, does not contain this guard helper; no shipped or merged replacement for this recovery was established.
Recovery preserves approval boundaries: Only changed-file count may settle during recovery. Head, target, author and other snapshot fields remain checked; successful recovery requires matching list and metadata counts. Both guards retain approval checks, and combined status publication rereads authority. No new principal exemption or reusable authorization is introduced.
Findings None None.
Security None None.

How this fits together

Security Review reads PR metadata and changed files to determine dependency and security approval requirements. Its decisions feed the commit status that gates merging.

flowchart TD
  A[PR metadata and changed files] --> B[Shared file-list reader]
  B --> C{Complete and consistent?}
  C -->|No| D[Bounded retry and metadata check]
  D --> B
  D -->|Exhausted or PR changed| E[Review fails]
  C -->|Yes| F[Dependency and security guards]
  F --> G[Approval and CI merge status]
Loading

Before merge

  • Complete next step (P2) - Obtain independent openclaw/openclaw-secops code-owner approval for the changed security-review enforcement helper.
Agent review details

Security

None.

PR surface

Tests +60, Docs +6, Other +32. Total +98 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 71 11 +60
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 1 41 9 +32
Total 4 118 20 +98

Review metrics

Metric Value Why it matters
Recovery budget 4 complete reads; 7 seconds of scheduled backoff Both guards share one recovery result, preventing the second guard from restarting the retry budget.

Technical review

Best possible solution:

Keep recovery in the shared file-list owner, with bounded retries and unchanged approval enforcement.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: a transient mismatch immediately fails current main and caches the incomplete list for the sibling guard. The new entrypoint fixtures exercise that path; this review did not execute them.

Is this the best way to solve the issue?

Yes. Retrying complete reads in the existing shared owner avoids duplicated recovery while preserving identity checks and approval requirements.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8c56f7239e98.

Labels

Label changes:

  • add P2: Repairs a bounded CI review reliability defect without changing product runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This collaborator-authored internal CI repair is exempt from external-contributor proof. Mocked GitHub entrypoint scenarios cover the changed reader; the linked historical workflow establishes incident context, not after-fix recovery.

Label justifications:

  • P2: Repairs a bounded CI review reliability defect without changing product runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This collaborator-authored internal CI repair is exempt from external-contributor proof. Mocked GitHub entrypoint scenarios cover the changed reader; the linked historical workflow establishes incident context, not after-fix recovery.

Evidence

What I checked:

  • Introduced patch and merge ownership: Reviewed the pinned merge-base-to-head diff. The verified test merge has the fetched main followed by the original PR head as parents, and its guard-helper delta matches the introduced change. (scripts/github/guard-review.mjs:57, 625c1b1d4123)
  • Current-main necessity and release boundary: Fetched main still caches the first file list and immediately throws on a count mismatch. The latest supplied release, v2026.9.5, does not contain this guard helper; no shipped or merged replacement for this recovery was established. (scripts/github/guard-review.mjs:117, 8c56f7239e98)
  • Recovery preserves approval boundaries: Only changed-file count may settle during recovery. Head, target, author and other snapshot fields remain checked; successful recovery requires matching list and metadata counts. Both guards retain approval checks, and combined status publication rereads authority. No new principal exemption or reusable authorization is introduced. (scripts/github/guard-review.mjs:42, 625c1b1d4123)
  • Regression coverage and validation limits: Six added entrypoint scenarios cover partial lists, stale counts, incomplete pagination with missing approval, changed head, changed target, and exhausted shared recovery. The fixture replaces fetch and advances a child-process clock. The captured PR body reports 186 passing focused tests and measured file times; tests were inspected but not executed during this read-only review. Diff whitespace checks passed. (test/scripts/security-review-script.test.ts:140, 625c1b1d4123)
  • Reported incident and related proof: The linked workflow's first attempt failed at Enforce security review; attempt two succeeded. Original job logs could not be inspected because their Azure download host was blocked. The captured body acknowledges that the original mismatching counts were not logged. Downloaded screenshots were inspected and show the related translation change, not this retry behavior.
  • Required independent code-owner approval: CODEOWNERS assigns the changed helper to openclaw/openclaw-secops. CONTRIBUTING.md requires independent SecOps approval even for maintainer-authored enforcement changes. Live main rules require code-owner review, and the PR reviews endpoint returned an empty array. (.github/CODEOWNERS:26, 625c1b1d4123)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • openclaw/openclaw-secops: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@joshavant
joshavant merged commit 9d5c532 into main Sep 21, 2026
140 of 141 checks passed
@joshavant
joshavant deleted the fix/security-review-file-list-recovery branch September 21, 2026 20:00
vincentkoc added a commit that referenced this pull request Sep 21, 2026
* commit '3d4033fbe0aca10c9eec45a7c088540607181d79': (42 commits)
  fix(windows): prevent update readiness failures on fractional timeouts (#155051)
  fix(test): await approval readiness and request cleanup (#155111)
  test(update): preserve published plugin archives in survivor fixtures (#155093)
  fix(ci): recover security review from inconsistent file lists (#155129)
  fix(crabbox): skip unused startup and preserve provisioning waits (#154321)
  fix(qa-lab): refresh Control UI links on URL updates (#152397)
  fix(maintainer): recover locally refused auto-merge requests (#154988)
  test(ui): advance debug tray polling with the browser clock (#155091)
  fix(snapshot): preserve concurrently recovered backups (#155075)
  fix(anthropic): preserve context-window-limited responses (#155029)
  fix(ui): stop redundant actions crowding mobile session titles (#154493)
  test(gateway): compare large buffers with native assertions (#154351)
  chore(ci): resync pull request head after the Actions incident
  fix: join local provider child cleanup before releasing ownership
  fix(test): isolate MXC host environment fixtures
  fix(test): prevent Windows worker pipe inheritance
  test(update): use supported reasoning in live survivor probe (#155085)
  fix(firecrawl): omit impossible publication dates from search results (#155032)
  fix(sessions): order WAL recovery and join probe release
  fix(logs): retain severity and subsystem from JSON console records (#153890)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant