Skip to content

fix(tools): treat explicit wavec overrides as authoritative in corpus checker - #590

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
Visio-Vanitas:fix-564-authoritative-wavec
Sep 11, 2026
Merged

fix(tools): treat explicit wavec overrides as authoritative in corpus checker#590
LunaStev merged 1 commit into
wavefnd:masterfrom
Visio-Vanitas:fix-564-authoritative-wavec

Conversation

@Visio-Vanitas

Copy link
Copy Markdown
Contributor

Summary

Treat explicit --wavec arguments and non-empty WAVEC environment variables as authoritative in tools/check_wave_corpus.py, immediately raising FileNotFoundError if the specified binary cannot be found or resolved rather than silently falling back to local build discovery.

Motivation

Resolves #564. Previously, resolve_wavec combined explicit --wavec, WAVEC, and local build candidate paths into a single candidate list. If the user provided an invalid or misspelled --wavec path (or WAVEC env variable), the corpus checker fell back to local build paths, potentially validating a stale or unrelated binary.

Target and compatibility impact

None. Discovery fallback is retained when neither --wavec nor WAVEC is provided or when WAVEC is empty.

Validation

  • Added unit tests in tools/test_check_wave_corpus.py covering:
    • Invalid explicit --wavec path fails immediately without falling back to existing build outputs.
    • Invalid explicit WAVEC environment variable fails immediately without selecting fallback.
    • Valid explicit --wavec path is selected.
    • Valid WAVEC environment variable is selected.
    • No override falls back to local build discovery.
    • Empty WAVEC environment variable falls back to discovery.
    • No override and missing binary raises FileNotFoundError.
  • Validated test suites:
    • python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree tools.test_check_wave_corpus
    • python3 -m unittest discover -s tools -p "test_*.py"
    • python3 -m py_compile x.py tools/*.py

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior or the PR explains why no test is needed.
  • User-facing changes include documentation or diagnostics updates.
  • The change preserves the license boundary between the compiler and std/.

… checker

Signed-off-by: Visio Vanitas <visiovanitas@atdove.dev>
@LunaStev

Copy link
Copy Markdown
Member

LGTM

@LunaStev
LunaStev merged commit 3488c82 into wavefnd:master Sep 11, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not silently replace an invalid --wavec path with another local compiler

2 participants