Repository navigation
fix(ci): provision ripgrep for native grep tests - #132609
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 10:37 AM ET / 14:37 UTC. ClawSweeper reviewWhat this changesThe PR marks Node CI shards that execute the native grep fixture and conditionally installs ripgrep on only those Linux runners. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +12, Docs +4, Config +22. Total +38 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Thanks @rz467fzs7d and @Lockyer228! Proof: The original hosted shard failed all six native grep cases because
Example
|
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]>
Summary
ripgreppackage only when that Linux runner does not already provide it.Problem
Hosted reruns of
checks-node-compact-large-8fail six grep-context tests before they reach the asserted behavior. The fixture intentionally enables offline mode, but the selected GitHub-hosted runner does not providerg.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 forrgand usesaptonly for that marked shard when installation is necessary.Proof
Native grep fixture requires a working ripgrep executable.checks-node-compact-large-8, matching the failed live job.ubuntu-24.04, installed ripgrep, and passed the marked native-grep shard.node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.tsnode --import tsx scripts/check-workflows.mtsnode scripts/docs-list.jsgit diff --checkThe 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
0+22+4+12