Skip to content

fix(test): restore the ROM-gated audio checks (stale paths + a committed self-referential symlink) - #231

Open
JoeMatt wants to merge 2 commits into
developfrom
fix/makefile-rom-paths
Open

fix(test): restore the ROM-gated audio checks (stale paths + a committed self-referential symlink)#231
JoeMatt wants to merge 2 commits into
developfrom
fix/makefile-rom-paths

Conversation

@JoeMatt

@JoeMatt JoeMatt commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

The four ROM-gated audio checks in make test had stopped running. They did not fail — they printed SKIP and the suite still exited 0, so the audio regression guard was silently absent while every run read green.

Two independent causes, one per commit.

1. A machine-specific symlink is committed to the repo

f8a1543 ("fix(m68k): gate all group-0 frame metadata on address-error exceptions") committed test/roms/private alongside its cpuextra.c change — a git add -A accident. It is a symlink to an absolute path inside one developer's home directory, and that path is its own location:

test/roms/private -> /Users/…/virtualjaguar-libretro/test/roms/private

So every clone materialises a self-referential symlink, and any access under it fails:

$ ls "test/roms/private/ROMS/Atari Karts (1995).jag"
ls: …: Too many levels of symbolic links

.gitignore already listed test/roms/private/ — but the trailing slash makes the pattern match directories only, so a symlink was never covered by it and slipped straight through.

Fix: drop the trailing slash so both a real directory and a symlink to one are ignored, and git rm --cached the entry. Nothing is deleted from anyone's working tree — the path stays on disk, it just stops being version-controlled. The corpus is normally a symlink to a directory kept outside the repo, which is exactly what the ignore rule is meant to cover.

2. The lookups only checked one of the two corpus layouts

Each check looked only in test/roms/private/ flat. Where the local corpus keeps cartridges under test/roms/private/ROMS/, all four take the else branch and skip. Each lookup now tries the flat path first, then ROMS/.

Effect

Measured on a corpus using the ROMS/ layout, before → after:

check before after
Atari Karts (negative control) SKIP runs — window RMS 407.8, 0/52 hot frames
Iron Soldier 2 clipping SKIP runs — window RMS 2599.3, 0/240 hot frames
Iron Soldier 1 presence SKIP runsaudio is present and within expected envelope
Skyhammer clipping SKIP SKIP — genuinely absent from this machine; that is what the branch is for

make TEST_EXPORTS=1 test exits 0 with 0 failures both before and after — which is the point: the suite could not tell the difference, and now three real checks are back.

Iron Soldier 1 presence is the one CLAUDE.md calls mandatory for audio work ("running only one masks the silencing-regression class"). It had not been executing.

Notes

  • CI is unaffected either way: the private corpus is never present there, so these four continue to SKIP — correctly and by design.
  • The second commit shows as a deletion in the diff. That is the intended change: an absolute, machine-specific, self-referential symlink should never have been tracked.
  • No emulator code is touched; Makefile and .gitignore only.

🤖 Generated with Claude Code

JoeMatt and others added 2 commits July 31, 2026 00:43
The four ROM-gated audio checks in `make test` looked only in
test/roms/private/ flat. When the local corpus keeps cartridges under
test/roms/private/ROMS/ instead, every one of them takes the else branch,
prints "SKIP: ... not available" and the suite still exits 0 — so the audio
regression guard silently stops running while the run still reads green.
That is the exact masked-failure mode CLAUDE.md warns about for audio work,
except here the check never executes at all rather than passing wrongly.

Try the flat path first, then the ROMS/ subdirectory, for all four lookups.
On a corpus using the ROMS/ layout this restores three checks that had been
skipping:

  Clipping check: Atari Karts (negative control)  RMS 407.8, 0/52 hot frames
  Clipping check: Iron Soldier 2                 RMS 2599.3, 0/240 hot frames
  PASS: audio is present and within expected envelope   (Iron Soldier 1)

