Skip to content

Phase 4b: the notebook surface decision, ADR 0010 - #454

Merged
neuromechanist merged 8 commits into
feature/issue-429-epic-browser-executionfrom
feature/issue-433-phase4-notebook-adr
Sep 23, 2026
Merged

neuromechanist merged 8 commits into
feature/issue-429-epic-browser-executionfrom
feature/issue-433-phase4-notebook-adr

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Summary

Settles #423 with measurements and a decision record, which is what #423 asked for: the 2026-09-16 notebook verdict had survived only in a chat transcript. Part of phase 4 (#433).

Verdict (ADR 0010). Skip marimo as the notebook surface: its WebAssembly (WASM) sandbox rejects the multiprocessing.Lock that numcodecs' blosc codec takes to decompress Zarr chunks, so NEMAR's real read fails in every configuration tried, and the four integration gaps from the original review are all still open against marimo 0.24.2, the current release. JupyterLite pinned to Pyodide 0.29.5 runs the same read end to end. The speed question #423 raised favors neither surface.

Decided 2026-09-23: this release's phase 4c is the editable re-run panel in the chat; a hosted JupyterLite is deferred to #453, which lists its four prerequisites (a pruned build, a hosting origin, that origin in zarr.nemar.org's CORS allowlist in nemar-cli, and a file-receiving extension).

Measured

Chrome 153, 2026-09-23, same machine, one benchmark for all four rows:

Surface Pyodide Trivial cell, cold / warm NEMAR read, cold / warm
marimo 0.24.2 314.0.0 (CDN only) 4.46 s / 3.65 s fails
JupyterLite, default 314.0.0 (CDN) 3.49 s / 2.83 s not run at this pin
JupyterLite, pinned 0.29.5 (self-hosted) 2.69 s / 2.43 s 5.50 s / 3.25 s
OSA's own runtime, boot 0.29.5 2.23 s / 1.82 s (widget read under 10 s, measured separately)

What ships

  • docs/adr/0010-the-notebook-surface.md, in the four sections every ADR here uses, and its row in the index.
  • .context/notebook-surface-measurements.md: method, full results, reproduction commands, the exact code run, the five-gap re-check, and what opening a workspace file takes in each surface.
  • .context/browser-execution-tool-design.md: the persistence section and the notebook open question updated to the verdict.
  • frontend/browser-harness/notebook-bench.js, a manual benchmark (not in CI). chrome.js now exports its launch, connect and network-recording helpers, guarded by import.meta.main as serve.js already is, so the benchmark imports them instead of copying them; attachWithNetwork takes an optional list of target types, defaulting to workers only.

Test plan

  • bun frontend/browser-harness/chrome.js: all checks pass before and after the export change (40 on nemarlike, the control fails to boot, warm and lock change pass).
  • The ADR's versions, CORS behavior, marimo flags, the numcodecs 0.15.1 blosc.pyx line, and every cited file and function were re-verified independently by a reviewer.
  • Reviewed locally by two Sonnet agents; the findings and what was done are in a comment below.

Closes #423.
Part of #433 and epic #429.

@neuromechanist

Copy link
Copy Markdown
Member Author

Local review, and what was done with each finding

Two Sonnet reviewers: one audited the record's claims against primary sources, one reviewed the benchmark script. The substance held; these were fixed:

The record

  • 35 em-dashes in the ADR and 4 in the design-note edit, all replaced. 3664c6f, a878275
  • Abbreviations (CDN, CORS, WASM, OPFS, IDBFS, REPL and others) are now spelled out on first use in each document. One substantive slip was caught in the pass ("CORS-only Pyodide" for "CDN-only"). 3664c6f, a878275
  • The cited CORS gate is _is_authorized_origin, not _is_allowed_origin. a878275
  • The ADR used sections no other ADR here uses. It is now Status, Context, Decision, Consequences, with the method and full results moved to .context/notebook-surface-measurements.md. a878275
  • marimo #8139 had a second same-day comment, which the record now names; neither answers the postMessage request. a878275
  • OSA's "7.9 s cold boot" was a warm figure for a smaller package set. OSA's own runtime is now measured with the same benchmark, cold and warm, and the two figures are kept apart. a878275
  • The decision of 2026-09-23 (the re-run panel now, JupyterLite deferred with its prerequisites) is recorded, and linked to Hosted JupyterLite notebook surface (follow-up to ADR 0010) #453. a878275, 0cdba77

The benchmark

  • It copied chrome.js's helpers and the copy had lost Network.loadingFailed, so a failed request counted as a zero-byte hit. It now imports them, and reports a failed-request count: both NEMAR rows show 2, eegprep-lean's expected discovery probes. c2eb041, fd7fdae
  • Runtime.exceptionThrown is now captured into a failed run's result. fd7fdae
  • A transient "execution context destroyed" skips a poll instead of aborting; a sentinel on the first poll warns. fd7fdae
  • The iframe auto-attach is documented, and the harness README points to the benchmark. fd7fdae
  • Numbers moved by a few hundred milliseconds between runs, and no verdict changed.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Name Link
Preview URL https://feature-issue-433-phase4-not-demo.osc.earth
Branch feature/issue-433-phase4-notebook-adr
Commit aa64518

This preview will be updated automatically when you push new commits.

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.

1 participant