Repository navigation
Fix iEEG spatial validation e2e on the epic - #605
Merged
neuromechanist merged 3 commits intoNov 26, 2026
Merged
neuromechanist merged 3 commits into
neuromechanist merged 3 commits into
Conversation
Deploying nemar-website with
|
| Latest commit: |
97781c1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://970328ec.nemar-website.pages.dev |
| Branch Preview URL: | https://fix-issue-604-ieeg-e2e.nemar-website.pages.dev |
neuromechanist
merged commit Nov 26, 2026
c441d5d
into
feature/issue-586-epic-pipeline-progress
3 of 4 checks passed
This was referenced Nov 26, 2026
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.
Closes #604
Part of #588 (epic nemarOrg/nemar-cli#2324)
Root cause
No epic phase is involved. The spec is stale against the data plane: the same tests fail on
origin/staging(b53ffd0, the epic's base, with none of the epic's commits), 3 failures there against 4 on the epic head, so there was nothing to bisect. Since ADR 0034 (subject anatomy, merged 2026-11-19, after these tests were last updated), the Brain panel opens on "This subject's anatomy" whenever the dataset's geometry index has an entry for the electrodes file shown, and thendata-template-statereportsreadyfor the subject's own surface. The geometry pipeline uploadedgeometry/index.jsonfor on005415 (Last-Modified 2026-11-21 19:27 GMT, sub-72 ACPC listed) and on004473 (2026-11-21 19:24 GMT, sub-1 ACPC listed, sub-1 ScanRAS skipped). The failing runs show it: the panel's label reads "This subject's anatomy, from the dataset's own surfaces; approximate alignment (depth contacts)", and on004473's notes start with "Subject surfaces: derivatives/freesurfer-7.3.2/sub-1/surf/lh.pial, ...".The varying failure count is a race on the network: the index is fetched when the panel opens, so a
noneassertion made before the index answers passes, and one made after it fails (the dark-theme run passed on staging; on the epic, on004473 got past the "No brain surface" note and then failed the contacts-only ink check once the subject mesh had been drawn). The "landing fetch failed: upstream_error" log line is unrelated; it did not appear in these runs.Fix
The new behavior is correct per ADR 0034 (decision 1: the subject's anatomy is the default for that file; decision 2: it is drawn in the contacts' own frame and the template is never loaded), so the spec now asserts it rather than the old default. A new helper,
leaveSubjectAnatomy, waits for the subject surface to beready(which also removes the race), checks the selected option, the subject label and the "Subject surfaces" note, then selects the frame itself. Every original assertion is kept unchanged after that:data-template-statenone, the hidden template box, the "No brain surface" sentence, contacts only by ink share, no request for the vendored template's mesh or outlines (checked over the whole test, so it also covers the subject default), and the theme contrast checks. on004473's frame list now expects["ACPC", "ACPC: Subject anatomy", "ScanRAS"]. No source change.Testing
bun run lint,bun run typecheck(0 errors),bunx vitest run src/lib/ieeg-spatial(642 passed)PUBLIC_DATA_BASE_URL=https://data.nemar.org: ieeg-spatial-validation (29 passed), ieeg-subject-anatomy (4), viewer-scalp-map (3), quality-panel (33), ieeg-spatial-panel (28 passed when run alone; in the combined two-worker run one test timed out waiting for the Zarr host to go quiet, a network wait, and passed on the rerun)origin/stagingAgentic AI tools were used in preparing this PR.