Skip to content

test(gq): register every .gqt case as its own test in a dedicated corpus crate - #607

Merged
azimafroozeh merged 1 commit into
ModernRelay:mainfrom
azimafroozeh:gqt-per-case-runner
Sep 3, 2026
Merged

azimafroozeh merged 1 commit into
ModernRelay:mainfrom
azimafroozeh:gqt-per-case-runner

Conversation

@azimafroozeh

Copy link
Copy Markdown
Collaborator

What & why

This PR moves the .gqt corpus and its runner into a dedicated crate, omnigraph-gqt, and registers every case as its own test, case::<file>.gqt, discovered at run time by datatest-stable. The #596 walker was one test, selectable only through OMNIGRAPH_GQ_LOGIC_TESTS, invisible to --list, cargo-nextest, and IDE test views.

Before Now
Run the cases matching a name OMNIGRAPH_GQ_LOGIC_TESTS=issue_563 cargo test -p omnigraph-engine --test gq_logic_tests cargo test -p omnigraph-gqt issue_563 (add --test gq_logic_tests to skip the unit tests)
List the corpus not possible (the walker was one test) cargo test -p omnigraph-gqt --test gq_logic_tests -- --list
One pass/fail line per case in cargo-nextest and IDE test views not possible libtest-compatible names, case::<file>.gqt
Bound case concurrency OMNIGRAPH_GQ_JOBS=<n> cargo test … cargo test -p omnigraph-gqt -- --test-threads=<n>
Refuse a symlinked or non-UTF-8-named case instead of skipping it silently not possible corpus_layout
Read a failing case's row diff inside the harness error, one escaped line printed under the case's FAIL line
Add a case a file under tests/gq_logic_tests/, no Rust change a file under crates/omnigraph-gqt/cases/, no Rust change

The runner is a library (run_case, list_cases) for a follow-up --show binary. The crate is publish = false, outside default-members and the release build.

Backing issue / RFC

  • RFC 0045 (docs/rfcs/0045-gq-logic-tests.md): the per-file test identity it recorded as its upgrade path; the body is updated in place and the 2026-09-03 Decision-log entry names what it supersedes.

Checklist

  • Change is focused (the corpus and runner move with per-case registration; the corpus-path pins in the gate script, AGENTS.md, docs/dev/testing.md, and the workflow follow)
  • Tests added/updated for behavior changes (the 94 self-tests move as unit tests; new: corpus_layout, the symlink and non-UTF-8 battery rows, budget and panic tests on the single-case runner; 7 cases green)
  • Public docs updated if user-facing surface changed (docs/dev/testing.md, AGENTS.md; developer surface only)
  • Reviewed against docs/dev/invariants.md — no Hard Invariant weakened, no deny-list item hit (test infrastructure; no engine state touched)

Local verification

  • cargo test -p omnigraph-gqt: 94 unit tests and 7 cases green
  • cargo test -p omnigraph-gqt --test gq_logic_tests -- --list: 7 case::<file>.gqt lines; with issue_563: 2 run, 5 filtered out
  • a symlinked x.gqt in cases/: corpus_layout fails naming it
  • python3 scripts/check-fix-regression.py --self-test, scripts/check-agents-md.sh, cargo clippy --workspace --all-targets -- -D warnings, cargo fmt --all --check: clean
  • cargo test --workspace --locked --no-fail-fast: 102 binaries green; external_blob_file_policy_rejects_special_files red only under a sandbox that forbids UnixListener::bind

Notes for reviewers

  • A name filter matching no case is libtest's green zero-test run (the walker refused it); a bare cargo test at the root skips the crate (-p omnigraph-gqt or --workspace reaches it).
  • The Cargo.lock windows-sys and socket2 edge moves are cargo's minimal resolution for the new dev-dependency: HEAD's lock plus cargo update --workspace reproduces this lock byte for byte.
  • The fix-regression gate runs from the base branch, so its moved corpus path takes effect after merge; this PR closes no issue. The honest routes (new case, strengthened case, Rust-shape test, bless) pass; .GQT and nested files are refused by corpus_layout, the gate, and --list.
  • The crate's unit tests run on every pull request, so a #[test] fn issue_N inside crates/omnigraph-gqt/src/ executes there.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@azimafroozeh
azimafroozeh merged commit 9d2d50c into ModernRelay:main Sep 3, 2026
23 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.

1 participant