Repository navigation
IS-Q2: close the gaps real-data validation found - #560
Merged
neuromechanist merged 16 commits intoNov 18, 2026
Merged
Conversation
Installs a 10 ms timer and animation-frame heartbeat, a console beat that reaches Node while the page is blocked, and request timing for views.json, the mesh files and the Zarr host in the export test. A run that does not pass leaves them in the annotations. Lint clean; the export test passes with it.
The scope's own render after the panel opens or a window step lands whenever the data plane delivers it; with a slow plane it fell inside a later phase and was blamed on the recompute. A Chromium trace shows it is the scope's WebGL frame read back in a software-GL browser, not decode or compute. Wait for a quiet Zarr host before each phase and judge the budget in every regime.
A recording whose channel names join no contact (nm000377, on004624) kept a disabled toggle and one sentence, and its names were shown nowhere. The toggle now opens a refusal that states the cause in the notes' words, lists the first 12 channel names beside the first 12 contact names as recorded, with counts, and says no rule joined them and nothing was guessed. Missing-coordinates refusals stay disabled. Unit tests on real fixtures; e2e on both datasets.
on004100 declares meters over millimeter-sized numbers, so its contacts land tens of meters out and nothing was visible. When a declared non-mm unit is converted and every drawn contact is then over 300 mm from the origin, a banner on the stage and in the SVG and PNG says so. Positions stay as declared, no template is placed, and the stage is the flat views (the 3D spheres are true-size mm, sub-pixel here). Nothing is rescaled or inferred. The fsaverage affine tests use a head-scale input.
A full run met the embed page showing neither its viewer nor a notice for 90 s (on004624), the symptom IS-QA1 saw once. Record the page's load state, words and the requests it was waiting for when openViewer gives up. The EEG test reloads on the embed's own notice as the others do, and the electrodes file read in the closed-by-names test is retried like the panel's.
QA1_ZARR_HAR replays the Zarr host's real responses from an HTTP archive (QA1_ZARR_HAR_RECORD=1 records one), so the fast regime can be measured on a day the data plane is slow. Unset in a normal run. A 300 ms busy loop in the recompute fails the test under replay (325 ms); dropping the quiet waits fails it under the 3.5 s seam (272 ms, the scope's late render).
Updates the validation note: the Chromium trace of the long task (decode and compute never reach 10 ms per task; every block is the scope's WebGL frame read back at commit), the budget measured in the fast and slow regimes, the closed-by-names and banner rows, 111 plain repeats and 40 repeats of the export test with no stall at the 2D views click, the host's sleep log, and new findings for the viewer, the embed and the panel's owner.
The embed writes a second notice when the Zarr index fails to load, and the spec helpers waited only for the server-rendered one, so a page already saying 'could not load' counted as silent for 90 s. A snapshot of one failure shows it; IS-QA1's silent embed and the other silent failures here match it by symptom. Both specs wait for either notice and reload as they do for the first. The note's finding 12 says what is and is not shown.
Deploying nemar-website with
|
| Latest commit: |
79d9c07
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4bdc6176.nemar-website.pages.dev |
| Branch Preview URL: | https://feat-is-q2-validation-fixes.nemar-website.pages.dev |
Activity read the located rows in slices of 16 channels, one read per slice, and a chunk of the store holds many channels: nm000485 fetched the same 3 byte ranges nine times (27 requests, 11.8 MB for 1.3 MB of samples) and took 25 to 47 s on a slow route. The window is now read once (a span per sample bound), then computed in slices capped by channels and by samples, with a yield after the read and after every slice. After: 3 requests, 1.31 MB, 4.4 s under the 3.5 s seam. A test through the viewer's own reader counts chunk requests against distinct chunks.
Under the units banner the reason the 3D switch is off is now a visible line beside it (with aria-describedby), not only a tooltip on a disabled button. The flat views have no scale bar, so a line in the stage and the figures says their extent (the widest span of the drawn contacts). A contact at exactly 0 0 0 is left out of the 300 mm test: IS-C1 returns a placeholder as written, and one must not hide a file whose real contacts are tens of meters out. e2e covers the line, the description link and the stage's order.
The names lists write a character that does not display (a control, a zero-width or bidi control, a soft hyphen, a no-break space) as a visible escape, flag a name with characters beyond ASCII (a Cyrillic A is not a Latin one and never joins), isolate each name as its own bidirectional run, and name each list by its heading for a screen reader. Tests use control, right-to-left and lookalike names built on a real contact of on005522.
MNI305 and fsaverage are placed only when the values are in millimeters; under the units banner they never are, which holds for both committed fsaverage datasets (on004100, on006253).
The panel spec's first test asserted one read right after ready, but the scope's own render after the panel opens or a step lands whenever its Zarr data does, and its window report re-plans a read. With a 2.5 s late route the original test failed 4 of 4 on the epic base and 1 of 4 on this branch; with the quiet wait it passed 4 of 4. Also corrects the repeat count in a spec comment.
Single read per window (before and after: requests, distinct responses, bytes, ready time, per-task trace), the 1,000,000 sample slice cap and its benchmark, which runs ran on which head and when, the panel spec's pre-existing race, the scale line, and the new chunk sizes.
neuromechanist
merged commit Nov 18, 2026
79607dc
into
feature/issue-537-epic-spatial
5 checks passed
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.
Card IS-Q2 of the iEEG spatial view plan (the intracranial track of epic #537, ADR 0033). Part of #537.
What changed
name-refusal.ts,panel.ts,eeg-viewer.css): a recording whose channel names join no contact (nm000377, on004624) keeps an openable Brain toggle and opens a refusal that states the cause in the notes' words, lists the first 12 channel names beside the first 12 contact names as the dataset wrote them with their counts, and says "No rule joined these names; nothing was guessed."; the credit stays. A refusal for want of coordinates (nm000537, on004642, or channels that name contacts with no position) keeps its disabled toggle and sentence.units-banner.ts,panel.ts,export.ts,eeg-viewer.css): when IS-C1 converted a declared non-millimeter unit and every drawn contact then lies more than 300 mm from the origin (a documented, tested constant), a banner on the stage and in the saved SVG and PNG says "Declared unit m, but the values look millimeter-sized (largest distance X mm from the origin). Positions are shown as declared and are not placed on any template." Nothing is rescaled or inferred; the template is withheld.computeActivityPlanis unchanged. The test now settles the scope before each phase and judges the 200 ms budget in every regime..context/research-ieeg-spatial-validation.md: updated with all of the above (trace, budgets by regime, hang evidence, sleep log, new findings).Trace findings (Chromium 148.0.7778.96, headless, software WebGL; nm000485, 136 channels, 10 s)
activity.ts15 to 16 ms in total, at most 4.2 ms in one task;panel.tsat most 2.0 ms;brain-gl.tsat most 2.3 ms. No task of theirs reaches 10 ms.GLES2::ReadPixelswaiting 181 to 206 ms for the GPU process's software CPU readback of the scope's canvas (138drawArrays, 880 by 656), then 32 to 35 ms for the panel's canvas. It fell inside the Activity phases because the scope's render after the panel opens or a window step lands whenever its Zarr data does.longtaskentries, both; recompute alone): 0 ms in all seven judged or recorded runs: live fast (Zarr median 2 ms), two replays of recorded real responses (median 10 ms), three live slow runs (median 3.0 to 3.6 s) and the 3.5 s seam (median 4.95 s). The scope's own window step is 182 to 259 ms in this browser and is reported beside the budget. One live slow run stalled at the change of measure (not ready after 120 s) and was skipped with its evidence.Gates (head 79d9c07 after review round 1; the epic tip ec75559 is the base, nothing newer to merge)
bun install --frozen-lockfile:Checked 416 installs across 568 packages (no changes)bun run typecheck:Result (523 files): 0 errors, 0 warnings, 19 hints(the base's 19)bun run lint:Checked 451 files in 208ms. No fixes applied.bun run test src/lib/ieeg-spatial:Test Files 15 passed (15),Tests 498 passed (498)bun run test:Test Files 192 passed | 3 skipped (195),Tests 5524 passed | 14 skipped (5538)E2E_PORT=4431 PUBLIC_DATA_BASE_URL=https://data.nemar.org bun run test:e2e e2e/ieeg-spatial-validation.spec.ts(Chromium 148.0.7778.96, headless, dev server, data plane fast) on the head after the round's code changes:27 passed (2.8m). The full run in a slow hour before it had24 passed,3 failedfor a file read that met a 500, a silent embed and the EEG test's own embed notice, all fixed in the helpers.bun run test:e2e e2e/ieeg-spatial-panel.spec.tson the same head:27 passed (2.6m). Earlier runs in a slow hour stopped at a serial-mode failure (an embed notice, a toggle "checking" for 60 s). The first test is a pre-existing race with the scope's own render: with every Zarr response 2.5 s late the original test failed 4 of 4 on the epic base and 1 of 4 on this branch, the settled version passes 4 of 4 (fast plane: 10 of 10 for the original on both).--repeat-each=40 --workers=1,caffeinate -i; product code as then, spec helper before the embed-notice fix):36 passed,4 failed, none at or after the "2D views" click (three before the panel opened with the page responsive and Zarr requests of 11 to 114 s or never finished; one the embed's own notice that the old helper missed).caffeinate -i(45 at 14:24 to 14:33, 6 at 14:33, 60 at 15:55 to 16:09): 111 of 111 completed; the click to the 2D stage took 29 to 43 ms every time.www.w3.org,purl.org) the earlier cards document.bunx astro buildandgzip -9c, base ec75559 and this head built the same way: panel chunk 99,124 raw and 36,107 gzipped to 105,076 and 38,144 (+2,037; 102,998 and 37,383 before the round); viewer chunk 166,137 raw and 58,276 to 58,275 (a file name hash). Beyond the viewer chunk at the epic base (56,848 gzipped): 38,144 + 1,427 = 39,571 bytes, 60 percent of the 64 KB budget.Review round 1 (head 79d9c07)
SLICE_SAMPLE_CAP, 1,000,000), with a yield after the read and after every slice. Live, before (epic base) and after: requests 27 and 27 against 3 and 3, distinct responses 3 and 3 (each nine times against once), bytes 11,797,299 against 1,310,811, ready after 739 and 324 ms against 279 and 280 ms; under the 3.5 s seam, ready after 45.9 s against 4.4 s (switch on) and 47.0 s against 4.0 s (measure), 85 requests over the long-task test against 13. Per-task trace on the fast plane, before and after: Zarr client and codecs 30.6 ms in total against 3.3, at most 1.2 ms in one task both times;activity.tsat most 4.2 against 4.0 ms;panel.tsat most 1.0 against 0.8;brain-gl.ts1.9 against 1.4; no task of theirs reaches 5 ms, so no new long task. The 1,000,000 cap is from a Chromium benchmark (no tracing): band power 8.4 ms at 500,000 samples, 68 ms at 4,000,000; 1,000,000 is about 17 ms by interpolation, not measured at that size. A test through the viewer's own reader counts chunk requests against distinct chunks.aria-describedbyfrom the switch (a disabled button has no focus).MNI305/fsaveragerow says they are placed only when the values are in millimeters and never under the units banner.Revert checks for the round (one line mutated, tests fail, restored byte for byte): per-slice read (8 plan tests; 3 real-reader tests), no yield after the read (2), no yield between slices (2), no sample cap (2), span ignoring the bound (2); reason line never said (1), origin placeholder counted (1), scale label dropped from the figures (1), scale from the wrong distance (3), scale model field dropped (2), invisible characters not escaped (2), non-ASCII not flagged (2), notes dropped (2), no-break space not escaped (1); e2e: reason line hidden,
aria-describedbydropped, scale line hidden, lists not labelled,dir="auto"dropped, isolation dropped from the stylesheet (each fails its named test; Chromium computesisolatefor any list item, so the e2e checks the attribute and the stylesheet text).Revert checks
Each is one line mutated, the named tests fail, the line is restored from a backup and compared byte for byte.
longtaskAPI saw none of the nine blocks); removing the quiet waits fails it under the 3.5 s seam (272 ms, the scope's late render).Deviations from the card
e2e/ieeg-spatial-panel.spec.ts(the on004100 fsaverage template case is gone because the banner withholds it; the embed-notice selector), andpanel.test.ts(the old "disabled when no channel matches" test is replaced by the closed-by-names tests; the fsaverage affine tests take a head-scale known-answer input, the same real contacts read as millimeters, since both committed fsaverage datasets declare meters over millimeter-sized numbers).QA1_ZARR_HAR, replays recorded responses.name-refusal.tsandunits-banner.ts(the card allows a small helper module), each with its test; the banner's wording is declared once inunits-banner.ts.Patch notes for other owners (details in the note)
window_changed, redraws the panel's canvas (18 to 35 ms here); not changed.fsaverageas placed; the banner withholds both committed fsaverage datasets (on004100, on006253), so no dataset in the suite places the MNI305 affine at head scale.Not run, would check
gh pr checks.xx099902, after the owner's merge; the census rerun (not part of this card).Card: IS-Q2. Part of #537