Skip to content

Fail std policy validation when its search tool fails #561

Closed

Description

@LunaStev

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.

Activity

  1. added
    bug
    good first issue
    on Sep 10, 2026
  2. self-assigned this
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions