Skip to content

fix(oracle): point the extracted test module at the crate root, and test the workspace (GH-214) - #223

Merged
noahgift merged 1 commit into
mainfrom
fix/oracle-test-imports-v2
Aug 12, 2026
Merged

fix(oracle): point the extracted test module at the crate root, and test the workspace (GH-214)#223
noahgift merged 1 commit into
mainfrom
fix/oracle-test-imports-v2

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

Closes #214. (Supersedes #218, which conflicted after #219/#221/#222 landed — same two files, rebuilt cleanly on main.)

bashrs-oracle's test module has not compiled since PMAT-229 (b2debf1710).

lib_cont.rs pulls it in with #[path = "lib_tests_oracle_creat.rs"] mod tests_extracted;, so inside it super is lib_cont — not the crate root where the types live. That refactor renamed the file into the submodule and use super::* quietly stopped reaching them. Six types, not the two the issue recorded.

RED on origin/main cargo test -p bashrs-oracle --lib --no-run19 × E0433
GREEN with this fix 48 passed, 0 failed

Including the 6 tests_extracted::* tests never compiled, let alone run, since February.

Why it survived months of green

Nothing in the pipeline built this member:

  • CI's reusable sovereign-ci defaults to --lib, scoping to the root package (bashrs-specs) — never rash/ or the other three members
  • infra's clean-room gate ran cargo test --lib at the workspace root — the same blind spot (paiml/infra#170)

So this also sets test_workspace: true (--workspace --lib). Verified locally before enabling, because flipping it on an assumption would red the whole pipeline rather than fix anything: cargo test --workspace --lib --no-run builds all 5 members, 0 errors.

What that immediately caught

23 further failures in rash/src/testing/shellcheck_validation_tests.rs. They shell out to shellcheck and .expect() it, so they panic where it's absent — and the CI container lacks it. They had never run.

shellcheck is installed (via the workflow's extra_pkgs) rather than the tests made to skip. That module states its own critical invariant — "every generated script must pass shellcheck -s sh" — so skipping would trade a red for a silent green. CI shouldn't be weaker than the release gate, which already installs it.

And I confirmed they genuinely execute rather than the install failing open (that apt step ends in || true): testing::shellcheck_validation_tests report real per-test timings, and the suite is now 14,655 tests.

🤖 Generated with Claude Code

… the workspace (Refs #214)

bashrs-oracle's test module has not compiled since PMAT-229 (b2debf1).

lib_cont.rs pulls the file in with `#[path = "lib_tests_oracle_creat.rs"] mod
tests_extracted;`, so inside it `super` is lib_cont — NOT the crate root, where
Oracle, ErrorCategory, Corpus, OracleConfig, ErrorFeatures and DriftStatus
actually live. That refactor renamed the file into the submodule and `use
super::*` quietly stopped reaching any of them. Six types, not the two the issue
recorded.

  RED on origin/main:  E0433 x19 (`cargo test -p bashrs-oracle --lib --no-run`)
  GREEN with this fix: 48 passed, 0 failed — including the 6 tests_extracted::*
                       tests never compiled, let alone run, since February.

Nothing in the pipeline built this workspace member, which is why it stayed
broken while every check was green:
  - CI's reusable sovereign-ci workflow defaults to `--lib`, scoping to the ROOT
    package (bashrs-specs), never rash/ or the other three members
  - infra's clean-room gate ran `cargo test --lib` at the WORKSPACE ROOT — the
    same blind spot (paiml/infra#170)

So `test_workspace: true` opts CI into `--workspace --lib` (PMAT-159). Verified
locally BEFORE enabling, because flipping it on an assumption would red the
whole pipeline rather than fix anything: `cargo test --workspace --lib --no-run`
builds all 5 members with 0 errors.

That immediately surfaced 23 further failures in
rash/src/testing/shellcheck_validation_tests.rs, which shell out to shellcheck
and `.expect()` it — they PANIC where it is absent, and the CI container lacks
it. They had never run. shellcheck is now INSTALLED via the workflow's
extra_pkgs input rather than the tests being made to skip: that module states
its own critical invariant — "every generated script must pass `shellcheck -s
sh`" — so skipping would trade a red for a SILENT GREEN. CI should not be weaker
than the release gate, which already installs it.

Confirmed in CI that they genuinely execute rather than the install failing open
(the workflow's apt step ends in `|| true`): testing::shellcheck_validation_tests
report real per-test timings, and the suite is now 14655 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@noahgift
noahgift merged commit febcfbd into main Aug 12, 2026
13 of 18 checks passed
@noahgift
noahgift deleted the fix/oracle-test-imports-v2 branch August 12, 2026 10:40
@noahgift noahgift mentioned this pull request Aug 12, 2026
noahgift added a commit that referenced this pull request Aug 12, 2026
Ships the user-facing fixes accumulated since 6.66.2, none of which
reach anyone until this is published:

  - five lint false positives that were driving users to disable
    `bashrs lint` (#219, GH-217, GH-209)
  - CLI stack overflow from an oversized clap frame (#216, #215)
  - RUSTSEC-2026-0204, crossbeam-epoch 0.9.20 (#210)

plus internal repairs: kani harnesses compile under cfg(kani) again
(#221), bashrs-oracle's test module compiles and the workspace is
actually tested (#223), and a workflow template stopped being run as a
workflow (#222).

Cargo.lock regenerated in the same commit -- forjar's 1.12.4 release
tripped its lockfile-preflight by bumping Cargo.toml alone.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

bashrs-oracle test module has not compiled since PMAT-229 (b2debf1710) — no CI or gate builds it

1 participant