Skyhammer still reports SKIP — that ROM is genuinely absent here, which is
what the SKIP branch is for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
f8a1543 committed test/roms/private as a symlink alongside an unrelated
cpuextra.c change — an absolute path into one developer's home directory
that also points at itself:

  test/roms/private -> /Users/.../virtualjaguar-libretro/test/roms/private

Every clone therefore materialises a self-referential symlink: any access
under it fails with ELOOP ("Too many levels of symbolic links"). Locally
that silently disables the whole private ROM corpus — which is how the
ROM-gated audio checks in `make test` began reporting SKIP.

.gitignore already listed `test/roms/private/`, but the trailing slash makes
the pattern match directories only, so the symlink was never ignored. Drop
the slash so both a real directory and a symlink to one are covered, and
untrack the entry. Nothing is deleted from anyone's working tree — the path
stays on disk, just no longer version-controlled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 06:09
@github-actions github-actions Bot added tests test harnesses, regression baselines build Makefile / Makefile.common / scripts/ labels Jul 31, 2026
@github-actions

Copy link
Copy Markdown

Regression: linux-x64

Regression Test Results

ROM Status Details Diff
jagniccc 🆕 NEW no baseline -
yarc 🆕 NEW no baseline -
jagniccc (determinism) ✅ PASS identical across runs -
yarc (determinism) ✅ PASS identical across runs -
jagniccc (frameskip) ✅ PASS skip=0 matches skip=3 -
yarc (frameskip) ✅ PASS skip=0 matches skip=3 -
jagniccc (save state) ✅ PASS round-trip matches -
yarc (save state) ✅ PASS round-trip matches -
jagniccc (rewind) ✅ PASS rewind matches -
yarc (rewind) ✅ PASS rewind matches -

Platform: Linux x86_64

Updated by CI at 2026-07-31T06:11:04.404Z

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores execution of ROM-gated audio regression checks in the make test target by making ROM path detection robust to both supported private-corpus layouts and by updating .gitignore to ignore a test/roms/private symlink as well as a directory.

Changes:

  • Update ROM-gated audio test lookups to try both test/roms/private/<rom> and test/roms/private/ROMS/<rom> before emitting SKIP.
  • Adjust .gitignore to ignore test/roms/private without a trailing slash so it matches both a directory and a symlink.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
Makefile Makes ROM-gated audio checks probe both supported corpus layouts so the checks run instead of silently skipping.
.gitignore Changes the ignore pattern to cover test/roms/private when it is a symlink (in addition to a directory).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Regression: macos-arm64

Regression Test Results

ROM Status Details Diff
jagniccc 🆕 NEW no baseline -
yarc 🆕 NEW no baseline -
jagniccc (determinism) ✅ PASS identical across runs -
yarc (determinism) ✅ PASS identical across runs -
jagniccc (frameskip) ✅ PASS skip=0 matches skip=3 -
yarc (frameskip) ✅ PASS skip=0 matches skip=3 -
jagniccc (save state) ✅ PASS round-trip matches -
yarc (save state) ✅ PASS round-trip matches -
jagniccc (rewind) ✅ PASS rewind matches -
yarc (rewind) ✅ PASS rewind matches -

Platform: Darwin arm64

Updated by CI at 2026-07-31T06:11:42.928Z

@github-actions

Copy link
Copy Markdown

Regression: linux-arm64

Regression Test Results

ROM Status Details Diff
jagniccc 🆕 NEW no baseline -
yarc 🆕 NEW no baseline -
jagniccc (determinism) ✅ PASS identical across runs -
yarc (determinism) ✅ PASS identical across runs -
jagniccc (frameskip) ✅ PASS skip=0 matches skip=3 -
yarc (frameskip) ✅ PASS skip=0 matches skip=3 -
jagniccc (save state) ✅ PASS round-trip matches -
yarc (save state) ✅ PASS round-trip matches -
jagniccc (rewind) ✅ PASS rewind matches -
yarc (rewind) ✅ PASS rewind matches -

Platform: Linux aarch64

Updated by CI at 2026-07-31T06:12:05.306Z

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

Labels

build Makefile / Makefile.common / scripts/ tests test harnesses, regression baselines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants