Skip to content

Fail corpus validation when no Wave sources are discovered #810

Description

@LunaStev

Problem

The corpus gate returns success when source discovery yields no files. An incomplete checkout or moved/deleted source tree can therefore produce a green validation run that checked nothing.

Starting points: tools/check_wave_corpus.py.

Reproduction

Executed on Linux amd64 with Python 3.14.7. The affected files at local ade878134519b0f957ca28a23c6f9cd98e43dff3 are byte-identical to canonical master 286dad9c8fcb0616f7c719c72cbf453a7d9925fd.

python3 -B - <<'PYREPRO'
import sys
from pathlib import Path
from unittest.mock import patch
from tools import check_wave_corpus as c
with patch.object(c, 'corpus_files', return_value=[]), \
     patch.object(c, 'resolve_wavec', return_value=Path(sys.executable)):
    print('exit:', c.main([]))
PYREPRO

Observed: Corpus result: 0 passed, 0 failed and exit: 0. This isolates discovery; no compiler process is started.

Scope

Easy: reject an empty maintained corpus. When --run-std-examples is requested, also reject an empty std-example selection. This adds failure behavior beyond the general test-coverage tracking in #354.

Completion criteria

  • An empty corpus returns nonzero with a clear diagnostic.
  • Requested example execution cannot pass with zero selected examples.
  • A nonempty passing selection still returns zero, and an empty selection launches no compiler.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugA problem that causes incorrect behavior or crashes.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions