Repository navigation
Phase 3b: re-vendor eegprep-lean 0.1.0.dev2 and watch upstream - #450
Merged
neuromechanist merged 16 commits intoSep 23, 2026
Conversation
Add sources.toml, one table per wheel in runtime/wheels/, and a test that fails if a wheel has no entry or an entry names no wheel.
sccn/eegprep@b4aa18bd adds read_index's index_url keyword, which nemar-cli dev's browser recipe now requires. Regenerate the lock overlay and update the README's provenance table and the generator test's wheel filename to match.
scripts/eegprep_lean_drift.py compares the commit sources.toml records against the newest commit on sccn/eegprep's develop branch that touches packages/eegprep-lean, never by version string alone (it can sit still across more than one upstream commit). current/behind/unknown, exit 0/1/2; unknown is never reported as current. Real run against GitHub before this PR's re-vendor: behind, recorded 67670f5b/0.1.0.dev1 vs upstream b4aa18bd/0.1.0.dev2. Against the now-committed sources.toml: current.
Add nemar_cli dev's level-0 python_browser recipe (buildHowTo's isLevel0 branch, read_index with index_url) to the data lane, filled for the loopback dataset. Asserts the primary physical read (read_window: shape, unit, rate, labels, values) and the raw digital-counts read the recipe keeps as a fallback. Production's recipe (0.10.5, open_array-first) keeps running unchanged; both pass on the re-vendored dev2 wheel.
Fetch nm000103's live python_browser recipe from mcp.nemar.org and run it verbatim in a fresh uv --isolated subprocess with only eegprep-lean[zarr] installed from the vendored wheel file. The runner (scripts/run_python_ browser_recipe.py) compiles with ast.PyCF_ALLOW_TOP_LEVEL_AWAIT, evaluates to get the coroutine, awaits it, and reports what window/digital bound. Checked what eegprep-lean's CPython transport sends: UrllibTransport already sets User-Agent to 'eegprep-lean', never the bare Python-urllib default the NEMAR hosts refuse, so no workaround was needed. Verified live: passes in ~10s against production. Added as its own target in nemar-mcp-contract.yml, split out from the existing whole-file target so it gets its own pass/fail line.
widget-route-health.yml and nemar-mcp-contract.yml each opened, commented on and closed a labeled issue near-identically; the weekly eegprep-lean watcher would be a third copy. Pull the plumbing into .github/actions/track-issue, taking label/title/failed/report/ recovery_message, still passing text through env rather than interpolating it into the script. Behavior preserved: same labels and titles, nemar-mcp-contract.yml still opens on a setup failure (failure() is disallowed inside a with: value, so that check now reads job.status == 'failure'), widget-route-health.yml still opens/closes only when its own probe step ran, recovery still closes with the same message text. Verified the extracted script logic with a standalone simulation (create vs comment, close vs no-op). actionlint is workflow-only and refuses action.yml outright (no jobs:/ on:), so it was run against the two workflow files, not the composite action. act is not installed on this machine.
Weekly + workflow_dispatch, contents: read / issues: write. Runs scripts/eegprep_lean_drift.py; behind or unknown opens or updates the eegprep-lean-drift issue (via .github/actions/track-issue) with the watcher's report and the refresh procedure's location, current closes it. unknown is distinguished from behind in the issue body, both by the bold status line and by an explanatory paragraph. Verified the shell step locally against the real committed state: unauthenticated it hit GitHub's anonymous rate limit and correctly reported unknown (exit 2), never current; with a token (as the workflow always has via github.token) it reports current (exit 0).
Owner (the OSA maintainer for NEMAR), signal (the drift watcher's issue), build (from sources.toml's commit, with the reproducible SOURCE_DATE_EPOCH command), and proof in order: overlay --check, bun test-data-lane.js, bun browser-harness/chrome.js, then widget_e2e.py --nemar's recipe and prompt scripts against the live archive. Only then update sources.toml and the table.
check_drift returned current by default and relied on each failure path to change it; every return now names its status. reviewed_through acknowledges an upstream commit that leaves the wheel as it is, since a re-vendor needs a new version. A test pins the build command to the recorded commit. Mutation-checked.
if: always() let a cancelled run pass failed=false, which the action reads as green and closes the issue. The watcher's issue title now fits unknown as well as behind. actionlint is clean.
The runner described a bare array by its .data, a memoryview with no dtype. The live test now checks every read's width and dtype, and a physical read's unit. A tool that answers in text fails with its text. Ran against production and nemar-cli dev's recipe on dev2.
Loopback indexes used ids in the reserved exemplar band; they now use nm099900, which nemar-cli declares never resolves. The dev recipe is labeled as transcribed from buildHowTo, not verbatim.
The composite action loads from the workspace, so a failed checkout in the check job would also lose the issue. Each workflow now runs the action in a second job with a sparse checkout, which also gives the health probe issues on setup failures. The check jobs drop issues:write. The watcher's status comes from its status line, never its exit code, and the action refuses a failed value other than true or false. actionlint is clean; act is not available.
An overlay that is not a JSON object, or any crash inside the check, is now an unknown report with its reason, never an uncaught exit 1. Tests cover the human report for each status, GitHub error shapes, wrapped base64 and the JSON fields. Mutation-checked.
The runner called asyncio.run on None for a recipe with no await, which the new offline tests found. A recipe that binds neither window nor digital now exits 3. Mutation-checked.
A structured error answer now fails with its content rather than a KeyError. The data lane builds its two loopback indexes with one helper. The live tests pass against production.
Contributor
Preview Deployment
This preview will be updated automatically when you push new commits. |
Member
Author
Local review, and what was done with each findingThe lead's pass over the implementer's commits came first, then six Sonnet reviewers (code and workflows, tests, error handling, comments and docs, simplification, and the seams with sccn/eegprep and nemar-cli), then a seventh on the reworked workflows. Every finding is addressed except the two noted. The lead's pass (
|
neuromechanist
merged commit Sep 23, 2026
12958fd
into
feature/issue-429-epic-browser-execution
16 checks passed
This was referenced Sep 23, 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.
Summary
The second of three OSA pull requests for phase 3. It re-vendors eegprep-lean 0.1.0.dev2, which nemar-cli's next recipe needs, and turns the refresh into a written procedure that a weekly watcher starts and that a daily check against the live recipe proves.
Why now
nemar-cli
devmakesnemar_read_window'spython_browserrecipe lead withread_index(id, index_url=<contract_base>index.json).index_urlexists only from eegprep-lean 0.1.0.dev2, and OSA vendored dev1. #449's contract check reports exactly this (read_index takes no keyword 'index_url'). This PR closes that gap before the epic finalizes, which is the condition nemar-cli's ADR 0071 sets.What ships
eegprep-lean 0.1.0.dev2, reproducibly. Built from sccn/eegprep
b4aa18bd(#416) withSOURCE_DATE_EPOCHset to the commit's own timestamp, which makes the wheel byte-reproducible: sha25639f33b99...7157582, rebuilt independently three times. Its requirements are unchanged from dev1, sodepends.tomlis unchanged.sources.tomlrecords where each vendored wheel came from: repository, branch, path, commit and build command for eegprep-lean, and PyPI for zarr. A test fails if a wheel and the file disagree, or if the build command names a different commit.A weekly watcher.
scripts/eegprep_lean_drift.pycompares the recorded commit with the newest upstream commit touching the package, never the version string alone, and reportscurrent,behindorunknown. It fails closed:currentis returned only after a fetched, matched commit, and any fetch, parse or crash reads asunknown. Run for real, it saidbehindbefore the re-vendor andcurrentafter. When upstream changes the package without a new version,reviewed_throughrecords that a maintainer read the change and found it leaves the wheel as it is, because a re-vendor needs a new version: a wheel's name is its identity..github/workflows/eegprep-lean-watch.ymlruns it weekly and keeps one labeled issue.One way to track a scheduled check's issue.
.github/actions/track-issuereplaces the near-identical open, comment and close steps inwidget-route-health.ymlandnemar-mcp-contract.yml, and serves the watcher. Each workflow now runs it in a job of its own after the check job, with a sparse checkout of the action, so a check job that fails before its check (checkout included) still opens the issue, and the check job no longer holdsissues: write. A cancelled run leaves the issue alone. The watcher's status is read from its own status line, never its exit code, so a crash reads as unknown.Both recipes, verbatim or transcribed, in the data lane.
frontend/test-data-lane.jsruns production's v0.10.5 recipe and nemar-clidev's level-0 recipe, transcribed line for line from itsbuildHowTo, on the real Pyodide against a loopback index and store. The level-0 recipe'sindex_urlmust land oncontract_base + index.json, and its physical read must equal digital times scale plus offset. The loopback indexes namenm099900, which nemar-cli declares never resolves.The live recipe, run daily on CPython. A network test fetches production's
python_browserrecipe and runs it verbatim inuv run --isolatedwith nothing installed but the vendored wheel, checking every read's width and dtype, and a physical read's unit. It is part of the daily contract workflow. nemar-clidev's recipe, run the same way against dev2, reads (129, 500) float64 in µV and the matching int16 counts.The procedure, written down in
src/assistants/nemar/runtime/README.md: owner, signal, the reproducible build, the four proofs in order, and what to do when upstream moved without a new version.Test plan
uv run pytest -m "not network": 2707 passed, 50 skipped. The one failure is test_version_shows_version fails locally and passes in CI, because rich colorizes on a TTY #434.ruff checkandruff format --checkare clean.bun frontend/test-data-lane.js: 57 of 57.test-worker-core.js108 of 108,test-widget-tools.js99 of 99,workers/osa-worker/test-routing.jsall green, andbuild-runtime-bundle.js --checkcurrent.chrome.js: 40 checks onnemarlike, including eegprep-lean 0.1.0.dev2 loaded by URL with its digest checked and the prelude's transport in place;controlfails to boot, as it must.behind(dev1 at67670f5b) before the re-vendor,currentafter.actionlintis clean on the three workflows.actis not available. A second Sonnet review traced every path through the three workflows (green, check failing, a setup step failing, cancelled, the tracking job's own checkout failing).widget-route-health.ymlalready exists on the default branch, so it is dispatched on this branch to run the two-job form and the composite action for real; the result is in a comment below.Reviewed locally by Sonnet agents; how each finding was addressed is in a comment below.
Closes #424.
Part of #432 and epic #429.