Repository navigation
fix: remove unavailable OpenGrep install alternatives - #130585
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 10:01 PM ET / August 27, 2026, 02:01 UTC. ClawSweeper reviewWhat this changesUpdates the local OpenGrep scan script’s missing-binary diagnostic to retain the pinned official installer and remove unavailable Homebrew and PyPI alternatives, with a subprocess regression test. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThis PR remains necessary: current main still tells local users to install unavailable OpenGrep alternatives, while the branch removes only those dead-end instructions and adds boundary-level coverage. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe local OpenGrep wrapper selects scan paths and invokes the scanner for developers and CI. Its early missing-binary branch is the local operator’s installation guidance before any scan output is created. flowchart LR
A[Developer runs local scan] --> B[OpenGrep wrapper]
B --> C{Binary on PATH?}
C -- No --> D[Installation diagnostic]
D --> E[Supported installer guidance]
C -- Yes --> F[Scan selected paths]
F --> G[Terminal or SARIF output]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +31, Other -2. Total +29 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the narrow diagnostic repair after the normal exact-head CI and mergeability gates complete, keeping the existing pinned installer as the single supported recommendation. Do we have a high-confidence way to reproduce the issue? Yes—current main contains the exact stale diagnostic, and the added isolated-PATH subprocess test directly exercises the missing-binary branch; this read-only review did not execute it. Is this the best way to solve the issue? Yes—the patch fixes the message at its producing boundary and leaves scanning, output handling, and the existing pinned installer unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 96ea1e33ea63. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof for reviewed head The missing-dependency diagnostic was the owner of the invalid advice: it advertised an unavailable PyPI package and Homebrew tap. Removing those two alternatives is the canonical fix; replacing the installer or adding fallback logic would widen this diagnostic-only repair. The official pinned v1.27.1 installer is unchanged, as are all script bytes outside the diagnostic. Production/tooling: +1/-3 (net -2); tests: +31/-0. Dependency pins and scan behavior are untouched. Validation:
Current-main check: the two affected files remain identical to the original pre-fix files at fetched main Proof scope: no publisher installer was executed and no broad local build/full suite was needed for this text-only production change. The real missing-tool flow, live publisher endpoints, existing scan-wrapper boundary tests, and hosted OpenGrep scan cover the changed contract and its sibling paths. ClawSweeper currently has a review-started placeholder, not a verdict or Rank-up moves. Feedback will be checked again immediately before merge; pending review publication is not counted as approval. Live rules show no enforced independent-review requirement, and the maintainer role is explicitly exempt from the Clownfish binding rule. The CI gate is green; no rules or bypass settings were changed. Proceeding through the repository-native prepare/merge flow. |
|
Reviewed the newly published ClawSweeper review at the unchanged head Two generated proof notes do not require source changes:
There is no Rank-up moves list or concrete source repair requested. The existing land-ready proof covers the changed owner boundary, current-main behavior, upstream checks, and exact-head gates. Proceeding with the repository-native prepare/merge flow without source changes or gate bypasses. |
|
Merged via squash.
|
Reuse the existing production-path scope for persistence detection so test fixture writes do not request migration proof. Preserve production, rename, semantic documentation, and unknown-evidence detection. Includes the diagnostic-only diff from openclaw/openclaw#130585 as regression evidence; the already-landed OpenGrep fix is unchanged.
Additional instructions
Maintainers can edit this same-repository branch.
What Problem This Solves
Fixes an issue where developers running the local OpenGrep scan without OpenGrep installed would receive installation commands for an unavailable PyPI package and an unavailable Homebrew tap.
The diagnostic still recommended
pipx install opengrepandbrew install opengrep/tap/opengrep. Live checks returned HTTP 404 for both the PyPI package endpoint and the Homebrew tap repository endpoint.Why This Change Was Made
Keep the existing pinned official GitHub installer and remove the unsupported alternatives from the missing-tool diagnostic. The publisher's current installation instructions document the GitHub installer and release binaries; the retained v1.27.1 installer supports the existing version-selection argument.
This is a diagnostic-only repair at the script's missing-dependency boundary. Scan flags, rulepack selection, path selection, output handling, exit status, and all dependency pins remain unchanged. No new installer or fallback path is introduced.
User Impact
Developers who are missing OpenGrep receive the official installation command rather than dead-end package-manager alternatives. Existing installations and CI scans behave exactly as before.
AI-assisted with Codex; the change and validation were reviewed by the maintainer's agent.
Evidence
test/scripts/run-opengrep.test.ts, using an isolated PATH containing Bash and the required system utilities but no OpenGrep. It checks exit 127, empty stdout, actionable official-installer guidance, absence of the unavailable alternatives, and no scan-output directory.pipx; five existing tests were skipped for that focused run.node scripts/run-vitest.mjs test/scripts/run-opengrep.test.ts— all 6 tests passed, including existing rulepack, empty-SARIF, Git-discovery-failure, and merge-base cases.bash -n scripts/run-opengrep.shandnode_modules/.bin/oxfmt --check test/scripts/run-opengrep.test.tspassed.node scripts/check-changed.mjs -- scripts/run-opengrep.sh test/scripts/run-opengrep.test.tspassed, including the selected guards, formatting, root-test typecheck, and script lint. An initial worker attempt could not fetch pnpm signature metadata; the unchanged gate subsequently passed locally without disabling verification or changing dependencies.