Skip to content

fix(ci): provision ripgrep for native grep tests - #132609

Merged
obviyus merged 2 commits into
mainfrom
codex/ci-native-rg
Aug 29, 2026
Merged

obviyus merged 2 commits into
mainfrom
codex/ci-native-rg

Conversation

@obviyus

@obviyus obviyus commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Mark the one Node test shard that runs the real native grep fixture.
  • Install the ripgrep package only when that Linux runner does not already provide it.
  • Keep every other Node shard free of the added setup work.

Problem

Hosted reruns of checks-node-compact-large-8 fail six grep-context tests before they reach the asserted behavior. The fixture intentionally enables offline mode, but the selected GitHub-hosted runner does not provide rg.

The same infrastructure failure blocked multiple otherwise-ready pull requests.

Root cause

The test correctly requires a real preinstalled ripgrep binary while download is disabled. The CI planner did not declare that system dependency, so the requirement was accidental runner-image state.

Fix

The manifest now marks full, compact Blacksmith, compact GitHub, and targeted plans when they contain src/agents/sessions/tools/index.test.ts. The Linux test job checks for rg and uses apt only for that marked shard when installation is necessary.

Proof

  • Red: run 33253272913, job 99105379881 failed all six cases with Native grep fixture requires a working ripgrep executable.
  • Planner probe: each tested planner mode marks exactly one shard; the GitHub pull-request profile selects checks-node-compact-large-8, matching the failed live job.
  • Green: run 33255811918 attempt 3, hosted job 99111293204 ran on ubuntu-24.04, installed ripgrep, and passed the marked native-grep shard.
  • node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts
  • node --import tsx scripts/check-workflows.mts
  • node scripts/docs-list.js
  • Oxfmt and git diff --check

The hosted exact-head CI run for this pull request is the green live proof because runner package state exists only inside GitHub Actions.

Test audit

The retained fixture protects public grep argument validation and real ripgrep JSON behavior for omitted, integer, fractional, and negative context values. Mocked operations do not cover that dependency contract. This change provisions its declared dependency without weakening or replacing the test.

LOC

  • Production: 0
  • CI workflow: +22
  • Docs: +4
  • Test guard: +12

@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS maintainer Maintainer-authored PR labels Aug 29, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 10:37 AM ET / 14:37 UTC.

ClawSweeper review

What this changes

The PR marks Node CI shards that execute the native grep fixture and conditionally installs ripgrep on only those Linux runners.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open: this remains a necessary, focused CI repair and source review found no actionable defect. The exact-head matrix is still running, so it is not yet ready to merge.

Priority: P2
Reviewed head: a2950da55525cd5c996f83c87276c8570b79444d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-consistent CI repair with relevant hosted before/after evidence; exact-head CI is the remaining merge gate.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed production owner is the Node CI shard job, reached from the preflight matrix; the PR's linked hosted ubuntu-24.04 run records ripgrep installation followed by a passing native-grep shard, directly demonstrating recovery from the failed runner-image state.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed production owner is the Node CI shard job, reached from the preflight matrix; the PR's linked hosted ubuntu-24.04 run records ripgrep installation followed by a passing native-grep shard, directly demonstrating recovery from the failed runner-image state.
Evidence reviewed 7 items Introduced workflow behavior: The introduced matrix field marks direct targets, explicit include-pattern shards, and unsplit or grouped agents-support plans that can execute the fixture; the install step runs before the Node shard runner.
Fixture dependency boundary: The existing fixture explicitly resolves rg while offline and fails if no executable is present before exercising ripgrep JSON output, so provisioning belongs at the CI runner boundary rather than in test behavior.
Planner sibling coverage: The planner defines agents-support as a whole-config shard, and its hosted splitter materializes a complete non-overlapping include-pattern partition; this matches the PR's two detection forms.
Findings None None.
Security None None.

How this fits together

The CI preflight planner turns test selections into a Node-shard matrix, whose runners then execute the assigned Vitest plans. The native grep fixture runs within the agents-support test surface and needs a working ripgrep executable when offline mode prevents downloading it.

flowchart LR
  A[Test selection] --> B[CI preflight planner]
  B --> C[Node shard matrix]
  C --> D[Conditional Linux setup]
  D --> E[Native grep fixture]
  E --> F[Shard result]
Loading

Before merge

  • Resolve merge risk (P1) - The changed setup adds a conditional package-manager dependency to selected CI jobs; exact-head matrix completion is still needed to confirm all current runner profiles remain healthy.
Agent review details

Security

None.

PR surface

Tests +12, Docs +4, Config +22. Total +38 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 12 0 +12
Docs 1 4 0 +4
Config 1 22 0 +22
Generated 0 0 0 0
Other 0 0 0 0
Total 3 38 0 +38

Review metrics

Metric Value Why it matters
Production versus validation delta production runtime +0; CI workflow +22; docs +4; test guard +12 The repair adds no product runtime behavior; all growth declares and guards CI-only dependency setup.

Merge-risk options

