Fail std policy validation when its search tool fails

Open Beginner friendly
#561 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, shell
Domain
testing, tooling

Research direction

Start in tools/check_std_policy.sh at lines 12, 34, and 46, then trace how each rg result affects the failed status. Use the suggested small shell fixtures or a stub search command to verify missing rg, search failures, clean no-match input, and real policy matches. Done means execution failures return a nonzero status with a useful message while no matches remain successful.

Written by the indexing model from the issue text.

Description

bug good first issue

The policy script appends || true to its rg searches. That treats tool errors like normal no-match results. If rg is absent, each search emits a shell error but the resulting empty strings leave failed=0, allowing the script to print OK. Unreadable-path/search errors are similarly masked. A required check should not report success when it could not inspect its inputs.

Code evidence:

Acceptance:

  • Check required tool availability and distinguish rg exit 1 (no matches) from execution/search failures.
  • Ensure missing rg and an injected search failure produce a nonzero status and useful message.
  • Keep a no-match clean tree successful and real policy matches failing.
  • Use small shell fixtures or a stub search command; no Wave compiler, LLVM build or network is needed.

Audit status: static source inspection against canonical master ea74c2dafc31da876e5561f2d176ba719f5a0458 on 2026-09-10. No compiler build, test execution, implementation change or local reproduction was performed for this report. The examples describe the source-derived behavior to verify when implementing the fix.

Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 6m
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wavefnd/Wave

All issues in wavefnd/Wave

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.