Skip to content

test: regenerate the 17 visual baselines invalidated by the vdW radii fix - #213

Closed
timurbazhirov wants to merge 1 commit into
claude/codebase-fixes-msgl9ufrom
claude/lfs-tests-zueqwh
Closed

test: regenerate the 17 visual baselines invalidated by the vdW radii fix#213
timurbazhirov wants to merge 1 commit into
claude/codebase-fixes-msgl9ufrom
claude/lfs-tests-zueqwh

Conversation

@timurbazhirov

@timurbazhirov timurbazhirov commented Aug 12, 2026

Copy link
Copy Markdown
Member

Closes the step left open by 7e3541f, which fixed van der Waals radii but could not land the baselines the fix invalidated.

LFS stays enabled. The 403 recorded in ab4b022 was an environment without git-lfs installed, not an organization policy. With git-lfs present, git lfs pull resolves all 18 baselines and the upload endpoint authorizes normally — all 17 objects uploaded on push (1.2 MB). Un-LFSing was never necessary, so the ~1.2 MB-per-refresh cost the workplan rejected is still avoided.

before after
suites 6 failed / 8 passed 14 passed
tests 17 failed / 168 passed 185 passed, 2 skipped
npm run lint 0 errors (79 warnings, all no-explicit-any)
npx tsc --noEmit clean
npm run build success

Establishing that this environment may regenerate at all

A baseline refresh is only honest if the regenerating environment agrees with the committed set, so that was measured rather than assumed. With only src/settings.ts reverted to its pre-fix form, all 18 committed baselines passed here unmodified, and the only failures were the two atoms.js unit tests written to fail before the fix. That isolates the 17 image failures to the vdW change with nothing environmental mixed in.

What the refresh contains

Per image, committed baseline vs new render:

  • painted pixels gained: 3,912–44,348 (+10% to +82%)
  • painted pixels lost: 0–17
  • geometry displaced: none

The handful of lost pixels are slivers of cell wireframe now occluded by a larger sphere in front. Verified by eye on gain/loss overlays for all 17: green annuli at sphere rims, wireframe unchanged, nothing displaced.

colorsOfAtomsWithLabels gained and lost exactly zero pixels, which is a check on the fix rather than an anomaly — its FeO fixture has Fe at 1.50 Å and O at 1.52 Å, so the one fixture whose elements sit at the old flat 1.5 fallback is the one whose render correct radii do not change.

rotate.expected.png is untouched: controls.js skips that test, so it renders no .actual.png and the script has nothing to copy.

Two traps in the documented workflow, both hit while following it

  • move-actual-expected.sh was committed non-executable (100644), so the ./move-actual-expected.sh forward that both AGENTS.md and 7e3541f prescribe failed outright with "Permission denied". Now 100755.
  • The script writes rollback copies into expected/ as PREFIX.save.png, and the prescribed finishing step is git add tests/.../expected. Nothing ignored them, so that command would have committed 18 raw PNGs as plain non-LFS blobs — precisely the cost the workplan rejected un-LFSing to avoid. Now gitignored.

Docs corrected where this work proved them wrong

  • AGENTS.md claimed a missing LFS setup fails "at parse time on a fixture that is still a pointer stub". Fixtures were un-LFSed in 8ba21fd; the real symptom is now 17 visual tests failing in PNG.sync.read while every other suite passes — worth knowing, since it reads as a partial pass rather than a setup error.
  • AGENTS.md referenced tests/setupFilesAfterEnv.js, which does not exist and is not declared in jest.config.js.

Left deliberately unchanged: the 0.7 pixelmatch threshold

It is loose enough to hide a real change — zoomIn painted 37.7% more geometry and still reported 0 differing pixels, passing against a stale baseline. But the binding constraint is line rendering, not atoms: this environment draws cell edges solid where the old baselines drew them dashed, worth ~3,400 pixels on the two bonds_* images at any threshold ≤ 0.5 and 0 at 0.7. That variance is exactly what 0.7 exists to absorb, so tightening it needs deterministic cross-platform line rendering first. Recorded in AGENTS.md and the workplan instead of changed here — flagging it as a maintainer call.

