Skip to content

Release 0.8.3: sandbox S3 special remote + download progress fix - #380

Merged
neuromechanist merged 6 commits into
mainfrom
dev
Apr 28, 2026
Merged

neuromechanist merged 6 commits into
mainfrom
dev

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Promote dev to main, releasing v0.8.3.

Included PRs

Follow-up tracked

Version bump

  • 0.8.3-dev0 -> 0.8.3-dev1 -> 0.8.3-dev2
  • Will tag as v0.8.3 on merge via the auto-tag workflow.

Test plan

  • bun run build clean on dev
  • bun test passes (sandbox/git-annex/verbose tests green; one unrelated pre-existing live-API failure in test/datalad-commands.test.ts:191 reproduces on main without these changes)
  • bunx tsc --noEmit clean
  • bunx biome check clean
  • e2e-sandbox passed CI on commit c9a69ed of fix(sandbox): migrate to S3 special remote, add --verbose #378 (the runtime-equivalent commit before the review-fixes commit that added only dead-code removal, comment trims, and a unit test)
  • After merge: confirm npm publish to latest and v0.8.3 tag created
  • After release: WSL user re-runs nemar sandbox --verbose and confirms training completes

git annex --json-progress nests file/key/command under `action` for byte-progress events; the parser only checked top-level `parsed.file`. Result: inFlight never populated, every ok credited 0 bytes, bar pinned at 0% while files counter advanced (e.g. `0% 134/181 files`).

Update GitAnnexProgressLine in both progress.ts and git-annex.ts to type `action` as {command,file,key} object, and read the file path from `parsed.file ?? parsed.action?.file` for both event shapes.

Migrate progress tests to emit the real git-annex shape via progressEvent/completionEvent helpers; add a regression test covering byte-progress with file nested under action.

Verified live against nm000114: bar climbs 0% to 100%, 181/181 files, 812.2 MB matches precount.
* fix(sandbox): migrate to S3 special remote, add --verbose

The sandbox command used a fragile presigned-URL upload + git-annex
registerurl flow. Errors from git annex add and registerurl were silently
swallowed, leaving WSL/HPC users stuck with no actionable diagnostic.

The same flow was migrated everywhere else in #182; sandbox was the last
holdout. Replace with the validated path: requestUploadCredentials +
configureS3Remote + gitAnnexAdd + copyToAnnexRemote + clearAnnexCredentials.

Also add a --verbose / -v flag that prints every git/git-annex subprocess
invocation, stdout, stderr, and exit code so the next stuck user has
something to report.

Removes now-unused helpers: uploadFileWithPresignedUrl,
uploadFilesWithPresignedUrls, registerUrlWithGitAnnex,
registerUrlsWithGitAnnex, configureWebRemote, PresignedUploadProgress.

Closes #377

* Address PR review: gate, comments, verbose unit test

- Drop the dataFileCount gate that decided whether to run the S3 setup
  based on the backend's upload_urls response. The new flow does not need
  upload_urls, so gating on it is a future-fragile coupling. Always run
  the S3 setup; copyToAnnexRemote is a no-op when there are no annexed
  files. Removes the now-unused uploadUrls local.
- Trim sandbox.ts comments that restated WHAT instead of explaining WHY.
  Keep the clearAnnexCredentials WHY comment, drop the rest.
- Trim verbose.ts docstrings.
- Add test/verbose.test.ts: state round-trip + vlog gating.

Findings #2 and #3 (orphan repo+S3 cleanup, copy-line regex) tracked
separately as #379.
@neuromechanist

Copy link
Copy Markdown
Contributor Author

/review-pr summary (dev -> main)

Ran code-reviewer + silent-failure-hunter focused on the #375 portion (src/lib/progress.ts, test/progress.test.ts) plus version-bump consistency. The #378 substance was already reviewed at #378 (comment) and findings addressed.

Verdict: clean. Ship it.

Confirmations

  • fix(download): parse byte-progress events with action.file shape #375 byte-progress parser correctly handles both event shapes, falls back through parsed.file ?? parsed.action?.file ?? this.currentFile, and skips events without a usable key rather than miscounting.
  • No silent catch blocks introduced. parseGitAnnexProgressLine returns null on bad input; callers null-check.
  • Regression test at test/progress.test.ts:277-313 reproduces the original "stuck at 0% 134/181 files" bug and asserts the fix.
  • Versions match across package.json and backend/package.json (0.8.3-dev2).
  • No dev artifacts (.env, TEST_*, debug console.log) leaked into the dev->main diff.

Follow-up (already filed)

@neuromechanist
neuromechanist merged commit f2199a9 into main Apr 28, 2026
14 of 18 checks passed
neuromechanist added a commit that referenced this pull request Sep 20, 2026
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 added a commit that referenced this pull request Sep 21, 2026
* docs: add the live map for the in-browser compute epic

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.

* docs: correct how the ICLabel work relates to the browser runtime

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.

* docs: separate ICA from ICLabel, and name the weights-serving gap

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.

* docs: record the pipeline products that are coming, and what they constrain

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.

* docs: correct the map against branch state, and two errors in ADR 0069

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.

This branch was previously deployed

2 inactive deployments
development — 0dd0c830 Deployed Apr 28, 2026 by neuromechanist via deploy-dev #187
npm — 0dd0c830 Deployed Apr 28, 2026 by neuromechanist via publish #666
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.

sandbox: surface real errors and add --verbose; migrate off fragile registerurl path

1 participant