Skip to content

symmetry: a comparison that could not run fails CI instead of passing - #35

Merged
stevevanhooser merged 2 commits into
mainfrom
claude/clever-bardeen-hf5jgx
Oct 21, 2026
Merged

stevevanhooser merged 2 commits into
mainfrom
claude/clever-bardeen-hf5jgx

Conversation

@stevevanhooser

@stevevanhooser stevevanhooser commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #34. Paired with VH-Lab/NDR-matlab#145 on the same branch name, claude/clever-bardeen-hf5jgx. That branch was pushed first this time, so this PR's symmetry run pairs with it. Merge VH-Lab/NDR-matlab#145 first.

The problem

test-symmetry.yml reported green on #33 with every video comparison unrun, in three separate ways:

  1. Branch fallback: the NDR-matlab branch was pushed seconds after the run had fallen back to main, and nothing said so.
  2. Hidden Python skips: Python's read tests skipped, hidden among the 16 skips every run carried by design.
  3. MATLAB counted it as passed: MATLAB's read tests did disp + return, which matlab.unittest reports as Passed.

The fix

The bridge tests' rule now applies to symmetry: in CI, a comparison that could not run fails, and anything that can't run by design is deselected openly.

  • tests/symmetry/conftest.py: a strict-mode backstop. Under NDR_SYMMETRY_CHECK_STRICT, any skip in a test under tests/symmetry/ fails, and the message says what to check. Like tests/conftest.py's bridge backstop, it is derived rather than a list.
  • tests/test_symmetry_strict.py: positive controls that run in the normal test matrix. A real read test against an empty artifact base must skip without the flag and fail with it. Removing the backstop makes the second control fail; I checked that.
  • .github/workflows/test-symmetry.yml:
    • sets NDR_SYMMETRY_CHECK_STRICT=1 for the job;
    • writes the NDR-matlab ref it used, and why, to the job summary ("matching branch" vs. "falls back to main… push the NDR-matlab branch and re-run");
    • Stage 2 deselects the pythonArtifacts cases (-k "not pythonArtifacts"; Python makes those in Stage 3, and MATLAB reads them in Stage 4) instead of skipping them, so it now reports 0 skipped;
    • Stages 1 and 4 (MATLAB) fail on any Incomplete result, and list each one as INCOMPLETE: <name>;
    • Stage 4 deselects by name and logs the one known gap: readOmeZarr's pythonArtifacts case, since NDR-python has no OME-Zarr symmetry test yet.
  • AGENTS.md: the fourth entry in "A skip is a silent pass", plus a line saying the rule now covers symmetry.
  • tests/symmetry/read_artifacts/INSTRUCTIONS.md: skips fail in CI, how to run the tests as CI does, and why a new read test needs its MATLAB half to exist first.

Verification

  • pytest: 725 passed (+2 new controls), 15 skipped (same as before), 24 xfailed.
  • black and ruff check are clean.
  • Bridge checks (strict): 191 passed.
  • Backstop, by hand, on test_read_video.py with no artifacts present:
    • without the flag: 10 skipped;
    • with the flag: 10 failed, with the message;
    • with artifacts present, CI-shaped: Stage 2 gives 16 passed, 16 deselected, 0 skipped, and Stage 3 gives 6 passed.
  • Resolve step: its bash was run as written for an existing and a missing branch, and both summaries are correct.

The MATLAB stage scripts can only run in CI. This PR's symmetry run is their test, against the paired NDR-matlab branch.

Not in this PR

readOmeZarr is MATLAB-only. Python neither reads MATLAB's OME-Zarr artifacts nor makes its own, so the Stage 4 deselection is a declared known gap, not a fix. Porting that symmetry test is a separate piece of work.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX

…#34)

test-symmetry.yml reported green on #33 with every video comparison
unrun: its NDR-matlab branch was pushed after the run had fallen back to
main, Python's read tests skipped (hidden among the 16 skips every run
carried by design), and MATLAB's read tests disp+returned, which counts
as passed. Fix all three paths, following the bridge tests' rule:

- tests/symmetry/conftest.py: under NDR_SYMMETRY_CHECK_STRICT, any skip in
  a symmetry test fails, with the reason and what to check. A backstop,
  not a list, like tests/conftest.py's for the bridge.
- tests/test_symmetry_strict.py: positive controls in the normal matrix.
  A real read test against an empty artifact base skips without the flag
  and fails with it (and fails the control when the backstop is removed).
- test-symmetry.yml:
  - sets NDR_SYMMETRY_CHECK_STRICT for the job;
  - writes the resolved NDR-matlab ref and why to the job summary;
  - Stage 2 deselects the pythonArtifacts cases (made in Stage 3) rather
    than skipping them, so it now reports 0 skipped;
  - both MATLAB stages fail on any Incomplete result;
  - Stage 4 deselects by name the one known gap, readOmeZarr's
    pythonArtifacts case (NDR-python has no OME-Zarr symmetry test yet),
    and logs it.
- AGENTS.md: the fourth entry in "A skip is a silent pass".
- read_artifacts/INSTRUCTIONS.md: skips fail in CI; how to run as CI does.

Paired with NDR-matlab on the same branch name, where the read tests now
end in assumptions (Incomplete) instead of disp+return (Passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX
Stage 1 of the symmetry job died before any test ran: matbox's
installRequirements resolves NDR-matlab's MATLAB dependencies through the
GitHub API unauthenticated, and hit the shared 60 req/hr limit ("GitHub
API rate limit exceeded. Consider using a GITHUB_TOKEN environment
variable."). NDR-matlab's own test-symmetry.yml already passes
GITHUB_TOKEN: ${{ github.token }} in the job env for exactly this; port
the same line here (built-in token, no secret to configure; 5000 req/hr).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX
@stevevanhooser
stevevanhooser merged commit e7baff8 into main Oct 21, 2026
7 checks passed
@stevevanhooser
stevevanhooser deleted the claude/clever-bardeen-hf5jgx branch October 21, 2026 15:00
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.

Symmetry CI passes green when the other language's artifacts are missing (a fourth "skip is a silent pass")

2 participants