fix(oracle): point the extracted test module at the crate root (GH-214) - #218
Closed
noahgift wants to merge 3 commits into
Closed
fix(oracle): point the extracted test module at the crate root (GH-214)#218noahgift wants to merge 3 commits into
noahgift wants to merge 3 commits into
Conversation
…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. Nothing in the pipeline built this workspace member, so it stayed broken for months while every gate read green: - CI's reusable sovereign-ci workflow defaults to `--lib` (root package only) - the infra clean-room gate ran `cargo test --lib` at the WORKSPACE ROOT, which scopes to `bashrs-specs` (5 stub tests) — paiml/infra#170 It surfaced only when that gate was fixed to test the crate it gates, at which point B2 failed on the first honest run. 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 that had not been compiled, let alone run, since February. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…214) The reusable sovereign-ci workflow defaults to `--lib`, which scopes to the ROOT package. This workspace's root is `bashrs-specs`; the published crate is rash/, and bashrs-oracle, bashrs-runtime and bashrs-wasm are never built by CI at all. That is why bashrs-oracle's test module could stop compiling in February and every check stayed green until an unrelated gate fix exposed it. `test_workspace: true` opts into `--workspace --lib` (PMAT-159). Verified locally BEFORE enabling, because flipping this on an assumption would red the entire pipeline rather than fix anything: cargo test --workspace --lib --no-run -> 0 errors; 5 unittest binaries built (bashrs, bashrs_oracle, bashrs_runtime, bashrs_specs, bashrs_wasm) That check was run WITH the import fix in the previous commit; without it, bashrs-oracle does not compile — which is exactly the failure this flag is meant to surface from now on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ed (Refs #214) Enabling test_workspace surfaced 23 failures in rash/src/testing/shellcheck_validation_tests.rs. They shell out to shellcheck and `.expect()` the result, so they PANIC wherever it is absent — and the CI container does not have it. They had never run before, because `--lib` scoped to the root stub package. That is the flag doing its job. Installed rather than skipped. That module states its own critical invariant — "every generated script must pass `shellcheck -s sh`" — so making it skip when the tool is missing would trade a red for a SILENT GREEN, which is the failure mode this repo keeps paying for. infra's clean-room gate already installs shellcheck for bashrs for exactly this reason; CI should not be weaker than the release gate. Uses the reusable workflow's existing extra_pkgs input (same mechanism as the clean-room's EXTRA_PKGS). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #214.
bashrs-oracle's test module has not compiled since PMAT-229 (b2debf1710).lib_cont.rspulls the file in with#[path = "lib_tests_oracle_creat.rs"] mod tests_extracted;, so inside itsuperislib_cont— not the crate root, where the types actually live. That refactor renamed the file into the submodule anduse super::*quietly stopped reaching any of them.Six types, not the two the issue recorded:
Oracle,ErrorCategory,Corpus,OracleConfig,ErrorFeatures,DriftStatus.Why it survived months of green
Nothing in the pipeline built this workspace member:
sovereign-ciworkflow defaults to--lib, which scopes to the root package (bashrs-specs)cargo test --libat the workspace root — same blind spot (paiml/infra#170)It surfaced only when that gate was fixed to test the crate it gates, at which point B2 failed on the first honest run.
Verification
origin/maincargo test -p bashrs-oracle --lib --no-run→ 19 × E0433That includes the 6
tests_extracted::tests::*tests which had not been compiled, let alone run, since February.Follow-up in this PR
A second commit adds
test_workspace: truetoci.ymlso a workspace member cannot rot invisibly again — pending a localcargo test --workspace --lib --no-runproving every member builds in that scope. I won't flip it on an assumption; turning your CI red would be a worse outcome than the bug.🤖 Generated with Claude Code