Verification

Beyond the four gates above, a fresh clone of this branch was checked end-to-end: all 18 baselines smudge to real PNGs (no pointer stubs), round-trip byte-identically through LFS, no .save.png leaked into the repo, the script is executable, and the suite runs 14/14 green.

Base branch

Based on claude/codebase-fixes-msgl9u rather than dev, matching this repo's chained-PR convention (#207#204, #208#207, …): against dev this would show 26 commits and 151 files of the in-flight editor stack instead of the 1 commit and 21 files that are actually mine. Retarget if you would rather stack it elsewhere.

One thing to watch: the containerized run-tests job renders under the Dockerfile's mesa, which may differ from the environment that produced these baselines. The 0.7 tolerance absorbed dashed-vs-solid line differences in both directions here, so it should pass, but that job is the real cross-platform check.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Y5Xv75hLHNEEYvoSq6gYm

… fix

Closes the step left open by 7e3541f. LFS stays enabled: the 403 recorded
there was an environment without git-lfs installed, not an organization
policy. With git-lfs present, `git lfs pull` resolves all 18 baselines and
the upload endpoint authorizes normally, so the images land in LFS where
they belong rather than as ~1.2 MB of plain blobs per refresh.

Suite goes 17 failed / 168 passed -> 14/14 suites, 185 passed, 2 skipped,
with lint, tsc --noEmit and build green alongside it.

Establishing that this environment may regenerate at all:

A baseline refresh is only honest if the regenerating environment agrees
with the committed set, so that was measured, not assumed. With only
src/settings.ts reverted to its pre-fix form, all 18 committed baselines
passed here unmodified and the only failures were the two atoms.js unit
tests written to fail before the fix. That isolates the 17 image failures
to the vdW change with nothing environmental mixed in.

What the refresh contains, per image, baseline vs new render:

- painted pixels gained: 3,912-44,348 (+10% to +82%)
- painted pixels lost:   0-17
- geometry displaced:    none

The handful of lost pixels are slivers of cell wireframe now occluded by a
larger sphere in front. Verified by eye on gain/loss overlays for all 17:
green annuli at sphere rims, wireframe unchanged, no magenta anywhere.

colorsOfAtomsWithLabels gained and lost exactly zero pixels, which is a
check on the fix rather than an anomaly - its FeO fixture has Fe at 1.50 A
and O at 1.52 A, so the one fixture whose elements sit at the old flat 1.5
fallback is the one whose render correct radii do not change.

rotate.expected.png is untouched: controls.js skips that test, so it
renders no .actual.png and the script has nothing to copy.

Two traps in the documented workflow, both hit while following it:

- move-actual-expected.sh was committed non-executable (100644), so the
  `./move-actual-expected.sh forward` that AGENTS.md and 7e3541f both
  prescribe failed outright with "Permission denied". Now 100755.
- The script writes rollback copies to expected/<name>.save.png and the
  prescribed finishing step is `git add tests/.../expected`. Nothing
  ignored them, so that command would have committed 18 raw PNGs as plain
  non-LFS blobs - precisely the ~1.2 MB cost the workplan rejected
  un-LFSing to avoid. Now gitignored.

Docs corrected where this work proved them wrong:

- AGENTS.md claimed a missing LFS setup fails "at parse time on a fixture
  that is still a pointer stub". Fixtures were un-LFSed in 8ba21fd; the
  real symptom is now 17 visual tests failing in PNG.sync.read while every
  other suite passes, which is worth knowing since it looks like a partial
  pass rather than a setup error.
- AGENTS.md referenced tests/setupFilesAfterEnv.js, which does not exist
  and is not declared in jest.config.js.

