test: one disc resolver, no machine-specific defaults, and all three corpora in the CI container #53

Merged
fabi merged 1 commits from fix/corpus-mounts-and-paths into main 2026-09-19 18:47:54 +00:00
Owner

Closes #16.

The issue's first two remedies landed months ago — corpus_report.rs says which corpora resolved, and $SYLPHEED_DISC became a real control in #22. This finishes the three places they missed, each the same defect: a default that encodes one environment.

1. tests/ — the last four resolvers, and the one real fallback

Four suites still defined their own disc_root(). Three were byte-equivalent to the shared one; ui_keyframe_record_disc.rs was not — it fell back to

/home/fabi/RE - Project Sylpheed/Project Sylpheed - Arc of Deception (USA, Europe) (En,Ja)

so on that one machine unset SYLPHEED_DISC did nothing and the suite ran anyway. All four now use tests/common.

Control, in the container: with the corpus absent the suite finishes in 0.00 s; with it present, 57.55 s. It skips now instead of finding a disc of its own.

2. examples/ — seventeen defaults pointing into the container

let root = std::env::var("SYLPHEED_DISC").unwrap_or_else(|_| "/disc".into());

/disc is the mount point inside the CI container, where docker/ci/run already sets SYLPHEED_DISC=/disc, so the fallback is redundant there and wrong everywhere else: on the host it turned "you forgot the corpus" into a file-not-found against a path that has never existed. They now name the variable to set, as the other ~100 examples already did.

3. docker/ci/run — the runner had the bug the issue is about

It mounted only the disc. SYLPHEED_RES3D and SYLPHEED_ISO were never passed in, so their suites self-skipped and still counted as passed — an in-container run looked like a full one while sitting out two corpora. Now all three are mounted read-only when they exist.

Evidence

Full run in the capped container on the desktop, all three corpora present:

45 suites | 377 passed | 0 failed | 14 ignored

which matches the recorded all-corpora baseline, and the report — the thing to read, not the tally — now says:

PRESENT via $SYLPHEED_DISC   -> /disc
PRESENT via $SYLPHEED_RES3D  -> /res3d
PRESENT via $SYLPHEED_ISO    -> /disc.iso

Before this branch that third block read ABSENT for two of the three on any in-container run.

cargo fmt --all -- --check clean, cargo clippy --workspace --all-targets -- -D warnings clean, both in the container.

What this does not do

crates/*/examples/ still has ~127 files that read a SYLPHEED_* variable — that is what an example should do, and they now fail loudly and identically when it is unset. The remaining honest gap is the tally itself: #[ignore] is static, so a skipped suite still counts as passed. That is why the report exists, and why CLAUDE.md tells readers to read it.

🤖 Generated with Claude Code

Closes #16. The issue's first two remedies landed months ago — `corpus_report.rs` says which corpora resolved, and `$SYLPHEED_DISC` became a real control in #22. This finishes the three places they missed, each the same defect: **a default that encodes one environment**. ### 1. `tests/` — the last four resolvers, and the one real fallback Four suites still defined their own `disc_root()`. Three were byte-equivalent to the shared one; `ui_keyframe_record_disc.rs` was not — it fell back to ``` /home/fabi/RE - Project Sylpheed/Project Sylpheed - Arc of Deception (USA, Europe) (En,Ja) ``` so on that one machine `unset SYLPHEED_DISC` did nothing and the suite ran anyway. All four now use `tests/common`. **Control, in the container:** with the corpus absent the suite finishes in **0.00 s**; with it present, **57.55 s**. It skips now instead of finding a disc of its own. ### 2. `examples/` — seventeen defaults pointing into the container ```rust let root = std::env::var("SYLPHEED_DISC").unwrap_or_else(|_| "/disc".into()); ``` `/disc` is the mount point *inside* the CI container, where `docker/ci/run` already sets `SYLPHEED_DISC=/disc`, so the fallback is redundant there and wrong everywhere else: on the host it turned "you forgot the corpus" into a file-not-found against a path that has never existed. They now name the variable to set, as the other ~100 examples already did. ### 3. `docker/ci/run` — the runner had the bug the issue is about It mounted only the disc. `SYLPHEED_RES3D` and `SYLPHEED_ISO` were never passed in, so their suites self-skipped and still counted as passed — an in-container run looked like a full one while sitting out two corpora. Now all three are mounted read-only when they exist. ### Evidence Full run in the capped container on the desktop, all three corpora present: ``` 45 suites | 377 passed | 0 failed | 14 ignored ``` which matches the recorded all-corpora baseline, and the report — the thing to read, not the tally — now says: ``` PRESENT via $SYLPHEED_DISC -> /disc PRESENT via $SYLPHEED_RES3D -> /res3d PRESENT via $SYLPHEED_ISO -> /disc.iso ``` Before this branch that third block read `ABSENT` for two of the three on any in-container run. `cargo fmt --all -- --check` clean, `cargo clippy --workspace --all-targets -- -D warnings` clean, both in the container. ### What this does not do `crates/*/examples/` still has ~127 files that read a `SYLPHEED_*` variable — that is what an example *should* do, and they now fail loudly and identically when it is unset. The remaining honest gap is the tally itself: `#[ignore]` is static, so a skipped suite still counts as passed. That is why the report exists, and why `CLAUDE.md` tells readers to read it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fabi added 1 commit 2026-09-17 20:19:52 +00:00
test: one disc resolver, no machine-specific defaults, all three corpora in the container
All checks were successful
CI / Native — linux (pull_request) Successful in 2h23m5s
CI / WASM — Web (pull_request) Successful in 31m32s
CI / Formatting (pull_request) Successful in 1m25s
4e10b9e9c1
Finishes #16 in the three places its earlier remedies missed.

`tests/`: the last four local `disc_root()` copies now use `tests/common`, and
with them goes the one real hardcoded fallback — `ui_keyframe_record_disc.rs`
fell back to an absolute path on one machine, which made `unset SYLPHEED_DISC`
a no-op there. Control: with the corpus absent that suite now finishes in 0.00s
instead of 57.55s, so it skips rather than finding a disc of its own.

`examples/`: seventeen examples defaulted to `/disc`, the mount point inside the
CI container. Redundant there — `docker/ci/run` sets `SYLPHEED_DISC=/disc` — and
wrong everywhere else, where a missing corpus turned into a file-not-found
against a path that has never existed on the host. They now name the variable to
set, like the other hundred examples already did.

`docker/ci/run`: mount `$SYLPHEED_RES3D` and `$SYLPHEED_ISO` alongside the disc.
Only the disc was mounted, so an in-container run sat out the res3d and iso
suites while looking like a full one — the defect this issue is about, in the
runner itself.

Measured in the container on this desktop with all three corpora present:
45 suites / 377 passed / 0 failed / 14 ignored, and `sylpheed-corpus-report.txt`
now reports PRESENT for all three rather than for the disc alone.

Refs #16.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fabi merged commit 1e4da9af11 into main 2026-09-19 18:47:54 +00:00
Sign in to join this conversation.