Skip to content

Add the live map for the in-browser compute epic - #1459

Merged
neuromechanist merged 5 commits into
devfrom
docs/epic-browser-compute-state
Sep 21, 2026
Merged

neuromechanist merged 5 commits into
devfrom
docs/epic-browser-compute-state

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

This epic runs across four repositories and its state was spread across four issue trackers and one chat transcript. That is how, twice now, a decision that had already been made was nearly remade from memory: the marimo and JupyterLite comparison was run on 2026-09-16, recorded nowhere, and nearly reversed a week later; and the dependency plan for eegprep was about to be executed on an audit method that had already been shown to be unsound.

.context/epic_browser_compute_state.md is the map. It follows epic_central_manifest_state.md as the precedent for an epic state file and is indexed in both README tables.

What it records

  • What the epic is, and which of the four repositories carries which piece.
  • Decisions already made, with where each one is recorded, so they are not re-argued: ADR 0069 for the runtime split and the plot tier, mne is a base dependency, but eegprep is its peer rather than its consumer sccn/eegprep#395 for mne staying, Verify that a figure can ride on a tool result OpenScience-Collective/osa#421 for images on a tool result, the design note for two-run continuation, osa#423 for the notebook verdict.
  • Current state per repository, including osa's six Phase 0 prerequisites with which are settled and which are not, eegprep's six epic phases with their real issue states, and the two held pull requests.
  • What blocks what, as a dependency sketch. The OSA transport track and the eegprep runtime track are independent until the widget needs something real to run; they meet at nemar-cli#1457.
  • Four questions still open, including the one osa#422 explicitly puts out of its own scope: whether a figure persists in session history or only for the continuation, which is a memory question at 1000 sessions per community and a token question on every later turn.
  • Working rules the epic earned, each from a specific incident: a verdict in a transcript is not a decision; "declared but not imported" is a hypothesis; measure the fixture before blaming the transport.

Accuracy

State was verified on 2026-09-20 by querying each repository, not recalled. The document carries that date and says so, so a later reader knows how stale it is rather than guessing.

It is marked STATUS: CURRENT and points at decisions/ for precedence, per the convention in .context/README.md: where the map and an ADR disagree, the ADR wins.

This epic runs across osa, eegprep, nemar-cli and website, and its state
was spread over four issue trackers and one chat transcript. Twice now a
decision that had already been made was nearly remade from memory,
because nothing in any repository recorded it.

The map records what is decided and where, what blocks what, what is
still open, and the working rules the epic has earned the hard way. It
follows epic_central_manifest_state.md as the precedent for an epic
state file, and is indexed in both README tables.

State was verified by querying each repository rather than recalled.
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1459

Version: 0.10.5-PR1459.a1b87a3
Commit: a1b87a3


🤖 Updated on each push.

The map framed phases 4 to 6 as a parallel track and asked where they
meet the lean runtime. That is the wrong question. They are the
capability that makes running ICLabel in a browser possible at all,
built once for whatever surface asks.

Two things follow that the tier tables do not show. onnxruntime has no
WebAssembly build, so inference goes through ONNX Runtime Web and leaves
Python entirely: no package tier grows. What it does cost is the model
artifact, about 11.6 MB at float32, which phase 6 quantizes to int8 and
ships everywhere as one artifact. That is roughly 8 MB, the scale at
which shrinking pays for itself, against the 2.47 MB matplotlib trim
ADR 0069 rejected.

The seam it creates is synchrony, not size: a synchronous pop_iclabel
meeting an asynchronous JavaScript runtime. That is a declared
divergence in ADR 0069's sense and belongs in the eegprep-lean contract.

Replaces the open question with the real one: ADR 0069 lists the ica
tier as python-picard, while the browser ICA path being built is runica
through scipy BLAS, and scipy is already in the preprocess tier.
ICA and ICLabel are two capabilities, not two stages of one. ICA
decomposes and is expensive; ICLabel classifies components that already
exist and is cheap. Keeping them apart is a product decision: NEMAR
intends to serve precomputed ICA weights alongside a dataset, so a
browser session loads a decomposition rather than computing one and then
chooses whether to classify it.

That lowers the stakes on #376 for the NEMAR path without making it
unnecessary in general, and it creates data-plane work that is in no
tracker: where weights live, how they are versioned against the dataset
version they were computed from, and what happens when that dataset is
revised. A decomposition is only valid for the data it came from, and
getting it wrong misclassifies silently.

Also records that 4-bit ICLabel is under investigation against a 3-4 MB
target, including that the arithmetic does not obviously agree with it.
…strain

When NEMAR connects to a supercomputer and runs first-party pipelines,
their outputs become products: ICA weights first, processed data next.
That is not this epic's work and is not available today, but it is close
enough that designing against its absence would be a mistake.

The precedent for serving a first-party derived artifact already exists
and is not the obvious one. The Zarr serving copy is exactly that:
engine-owned, engine-stamped, versioned, served on its own path. ADR
0066's git brokering is the wrong precedent, since it brokers git-tracked
files and builds its capability list from the dataset's version
document, and a pipeline output has neither.

What it constrains now is small and cheap: the eegprep-lean contract and
the recipe surface should name a derived artifact generically rather
than ICA weights specifically, because the first one is weights and the
second will not be.
The map reported four eegprep phases as open because their issues were
open. Every phase pull request, #380 through #385, had already merged
into the epic branch; the issues stay open until the epic reaches
develop. Phase 6 has shipped rather than being planned: iclabel.onnx on
the branch is 2,932,897 bytes at int8, so the 8 MB saving the map
described as future is realized.

This is the failure the map exists to prevent, arriving as issue state
mistaken for work state, under a line claiming it had been verified by
querying each repository. Every row now names what it was checked
against, and says to prefer a file on a branch.

Three further corrections. Browser ICA does not finish: Phase 2
measured runica at 680 seconds and picard at 109 under Pyodide for 64
channels by 60 seconds, neither converging, against an exec_seconds
budget of 120. ICLabel is not free either, since ONNX Runtime Web
brings an 11.2 MB wasm runtime that appears in no table, and saying it
costs nothing in the Python budget was true and misleading. And the
tracks meet twice, the second time at a JavaScript global the widget
must register before Python imports anything.

In ADR 0069: its alternatives list carried its own decision as an
option held in reserve, and its ica tier named python-picard for a path
the benchmark gate rejected. Both corrected in place, with the
correction stated rather than silently applied.
@neuromechanist
neuromechanist merged commit f9637a5 into dev Sep 21, 2026
12 checks passed
@neuromechanist
neuromechanist deleted the docs/epic-browser-compute-state branch September 21, 2026 04:00

This branch was previously deployed

1 inactive deployment
npm — a1b87a31 Deployed Sep 20, 2026 by neuromechanist via publish #2754
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