Left deliberately unchanged: the pixelmatch threshold of 0.7. It is loose
enough to hide a real change - zoomIn painted 37.7% more geometry and still
reported 0 differing pixels, passing against a stale baseline - but the
binding constraint is line rendering, not atoms. This environment draws
cell edges solid where the old baselines drew them dashed, worth ~3,400
pixels on the two bonds_* images at any threshold <= 0.5 and 0 at 0.7.
That variance is what 0.7 exists to absorb, so tightening it needs line
rendering made deterministic across platforms first. Recorded in AGENTS.md
and the workplan instead of changed here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Y5Xv75hLHNEEYvoSq6gYm
timurbazhirov pushed a commit that referenced this pull request Aug 13, 2026
Consolidating the July-12 chain, #213 turned out not to be fully redundant. Its
baselines are byte-identical to the ones regenerated here, but three files were
not, and all three of its versions are the correct ones:

- AGENTS.md described the old failure mode - "fails at parse time on a fixture
  that is still a pointer stub". Fixtures are plain JSON now; what is LFS-tracked
  is the visual baselines, and without git-lfs they stay 130-byte stubs so the 17
  visual tests fail while every other suite passes. That green-looking partial run
  is the signal to check LFS first, which is exactly how it presented this session.
- plan/codebase-fixes-workplan.md still flagged the baselines as outstanding.
  They were regenerated in 5882636, so the warning was claiming unfinished work
  that is done.
- tests/__tests__/__snapshots__/.gitignore was missing the *.save.png rule.
  move-actual-expected.sh writes its rollback copies into expected/ under that
  name, and the documented finishing step is `git add .../expected` - which would
  commit all 18 of them as plain non-LFS blobs.

None of the three are touched by this branch after the common ancestor, so these
are #213's versions verbatim rather than a merge.
timurbazhirov pushed a commit that referenced this pull request Aug 13, 2026
Same carry-over as 819cc24 on the figure-export branch. #213 turned out not to be
fully redundant when consolidating the July-12 chain: its baselines are identical
to the ones regenerated here, but three files were not, and its versions are the
correct ones - AGENTS.md described a fixture-parse failure mode that no longer
exists (it is the visual baselines that are LFS-tracked, and their absence fails
17 visual tests while every other suite passes), the workplan still flagged the
baselines as outstanding after 5882636 regenerated them, and the snapshots
.gitignore was missing the *.save.png rule that keeps move-actual-expected.sh's
rollback copies out of `git add .../expected`.

Copy link
Copy Markdown
Member Author

Closing — consolidated into #216 (then #214 on top). This one needed more than an ancestry check, so:

The baselines are already here. All 18 .expected.png files this PR regenerates are byte-identical in #216, which regenerated them independently in 5882636 after verifying the change three ways (diffs are thin crescents on each sphere's rim and nothing else, 0.00–0.50% of pixels, and reintroducing the uniform-radius bug makes the old baselines pass again).

Three files were not redundant, and this PR's versions were the right ones. They have been carried over verbatim in 819cc24 / 1a8a9bb rather than dropped:

  • AGENTS.md — the other branch still described the old failure mode, "fails at parse time on a fixture that is still a pointer stub". Fixtures are plain JSON now; what is LFS-tracked is the visual baselines, and without git-lfs they stay 130-byte stubs so the 17 visual tests fail while every other suite passes. That green-looking partial run is exactly how it presented while fixing CI this week, so the corrected wording earns its place.
  • plan/codebase-fixes-workplan.md — still carried "⚠️ Baselines outstanding", which stopped being true once 5882636 landed. A warning about finished work is worse than no warning.
  • tests/__tests__/__snapshots__/.gitignore — the *.save.png rule was missing. move-actual-expected.sh writes its rollback copies into expected/ under that name, and the documented finishing step is git add .../expected, which would have committed all 18 as plain non-LFS blobs.

None of the three are touched by the consolidated branch after the common ancestor, so this was a clean port, not a merge.

The branch claude/lfs-tests-zueqwh stays on the remote.


Generated by Claude Code

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.

2 participants