Maintainer options:

  1. Require exact-head CI completion (recommended)
    Let the current exact-head matrix finish before merging so the planner and selected-runner setup are validated across active CI profiles.
  2. Accept the remaining matrix uncertainty
    Merge based on the linked successful hosted native-grep run while accepting that the broader refreshed matrix has not yet completed.

Technical review

Best possible solution:

Retain the matrix-owned dependency declaration and conditional install, then merge after the exact-head CI matrix completes successfully.

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

Yes, from source and linked runner evidence: offline fixture setup fails when rg cannot be resolved, and the PR body records the hosted failure and the post-install passing shard. The reviewer did not execute repository code locally.

Is this the best way to solve the issue?

Yes. The planner owns knowledge of which shard runs the fixture, and the runner step installs the executable only for that marked Linux path without changing fixture behavior or other shards.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f5eea3197c55.

Labels

Label justifications:

  • P2: This repairs a bounded CI test-shard failure without a user-facing runtime regression.
  • merge-risk: 🚨 automation: The change modifies high-fanout GitHub Actions matrix metadata and runner package setup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed production owner is the Node CI shard job, reached from the preflight matrix; the PR's linked hosted ubuntu-24.04 run records ripgrep installation followed by a passing native-grep shard, directly demonstrating recovery from the failed runner-image state.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the Node CI shard job, reached from the preflight matrix; the PR's linked hosted ubuntu-24.04 run records ripgrep installation followed by a passing native-grep shard, directly demonstrating recovery from the failed runner-image state.

Evidence

What I checked:

  • Introduced workflow behavior: The introduced matrix field marks direct targets, explicit include-pattern shards, and unsplit or grouped agents-support plans that can execute the fixture; the install step runs before the Node shard runner. (.github/workflows/ci.yml:1255, a2950da55525)
  • Fixture dependency boundary: The existing fixture explicitly resolves rg while offline and fails if no executable is present before exercising ripgrep JSON output, so provisioning belongs at the CI runner boundary rather than in test behavior. (src/agents/sessions/tools/index.test.ts:170, a2950da55525)
  • Planner sibling coverage: The planner defines agents-support as a whole-config shard, and its hosted splitter materializes a complete non-overlapping include-pattern partition; this matches the PR's two detection forms. (scripts/lib/ci-node-test-plan.mts:2207, a2950da55525)
  • Workflow guard: The changed guard verifies the manifest marker, conditional install command, and ordering before the shard execution step. (test/scripts/ci-workflow-guards.test.ts:9008, a2950da55525)
  • Real CI proof: The PR body links a failed hosted native-grep shard and a subsequent ubuntu-24.04 run that installed ripgrep and passed the marked shard; this is the relevant production boundary for runner-image package state. (7dd2e4dea2dd)
  • Current-main and refresh provenance: The current PR head is a merge refresh with the original CI-fix commit as one parent and the fetched main SHA as the other, so the introduced repair is not yet on the reviewed main parent. (.github/workflows/ci.yml:2917, a2950da55525)

Likely related people:

  • Peter Steinberger: Recent history contains repeated CI workflow and shard-planning maintenance, including the adjacent native-test resource isolation work. (role: recent CI planner and workflow contributor; confidence: high; commits: 651c1ec27488, ef18511a0a56, dc9405e9b2d3; files: .github/workflows/ci.yml, scripts/lib/ci-node-test-plan.mts)
  • obviyus: Prior merged compact-PR shard-planning work and the current repair both cover this planner surface. (role: prior CI planner contributor; confidence: high; commits: f5060701881b, 7dd2e4dea2dd; files: .github/workflows/ci.yml, test/scripts/ci-workflow-guards.test.ts)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-29T13:50:07.823Z sha 7dd2e4d :: needs maintainer review before merge. :: none
  • reviewed 2026-08-29T14:21:44.620Z sha 7dd2e4d :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 29, 2026
@obviyus
obviyus merged commit 8d30790 into main Aug 29, 2026
172 checks passed
@obviyus
obviyus deleted the codex/ci-native-rg branch August 29, 2026 14:40
@obviyus

obviyus commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @rz467fzs7d and @Lockyer228!

Proof: The original hosted shard failed all six native grep cases because rg was unavailable. On the repaired exact workflow, GitHub-hosted Ubuntu installed ripgrep and passed the marked shard. Fresh exact-head CI and immutable ClawSweeper also passed.

  • Bug: Hosted reruns depended on undocumented runner-image state and could fail before the grep behavior was tested.
  • Fix: The planner declares the real fixture dependency and provisions it only for that Linux shard.

Example

Before After
Offline grep tests fail because rg is absent. The marked shard installs ripgrep and runs the real tests.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 30, 2026
Hosted reruns could execute the offline native-grep fixture on a runner without ripgrep, so otherwise-correct pull requests failed before the tested behavior ran.

The CI planner now marks the exact shard that owns the real ripgrep fixture. That Linux job installs the package only when its runner image does not already provide it; every other shard keeps its existing setup path.

Co-authored-by: Ayaan Zaidi <[email protected]>
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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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