Repository navigation
Fix red CI on main (CPU-dependent organoid order) and link the live simulator - #2
Merged
Merged
Conversation
The first CI run on main failed "Measurements are reproducible": the runner rebuilt assets/derived/organoids.json with tied Hough circles in a different order. numpy's argsort is an unstable SIMD sort whose tie order differs between AVX2 and AVX-512, and both skimage's hough_circle_peaks and our greedy selection ranked peaks with it. Reproduced locally with NPY_DISABLE_CPU_FEATURES=X86_V4 (same 25/25-line diff as CI). - hough_peaks(): per-radius peaks, then a canonical (accumulator desc, y, x, r) ranking before the cross-radius suppression - select_organoids(): the same canonical tie-break - regression tests: both functions give the same result under input permutations (the old ordering fails 5/5) - organoids.json regenerated: the same 91 circles in canonical order, so no measurement changes; AVX2 and AVX-512 builds are byte-identical README: link the GitHub Pages deployment, deep links and scene previews. smoke.mjs: SITE_ROOT serves another directory, so the assembled Pages bundle can be smoke-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016pbMe2Yw2abpatNN7kc6j2
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.
Summary
The first GitHub Actions run on
main(CI run 36538589250) had one red job: Micrograph pipeline (Python) → Measurements are reproducible. The other two jobs passed: the model tests, and every 3D scene rendered in all three modes. The Pages deploy is now green (run 36538589319, attempt 2) after Pages was enabled. This PR fixes the red job and links the live site from the README.Root cause
On the runner,
assets/derived/organoids.jsonwas rebuilt with some Hough circles in a different order (25 lines changed, same 91 circles). Ranking usednp.argsort, which is an unstable SIMD sort: equal accumulator values come out in a different order under AVX2 (the CI runner) than under AVX-512 (where the assets were built). Two places ranked this way:hough_circle_peaks, before its cross-radius distance suppression. There the tie order can also decide which of two nearby tied peaks survives.Reproduced locally with
NPY_DISABLE_CPU_FEATURES=X86_V4, which gives the same diff as CI.Fix (
tools/build_assets.py)hough_peaks()finds peaks one radius at a time, then ranks them by (accumulator ↓, y, x, r) before applying the same 8-px suppression and 400-peak cap.select_organoids()uses the same canonical tie-break.organoids.jsonis regenerated: the same 91 circles in canonical order, so every measurement and calibration value is unchanged. Builds on AVX2 and AVX-512 are now byte-identical (organoids.json,organoids_plate.jpg,calibration.json).README
Smoke test
SITE_ROOT=<dir> node tests/e2e/smoke.mjsserves another directory, so the exact bundle assembled bypages.ymlcan be tested.Testing
node --test tests/models/*.test.mjs: 98/98 pass.pytest tests/tools: 15/15 pass, on both the AVX-512 and the AVX2 (X86_V4disabled) numpy paths. Two new regression tests check thathough_peaksandselect_organoidsgive the same result under input permutations with exact ties. The old ordering fails that check in 5 of 5 permutations.python tools/build_assets.pyon the AVX2 path: every derived file is byte-identical to the committed one, andgit diffonassets/derived/*.jsonis empty after the rebuild.node tests/e2e/smoke.mjs(every scene) andgallery?view=organoids --modes: PASS. Tracked files are unchanged afterwards.pages.ymland smoke-tested withSITE_ROOT: colony, kidney, gallery and organoids all PASS.git diff --checkis clean.Not verified from this container: loading the live
github.iosite in a browser, because the sandbox's network policy blocks that host. The deploy job reports success and the URL above.🤖 Generated with Claude Code
https://claude.ai/code/session_016pbMe2Yw2abpatNN7kc6j2
Generated by Claude Code