Repository navigation
Epic review: close the XHR redirect hole, add drift tests, align the docs - #460
Merged
neuromechanist merged 11 commits intoSep 23, 2026
Conversation
Architecture, Sequence, Server changes and Phasing now carry as-built notes for the two-run transport: no interrupt(), no checkpointer, and a parked call closed out on next use. The NEMAR adoption row names eegprep-lean and python_browser, and the caps table gains the per-reply run cap.
ADR 0010 names #456 instead of a phase label and says prerequisite 3 needs nemar-cli only off osc.earth. The guide gains the per-reply run cap, spells out URL, OPFS and the File System Access API, and drops double-hyphen dashes.
Comment only; the guard source is bundled, so the bundle and its integrity pin are rebuilt.
Contributor
Preview Deployment
This preview will be updated automatically when you push new commits. |
The drift test matched a single line, so a formatter-wrapped Literal would have failed it loudly. It now reads up to the closing bracket. Checked with a wrapped Literal (passes) and a Python-only status (fails).
neuromechanist
merged commit Sep 23, 2026
58b86cd
into
feature/issue-429-epic-browser-execution
13 of 14 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.
Summary
The fixes from the final review of the epic (#458). Four Sonnet reviewers covered the whole epic across the dimensions no single phase review could see: trust boundaries, contracts between the pieces, release readiness, and consistency across the documents. This addresses every finding except the ones listed under "Not changed", each with its reason.
Security:
XMLHttpRequestfollowed a redirect off the egress allowlistThe worker's
XMLHttpRequestshim checked a URL once atopen()and then let the native implementation follow any redirect, so a 302 from an allowed origin reached anywhere. Thefetchshim was fixed for exactly this in phase 2 (redirect: 'error'); XHR has no equivalent mode. It is now removed from the worker global outright, likeWebSocketandEventSource. Nothing needed it: Pyodide loads its binary, lock and packages withfetch, and the namespace seal already removes every Python path that could reach XHR. Proven in real Chrome:chrome.jsnow serves an allowed path that 302s to a disallowed one, and with the old shim restored, Chrome's XHR followed the redirect and delivered the disallowed body; with the fix, XHR is refused before it looks at a URL andfetchrejects the real 302. Under Bun the old coverage was vacuous, since Bun has noXMLHttpRequestat all.Drift tests where one value was kept in two places
ResultStatusinsrc/api/tool_results.pyagainst the browser's statuses, now declared once inosa-runtime.js(RESULT_STATUS). Mutation-checked in both directions.save_scriptandsave_artifact's docstrings are now generated fromWORKSPACE_LIMITS, and a pytest checks the numbers in NEMAR'sexecute_codedescription against the real module.test.ymlandtests.yml: a pytest asserts the two are identical, step by step.Release
/nemar, then every wheel itsruntime_locklists, and fails unless each is a 200 whose sha256 matches. Verified against a live server, including a wrong hash, an empty lock and a 404.CHANGELOG.mdentry under[Unreleased], which the epic lacked.Documents
interrupt(), no checkpointer), the NEMAR adoption row nameseegprep-leanandhow_to.python_browser, and the network paragraph says XHR is removed.osc.earth.Not changed
abandon_pending_call). The design note now says this is deliberate.test.ymlandtests.ymldiffer. That predates the epic; only the frontend job, which the epic added, is now held equal.frontend/. By design: the image is the API, and the widget ships from Cloudflare Pages (The Docker image never serves /frontend, silently #459, closed).session_idis a routing key rather than a credential, withcall_identropy and the CORS allowlist as the barrier.claude-reviewcheck on Browser execution: run model-written Python in the reader's browser #458 failed inside the action itself (86 permission denials, no review posted); it is not a finding.Test plan
uv run pytest -m "not network": 2718 passed, 50 skipped; the one failure is the known test_version_shows_version fails locally and passes in CI, because rich colorizes on a TTY #434 color-terminal test.ruff checkandruff format --checkclean.test-egress.js80,test-output.js80,test-runtime-lifecycle.js180,test-worker-core.js190,test-widget-tools.js222,test-runtime-bundle.js25;build-runtime-bundle.js --checkandbuild_runtime_lock.py --checkcurrent.chrome.js: nemarlike 43 of 43 (three new redirect checks), control refused, workspace 40 of 40 and 14 of 14 after reload, warm and lock change.Part of epic #429.