Repository navigation
feat(*): move the sandbox to OpenShell and put its network under permissions - #1269
Conversation
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
I reviewed the full github/main...HEAD comparison and the PR OpenShell commits, then traced the executor factory and lifecycle, policy construction, mount/path translation, command and stdio MCP execution, main-agent/subagent/playbook/design-engine callers, config migration, onboarding, upgrade preservation, CLI removals, and compatibility behavior. I also checked AGENTS.md/CLAUDE.md and CONTEXT-MAP.md/CONTEXT.md, relevant history, and the test changes for weakened coverage; I found no plain error or blocker.
Verification: every GitHub check is green, including all four unit shards, coverage, Python lint, repository checks, docs, TUI, RPC, and Windows jobs. Locally, the filesystem had no space under /tmp, so a native uv run environment could not be created. Using an existing Raven environment with this checkout sources first on PYTHONPATH, the focused sandbox/config/onboarding/design/upgrade run printed 1036 passed, 14 skipped; the skips were OpenShell-SDK-dependent, and I interrupted only after that summary because borrowed-environment xdist workers did not exit. A metadata-dependent install-hint assertion was excluded from that rerun because the borrowed environment has base-revision installed package metadata rather than this revision requirement metadata.
|
Windows review — draft "feat(*): run sandboxed commands in OpenShell and retire boxlite" Scope: head MEDIUM — POSIX-only process identity in the new executor: 22 tests fail, and the failure text points at a Linux kernel
On Windows:
Remedy: refuse the backend explicitly and early on Windows (a MEDIUM — the new cancellation test hangs on Windows instead of skipping
Measured: the single test under a 150 s cap exited 124 with no pytest summary (hang); the same file without that test is This is not Windows-only in kind: the test hangs wherever the SDK is absent, because the LOW — onboarding offers OpenShell on Windows and prints an install hint that cannot work there
The only possible outcome is a repeated probe failure. Remedy: hide or disable the choice on Verification (native Windows 11, CPython 3.12)
The one head-only failure in Coverage gapsThe large CLI/RPC/serve suites touched by the diff were not run (each can exceed the run budget); two test files in the diff are deleted by the PR; no real OpenShell gateway was exercised; the UI is untouched. |
|
Blocking: Windows onboarding and the missing-SDK test path must fail explicitly instead of offering an impossible install loop or hanging. The new evidence makes my earlier clean stance stale. I reproduced For the executor itself, the public Focused verification: |
a0aac86 to
da290a4
Compare
|
Both blockers are fixed, and the missing-SDK case was not Windows-specific: the SDK probe sat in front of the monkeypatched executor, so on any host without the SDK the renderer's cancel case waited for a command that was never run. The missing-SDK path fails explicitly ( Windows offers no sandbox choice and no impossible install command ( Also in this round, from my own review and from the earlier Windows review:
The gateway is expected to be a single local replica; the failure advice now says so. |
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
The new commits resolve the prior blocker. I reproduced the formerly hanging missing-SDK cancellation case under a 20-second external cap; it and the explicit missing-SDK error test both passed. Windows onboarding now removes the unsupported OpenShell choice and returns platform-specific guidance, while the executor guards host identity and uses the shared cross-platform process-liveness helper.
I reviewed the full github/main...HEAD comparison using the earlier reviewed series plus range-diff and the six new commits. I covered AGENTS.md/CLAUDE.md and the context rules, the diff, factory and lifecycle callers, relevant history, backward compatibility, test changes for weakened coverage, and the OpenShell architecture constraints (single gateway replica, root-host behavior, deadlines, cleanup, mounts, and SDK/platform limits). I found no plain error.
Verification: the focused changed-file run was 815 passed, 13 skipped, 1 deselected. The skips require the unavailable OpenShell SDK. The deselected assertion reads installed Raven distribution metadata, which the borrowed environment does not contain; the initial run reached 757 passed and then failed only because it saw the documented no-metadata fallback. GitHub CI ran the real project environment and is fully green, including all four unit shards, coverage, Python lint, repository checks, docs, UI/RPC, and Windows jobs. No real OpenShell gateway was configured locally.
There are no review threads from me to resolve.
|
Windows review — head Scope: the delta since the reviewed head The three findings from the previous review are fixed, and I re-measured each:
LOW — six tests assert the non-Windows branch without pinning the platform, so a Windows run is redThe new platform-dependent helpers are correct, but their tests call them on the host platform. Measured at this head (failures that do not exist at base
Remedy: pin the platform for the POSIX-branch assertions the way the new win32 tests do in reverse — LOW — non-interactive onboarding still reports a sandbox on Windows
Verification (native Windows 11 10.0.26300, python 3.12.13; detached worktrees
Coverage gaps: no OpenShell gateway exists on this host, so the Linux/macOS executor paths were code-read (and are skipped by the suite on win32); the full suite was not run; no live onboarding session beyond the tests. |
da290a4 to
86606eb
Compare
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
I reviewed the full authored range and the final one-commit delta that arrived during this review. Coverage included AGENTS.md and the relevant context rules, the diff, sandbox-network callers and history, backward compatibility and config migration, whether tests were weakened, and the runtime-approval architecture.
The final delta makes the fake control plane match the real gateway contract by returning the relay-close event after a command. It removes the strict-idle regression without skipping, exempting, or loosening a test. Locally, the two formerly slow executor tests pass under --idle-ceiling-strict in 1.07s; the focused executor, denial, and network-policy set passes 152 tests with 16 skips because the OpenShell SDK is unavailable. Current GitHub checks are passing or still running, with no failures at this head. No real OpenShell gateway was available for an end-to-end run.
|
Windows review — draft "move the sandbox to OpenShell and put its network under permissions", head Scope: since the last reviewed head LOW — the Windows skip branch says commands will "run directly" but leaves the backend configured as OpenShell
Remedy: persist LOW — the new skip-path test fails on a Windows host because it asserts the POSIX message
The earlier install-hint test finding is addressed — those tests now pin Verification (native Windows 11 10.0.26300, python 3.12.13; detached worktree
Coverage gaps: no OpenShell gateway exists on this host, so executor and network-policy runtime behavior was read, not exercised; the UI/TUI approval surfaces were not run; the rest of the 132-file expansion was not reviewed for Windows beyond the files above. |
|
No blockers; suggestions only, and they are marked inline. I accept both Windows findings as concrete, and they change my stance from clean to nonblocking. The skip/non-interactive branch says commands run directly but leaves This does not meet the late-round blocking bar. The product failure requires Windows, a pre-existing or migrated non- Verification: the targeted test passes on Linux ( |
37ccdc8 to
dfba665
Compare
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; suggestions only, and they are marked inline.
I reviewed the seven genuinely new sandbox commits after separating the rebase with git range-diff. I covered the repository rules and context terms, the new diff and its callers/history, compatibility with the newer main base, the migration and runtime approval paths, whether tests were weakened, and the sandbox-network architecture.
The new policy comparison, renderer read-only path, shorter MCP refusal wait, deny precedence, failed-grant feedback, shared-sandbox prompt note, and bounded denial window are consistent with their callers and tests. Focused verification completed with 191 passed and 16 skipped because the OpenShell SDK is unavailable. Current GitHub checks are passing or still running, with no failures reported at this head.
The existing named follow-up remains: on Windows, skipped/non-interactive onboarding can say commands run directly while retaining an openshell backend, and its POSIX-assuming test is not platform-pinned. That narrow, recoverable path remains nonblocking under the late-round bar; this revision can merge as it stands.
dfba665 to
e557cb5
Compare
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
I reviewed the one genuinely new commit after separating the rebase with git range-diff. I covered the repository rules, the delta and onboarding callers, compatibility with the rebased main, the existing Windows recovery behavior, and whether the tests were weakened.
The prior named follow-up is closed: skipped or non-interactive Windows onboarding now truthfully says the retained OpenShell backend cannot run commands on that host and gives both supported recovery paths, while the POSIX assertion explicitly pins Linux and two Windows cases cover skip and non-interactive modes. Focused verification: 4 passed, 377 deselected.
One GitHub unit shard is red only because the uv setup action timed out fetching its version manifest; it failed before dependency installation or test execution. Other checks are passing or still running, and this is not a code failure.
|
Windows review — "move the sandbox to OpenShell and put its network under permissions", head Scope: the PR is now ready for review at 132 files, +8271/−8995 against current main The two findings from the previous review are fixed.
The one remaining head-only failure is the harness artifact reported before: Windows checks of the new code: no new unguarded POSIX surface. Verification (native Windows 11 10.0.26300, python 3.12.13; detached worktrees
Coverage gaps: no OpenShell gateway exists on this host, so the executor and the real-gateway test were not driven; the approval surfaces (web/TUI) were not run; the rest of the 132-file expansion was reviewed for Windows only along the files above. |
|
Not a blocker -- two verified gaps worth a decision before merge. Severity of this one finding, not a verdict on the pull request. Any blocking findings from this pass are review threads on the changed files; GitHub renders those collapsed, as a file name with no text.
|
e557cb5 to
268251b
Compare
|
On the two gaps in #1269 (comment): both are fixed in this push rather than deferred.
|
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
Reviewed the five-commit delta from the previously reviewed equivalent head through 268251bbf1a3, including the two blocker fixes, Raven-Code sandbox inheritance, and fail-safe policy narrowing. I checked the repository rules and domain context, the changed code and callers, commit history/range-diff, backward-compatible launcher fallback, the OpenShell policy architecture, and the new tests for weakening or false-green coverage. Both original reproductions are closed by the implementation, and I found no new plain error.
Verification: PYTHONPATH=plugins-dist/everos-memory:plugins-dist/everos-cloud-memory:plugins-dist/design-engine:plugins-dist/ppt-engine uv run pytest -o addopts="" tests/test_config_live.py tests/test_permissions_sandbox_network.py tests/test_sandbox_openshell_executor.py tests/test_agents_code_launcher.py tests/test_config_product_render.py -q -> 549 passed, 18 skipped. The initial run without those source paths failed during autouse setup because optional plugin modules were unavailable; it did not execute the selected tests.
The two remaining open blocker threads were opened by @0xKT, so I acknowledged the verified fixes but did not resolve them.
…CP tool runs The policy was synced only before exec, so a sandbox whose traffic came from a stdio MCP server kept an older, wider policy after the user narrowed permissions.network. start_process and every sandboxed MCP tool call now sync first through ready_network, and neither runs while a change that takes something away has not loaded.
…from allowNet A wildcard inside a label (api*.example.com) passed validation but never matched a refused host, so a deny rule naming one refused nothing, and OpenShell stops a sandbox from activating on such a pattern. A wildcard now stands for whole labels. The allowNet migration copied old entries verbatim, and forms the old field took (host:port, an address range, a two-label wildcard) made the migrated config fail validation at startup. A host:port entry now becomes a rule for that port, and any other entry no rule can hold is left out and named in the notice, which only narrows a closed list.
Under the open default, any deny rule for one of the apex names removed that name on every port and for every program, so blocking ssh to github.com on port 22 also refused an https clone, while refusing_rule honoured the ports and asked about it. A deny rule now takes the ports it lists from the name, and the whole name only when it lists none. The open set names no program, so another program refused one of those ports is asked about.
SandboxRenderBackend built its executor without a gateway, so render jobs went to the CLI's active gateway whatever tools.sandbox.gateway named. The service locator now lends the host's sandbox gateway to every plugin factory, since whichever builds first may build what a plugin's tools share, and the design engine passes it down to the render executor.
Every executor builds an SDK client, which holds a gRPC channel and any OIDC refresher, and none was ever closed, so sub-agents, DAG nodes and render jobs leaked sockets until garbage collection. stop() now closes a client the executor built once its sandbox is deleted, and a restart builds a fresh one; a control plane handed in stays its caller's.
…helper supports_network_grants and DraftChunk.binary had no reader, and the permissions package defined the same tail-shortening helper twice; judge now owns it and sandbox_network imports it.
Comments cited a decision label that exists only in a pull request description, and an upstream issue number; they now state the reason itself.
Two tests assert that a warning is logged once but did not reset the module-level set that remembers it, so a worker that had logged it earlier would fail them.
… on it A failed start queued the sandbox's delete, and a caller that then ran stop(), as the design renderer does, closed the client the executor had built before that delete ran. A sandbox the gateway had made then stayed up until the process exited: its pid label names a live process, and the orphan sweep runs once per process. The same close could cut off the orphan sweep's own deletes, queued on that client by the first start, and a start that failed inside `async with` never closed the client at all. Each plane now counts the deletes running on it; stop() and a failed start release a plane the executor built, and it closes when its last delete ends.
needs_person is public in raven.acp_client.permissions, as host_refusal is, but was missing from the module's __all__.
Treat only FileNotFoundError as missing preferences. Keep the last readable config across other OS errors so a first failed read closes sandbox networking and an existing policy keeps its rules. Cover permission, directory and generic read failures, recovery, and the distinct behavior of a genuinely missing file.
Pass the disk reader to the policy source instead of capturing the network permissions when preflight starts. Cover closing the default and replacing an allow rule with a deny rule during a running preflight, including later recovery.
1bb0347 to
c522af8
Compare
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
Reviewed github/main...HEAD and the effective delta from 1bb03476593a, including repository rules and runtime terminology, range-diff/history, changed code and callers, backward compatibility, test integrity, and the live-config/OpenShell policy-source architecture. The rebase preserves the previously reviewed patches; the two new fixes correctly retain a last valid network policy across read errors, fail closed when no policy was ever readable, and let a running playbook MCP sandbox narrow and recover its policy before later commands. I found no plain error worth raising.
Verification: the focused config, playbook, grant, and OpenShell suites passed with 279 passed, 16 skipped. After the repository source-language command recreated the Python 3.12 environment, the directly changed config and playbook suites passed again with 170 passed. git diff github/main...HEAD --check and scripts/check_source_language.py github/main...HEAD passed. (make is not installed in this worktree environment, so I ran the Makefile target's underlying uv command directly.)
…missions Read the playbook sandbox's network permissions through a LiveConfig held for the preflight, the reader the main loop and subagents already use. A torn or invalid read now keeps the last valid set, where it used to close the network and reopen it on the next read: two policy reloads, with a tool call in between run without network. A config that has never validated still closes the network, and a missing one still answers the open default. Remove network_on_disk, which has no other caller. The live reader's tests already cover each of its cases.
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
Reviewed github/main...HEAD and the effective delta from c522af8167fe, covering the repository rules and runtime terminology, diff and history, callers, backward compatibility, test integrity, and the live-config/OpenShell policy-source architecture. The per-preflight LiveConfig is retained by the policy closure and correctly keeps the last valid network permissions across torn, invalid, and OS-error reads, while a first invalid read still closes and a genuinely missing file still uses the open default. Removing the PR-internal network_on_disk helper leaves no caller; its cases remain covered by the live-reader tests and the new playbook-level tests, so the deletion does not weaken coverage.
Verification: uv run pytest -o addopts='' tests/test_config_live.py tests/test_playbook_mcp.py tests/test_permissions_network_grants.py tests/test_sandbox_openshell_executor.py -q with the repository plugin sources on PYTHONPATH -> 279 passed, 16 skipped. git diff github/main...HEAD --check and scripts/check_source_language.py github/main...HEAD passed. No unresolved review thread opened by me remains.
The mounted-root path translator rewrites a host root only when the character after it ends the string or is a separator, so /srv/workshop is never read as /srv/work. Nothing pins that boundary at its current home: if it ever slipped, a sibling directory sharing a prefix would be rewritten to the workspace mount and the command would run against the wrong files inside the VM. Three tests pin it, on both the POSIX and the Windows spelling of the root. No production code changes; the translator moved from BoxliteExecutor into MountTable with the OpenShell migration (EverMind-AI#1269), and these tests moved with it. Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
…1295) ## Summary Skills reached the model two ways, picked by `skillForge.discovery`. Push ran an LLM query rewriter and an LLM gate on every turn and rendered the chosen bodies into a `# Skills` segment. Pull, the default, puts a short name and description menu in the turn's user envelope and lets the model call `find_skill` and `read_skill`. Both read the same `SkillForgeRouter`. This PR removes push, so pull is the only path and no turn spends a model call choosing skills. Removed: - `SkillsSegmentBuilder`, `QueryRewriter`, `LLMGateFilter`, `resolve_refs`, and the router renderer and delivery note only that segment used; - the gate model pin: `skill_gate_pin`, its rows in the config tool's settings surface, its `settings.set` checks, and the skill gate role on the web settings page with its i18n strings; - the push-only config fields `discovery`, `rewriteMaxTokens`, `injectionMode`, `injectMax`, six of the seven `llmGate*` fields, and `router.topK` (`llmGateEnabled` and `rewriteEnabled` stay declared but unread, see below); - `scripts/skill_forge_full_e2e.py`, and the segment stage of two other scripts. Config compatibility: `SkillForgeConfig` forbids unknown keys, so migration 18 drops those keys from older files, in both spellings, including `topK` in a legacy top-level `skillRouter` block (that block is nested into `skillForge.router` in memory only, after the migrations run). A config that set `discovery: "push"` gets a notice that skills now arrive as a menu. The strip also runs on every later load, so a rollback that writes the keys back still loads. Two of the keys stay declared on `SkillForgeConfig`, read by nothing and excluded from every dump: `llmGateEnabled` and `rewriteEnabled`. Evolver is maintained on its own and is not edited here, its activation probe builds the model with both, and `ty`, which CI runs over `evolver/`, would refuse that call without them. The migration still drops both from files, and `settings.set` still refuses them. Readers of old traces keep working: the trajectory view and the tracing viewer still label `skill.gate` and `skill.rewrite` spans, though nothing produces them now. Also in this PR: - The estimate prompt (`ContextBuilder.build_system_prompt`, used for the token budget) stops rendering a skill directory that no request carries. - `read_skill` and `use_skill` stop pointing the model at a `# Skills` context. Three fixes found on the way or in review, kept here because they sit on the same code: - A raven-loop sub-agent fenced by `restrictToWorkspace` was told to `read_file` a builtin SKILL.md that lives inside the installed package, outside both roots it may read. It now registers `read_skill` over agent home's catalog, held to the run's effective skill allow-list (`skills_allow`, the row and node lists narrowed together) and the live `skillForge.blocklist`, and its skill menu names that route when the tool is there. - `skill.read` spans took `skill.source` from the id prefix, so every on-disk skill read as `local`. `read_skill` and `use_skill` now resolve the layer through their registry (`builtin`, `workspace`, `hub`, ...); an id the registry does not hold keeps its prefix. - A memory-backend id (an evolved skill or a case from the agent track, `everos/<id>`) had no body route. The menu and `find_skill` offered it, but `read_skill` and `use_skill` looked a non-hub id up only on disk, where the backend writes nothing, so every read failed, under pull on main as well; push was the one path that carried those bodies, by rendering the hit text into its segment. The router now holds the hits it returned, the latest 256 by qualified id, and drops a source's hits when a memory switch removes it or rebinds it in place to another backend or agent; `read_skill` and `use_skill` serve a held hit's text when the disk has no such skill, refusing a blocklisted name. After a restart nothing is held, and the miss names `find_skill`, which puts every id it returns back. A tool built without a router (a sub-agent's) names no search on a miss. PR #1292, which deleted the `skills_injected` sink this branch had also edited, landed first; this branch takes its deletion. Not done here: dropping `llmGateEnabled` and `rewriteEnabled` once Evolver stops passing them; pull never had the push segment's `deliver_files` note after a Hub body; the Evolver activation audit still reads `skill_injections.jsonl`, whose writer was already unreachable on main; a confined sub-agent can still `read_file` a skill under agent home by path whatever its allow-list says, because agent home is one of its two readable roots on main as well; and the registry and local pool docstrings still describe an EverOS writer under `skills/everos/` that no longer exists. ## Type - [ ] Fix - [ ] Feature - [ ] Docs - [ ] CI / tooling - [x] Refactor - [ ] Other ## Verification This round, rebased onto `origin/main` c3be94a and run in a Python 3.12.13 env synced with `uv sync --frozen --all-extras --python 3.12`. That main brings #1269, which takes config migrations 16 and 17, so this PR's migration is now 18, #1292 and #1314; the rebase conflicts were that number, the tests both sides appended to `test_config_loader.py`, the sink code #1292 deleted, and the comment above `ROLE_ROWS` in the settings skeleton, beside which #1314 added `PluginsWait` (both kept; `ROLE_ROWS` stays 10, the length of `ROLES`). - New tests for an in-place memory rebind: `test_agent_loop_memory_rebind.py` gains one case per spelling (the same name with another backend and agent, and a rename to `everos-cloud`) that the old backend's held hits are forgotten, and `test_skill_router_fusion.py` one that `forget` drops only its own source's hits. Both rebind cases failed before the fix with the old backend's body still held. A rebind that never forgets, a `forget` that drops nothing, and a `forget` called after the rename each fail one of them. - New tests for the memory-backend reads: 4 in `test_skill_router_fusion.py` (a returned hit is held, only the latest are held, a hit returned again is held as new, removing a source drops its hits); 12 in `test_skill_hub_tools.py` (for each tool: an id `find_skill` listed and one the scent menu offered both read back, a miss names the search that brings the id back, switching memory off forgets the hits, a blocklisted held name is refused, and a tool with no router names no search); and 1 in `test_agent_loop_skill_tools.py` that drives the loop's own `find_skill`, `read_skill` and `use_skill` against the engine's router. Before the code, that loop test failed with the reported text ("Error: no everos skill 'sk_42' found. find_skill lists the ids that resolve."), the two no-router cases failed on the old miss text, and the rest could not import the helper they drive. The test this PR had added, which pinned that miss as correct, is replaced by them. - Mutations, each failing at least one of the new tests: no held lookup in `read_skill`, or in `use_skill`; no blocklist check on the held name in either; neither tool wired to the router in the loop; a router that holds nothing, never evicts, never refreshes a returned hit, or keeps a removed source's hits; a lookup bound to the first router instead of the live one; and the miss hint given always, or never. - Full suite, `pytest -q -n 4`, with the fixes on c3be94a: 40408 passed, 12 failed, 266 skipped. The 12 fail the same way on an unmodified c3be94a on this machine, which has an environment HTTP proxy, a system node 18, no converter for legacy `.xls`, and git 2.34, whose `git apply` has no `--allow-empty`: five in `test_config_update_providers.py`, four in `test_evolver_git_ops.py` (added on main by #1273), and one each in `test_install_script.py`, `test_knowledge_parser_excel.py` and `test_subagent_node_runtime.py`. One run of `test_config_loader.py` on its own also failed `test_a_current_sandbox_block_is_left_byte_for_byte` (from #1269) once, then passed four times: it asserts the process-wide migration notice list is empty without draining it first, and 30 earlier tests in that file leave notices behind, on main as well as here, so it fails whenever xdist puts one of them before it on the same worker. A full run on d7c98c1 under an outside load spike (a 15-minute load average above 1000) also failed nine timing-bound tests, among them `test_skill_router_fusion.py::TestSkillForgeRouterSelect::test_concurrent_execution`, a wall-clock check from main; the nine passed three runs out of three on their own, and every count quoted here comes from a run at normal load. - `ruff check .`, `ruff format --check .`, and `ty check raven evolver agents plugins-dist scripts`: clean. ui-tui `node scripts/gen-i18n.mjs --check` and ui-web `npm run gen:check`: up to date after the rebase. ui-web after the `Skeletons.tsx` conflict: `tsc --noEmit` clean, `eslint src/features/settings` clean, `vitest run --no-file-parallelism src/features/settings` 271 passed in 19 files. - `scripts/check_commit_messages.py origin/main..HEAD`, `scripts/check_source_language.py origin/main...HEAD` and `scripts/check_large_files.py origin/main...HEAD`: exit 0. Earlier rounds, on 978cca8 and then 51b40ee: - New tests: the migration (5 in `test_config_loader.py`), the retired fields (12 in `test_config_raven_sections.py`, one of them pinning that the two kept fields are declared and never written), the estimate prompt (`test_skill_forge_loader_parity.py`), the sub-agent route and its allow-list (5 in `test_subagent_workdir.py`), and `skill.source` (4 cases in `test_tracing_api.py`). All were seen red before the code except three guards that pin behaviour the change keeps: a migrated key written back by a rollback, a sub-agent without `read_skill` keeping the `read_file` route, and an unknown id keeping its prefix. - Mutations: dropping the sub-agent's blocklist reader, passing it no allow-list, disabling the allow-list check in `read_skill`, or turning its menu back to `read_file`, each fails a new test. Kept code that the deleted test files also reached was mutated too: disabling the `autoInstall` consent gate still fails `test_skill_hub_policy.py`; forcing `SkillHubClient.install` to fetch the detail again survived every suite, on main as well, so `test_skill_hub_client.py` gains a test that kills it. - Full suite, `pytest -q -n 4`, after the rebase: 39918 passed, 9 failed, 1 error. Eight fail the same way on an unmodified main on this machine, which has an environment HTTP proxy, a system node 18 and no converter for legacy `.xls`: five in `test_config_update_providers.py`, and one each in `test_install_script.py`, `test_knowledge_parser_excel.py` and `test_subagent_node_runtime.py`. The ninth, `test_node_stderr_replay.py::test_a_reason_written_on_stderr_while_the_link_was_down_reaches_the_run_watching_it` (its teardown is the error), hit a test deadline under load ("did not happen in time"); it passes 3 of 3 runs on its own, and this change touches nothing under `raven/node`. - Evolver left as it is on main: with its activation probe back on the main version, `tests/test_evolver_activation.py` failed 3 of 3 before the two fields were kept (`extra_forbidden`) and passes with them; removing either field, or the `exclude` on either, fails a test. Full suite, `pytest -q --ignore=tests/integration` with the box's HTTP proxy variables unset: 39923 passed, 3 failed, 266 skipped; the three are the `test_install_script.py`, `test_knowledge_parser_excel.py` and `test_subagent_node_runtime.py` cases named above. - After rebasing onto 51b40ee, whose only change is under `ui-web/`: the 42 test files that touch SkillForge config plus `tests/test_evolver_activation.py`, 2953 passed, 1 skipped; `ty check raven evolver agents plugins-dist scripts`, clean. - T3.13 as rewritten: the four picks and four clears it describes, replayed through the `settings.set` handler on a scratch config, each returned only `applied` and `previous`; the config held the picks, then null; `skillForge.llmGateModel` and `skillForge` were refused as not writable. No live host or page was driven. - ui-web: `vitest run --no-file-parallelism src/features/settings src/features/trajectory` 723 passed in 41 files; `npm run type-check`, `eslint src/features/settings` and `npm run gen:check` clean. ui-tui: `node scripts/gen-i18n.mjs --check` up to date. - `ruff check`, `ruff format --check`, and `ty check raven evolver agents plugins-dist scripts`: clean. - `scripts/check_commit_messages.py origin/main..HEAD`, `scripts/check_source_language.py origin/main...HEAD`, `scripts/check_large_files.py origin/main...HEAD`: exit 0. - [x] Relevant tests pass locally - [x] Relevant lint / type checks pass locally - [x] User-facing docs or screenshots are updated when needed Docs: `skills-and-extensions` (en and zh) describe the one path, and their cost row no longer lists skill rewrite and gating; `tracing-api` (en and zh) says what `skill.source` holds; `CONTEXT.md` updates every entry that named push or the gate (Skill Discovery, Prompt Segments, Turn Scratch, SkillForge and the LLM Purpose list among them), and Skill Discovery says how a memory-backend id is read; under `docs/specs`, acceptance row T3.13 and the A20 and `settings.set` rows of the settings design are rewritten for curator and session naming, and the other mentions carry a dated amendment. The docs site was not built locally. ## Risk - [x] Security impact considered - [x] Backward compatibility considered - [x] Rollback path is clear for risky changes User-visible changes: a deployment that set `discovery: "push"` now gets the menu and loses the per-turn rewriter and gate calls; the skill gate role is gone from the settings page, and `settings.set` refuses its keys; the `read_skill` and `use_skill` descriptions and the sub-agent skill menu read differently to the model; trace readers that compared `skill.source` with `local` now see the layer; a memory-backend skill or case that the menu or `find_skill` names now reads back through `read_skill` and `use_skill`. Security: a sub-agent confined by `restrictToWorkspace` can now read builtin skill bodies, which ship in the package, through `read_skill`; it reads nothing else through it, and its effective skill allow-list and the operator blocklist each apply to its menu and to the tool alike. The hits a router holds belong to one agent's router, and a read by id returns only text that a search of that agent's sources already returned; a switch to another backend or agent forgets the old one's hits, and a blocklisted name is refused on the read too. Compatibility: `SkillsSegmentBuilder`, `QueryRewriter`, `LLMGateFilter`, `RewriteResult`, `resolve_refs` and `skill_gate_pin` are gone from their packages, so outside code importing them breaks; nothing in this repository or its plugins does. Rollback: revert the squash commit. A config already cleaned by migration 18 keeps running on pull, the default, until the keys are set again. ## Related Issues N/A
## Summary Bump the package version from 0.2.7 to 0.2.8 for the next release. Only pyproject.toml and uv.lock change. Since v0.2.7, main gained 124 commits: 28 features, 70 fixes, nine perf, five dependency bumps, four refactors, three docs, three tests and two chores. The larger changes are the sandbox moving from boxlite to OpenShell with its network under the permission set (#1269), handing a task's work to agents (#1259), carrying a replan's unfinished nodes into a successor run (#1206), switching the memory backend live from Settings (#1186), the context window analysis opened from the composer (#1205, #1229), Agent Plugin packages listed in web settings (#1314), session search on Cmd+K (#1310), prompt recall in the web composer (#1189), and the DSH and MiniMax Code ACP presets (#1211, #1199). Two changes remove something: #1269 retires the boxlite backend (a boxlite-era `tools.sandbox` block is migrated to OpenShell on load) and #1295 removes push skill discovery with its config fields. Neither carries a BREAKING CHANGE footer, and the release notes will call both out. The maintainer chose a patch bump, the way v0.2.1 through v0.2.7 were for their features. The stable tag goes straight on the merged commit, with no rc dry run this time; the release notes follow once the draft exists. uv.lock is regenerated with uv 0.12.12, which leaves only the raven version line changed (uv 0.9.x rewrites unrelated dependency markers and uv 0.13.x raises the lock revision). ## Type - [ ] Fix - [ ] Feature - [ ] Docs - [ ] CI / tooling - [ ] Refactor - [x] Other ## Verification - `uvx --from uv==0.12.12 uv lock` on a clean worktree cut from origin/main: Updated raven v0.2.7 -> v0.2.8 - `git diff --numstat origin/main..HEAD`: one line each in pyproject.toml and uv.lock - `uvx --from uv@latest uv lock --check` (uv 0.13.9): exit 0, so the `uv export --locked` step in release.yml accepts the lock - `PYTHONPATH=. python3 scripts/check_commit_messages.py origin/main..HEAD`: exit 0 - `npx commitlint --from origin/main --to HEAD --config commitlint.config.cjs`: exit 0 - No test run: the change is version metadata only. - [ ] Relevant tests pass locally - [x] Relevant lint / type checks pass locally - [ ] User-facing docs or screenshots are updated when needed ## Risk No code change. Rollback is reverting this commit before any v0.2.8 tag is pushed. - [ ] Security impact considered - [x] Backward compatibility considered - [x] Rollback path is clear for risky changes ## Related Issues N/A Co-authored-by: Claude (claude-fable-5-2) <noreply@anthropic.com>
The mounted-root path translator rewrites a host root only when the character after it ends the string or is a separator, so /srv/workshop is never read as /srv/work. Nothing pins that boundary at its current home: if it ever slipped, a sibling directory sharing a prefix would be rewritten to the workspace mount and the command would run against the wrong files inside the VM. Three tests pin it, on both the POSIX and the Windows spelling of the root. No production code changes; the translator moved from BoxliteExecutor into MountTable with the OpenShell migration (EverMind-AI#1269), and these tests moved with it. Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
…aws (#1302) ## Summary The mounted-root path translator rewrites a host root only when the character after it ends the string or is a separator, so `/srv/workshop` is never read as `/srv/work`. Nothing pinned that boundary at its current home: if it ever slipped, a sibling directory that happens to share a prefix would be rewritten to the workspace mount, and the command would run against the wrong files inside the VM. This PR originally pinned the boundary on `BoxliteExecutor._translate_process_path`. The OpenShell migration (#1269) removed the boxlite executor and moved the translator into `MountTable.translate_process_path` (`raven/sandbox/mounts.py`), so the three tests now live in `tests/test_sandbox_mounts.py` under the existing `TestTranslateProcessPath` class, written against `MountTable` with the same monkeypatched-roots pattern the neighbouring cases use. The boundary itself is unchanged: the same `(?=$|[\\/])` guard. The three tests pin the same four shapes on both the POSIX and the Windows spelling of the root: the root alone (`/srv/work`, `C:\workspace`) and the root with a child suffix (`/srv/work/d`, `C:\workspace\pkgs`) translate, while a longer sibling (`/srv/workshop`, `C:\workspaces`) and a dash-suffixed sibling (`/srv/work-old`, `C:\workspace-old`) both stay untouched. No production code changes. ## Type - [ ] Fix - [ ] Feature - [ ] Docs - [ ] CI / tooling - [ ] Refactor - [x] Other (test-only: pins existing behaviour, no production code changes) ## Verification - [x] Relevant tests pass locally - [x] Relevant lint / type checks pass locally - [ ] User-facing docs or screenshots are updated when needed (not needed: no behaviour or user-facing surface changes) - `uv run --frozen --python 3.12 pytest tests/test_sandbox_mounts.py -q` -> `19 passed` (16 before, 3 new) - `uv run --frozen --python 3.12 pytest tests/test_sandbox_mounts.py tests/test_sandbox_unit.py -q` -> `106 passed, 4 skipped` (skips are environment: no `openshell` module locally; with `openshell` importable the same run is `110 passed`) - `uv run --frozen --python 3.12 ruff check tests/test_sandbox_mounts.py` -> `All checks passed!` - `uv run --frozen --python 3.12 ruff format --check tests/test_sandbox_mounts.py` -> `1 file already formatted` - `make coverage-diff` (base `origin/main`) -> `Diff coverage: 100.00% (0/0 executable changed lines)` ## Risk - [x] Security impact considered: the tests only assert what the translator already does; no path handling changes, and the boundary they pin is the one that keeps a sibling directory out of the workspace mount. - [x] Backward compatibility considered: test-only. `tests/test_sandbox_mounts.py` gains three cases and rewrites no case that predates this branch; `tests/test_sandbox_unit.py` is untouched at the new base. - [x] Rollback path is clear for risky changes: revert the branch. ## Related Issues #1116 --------- Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
Summary
Sandboxed commands now run in NVIDIA OpenShell on its Docker driver, the boxlite micro-VM backend is retired, and what a sandbox may reach is part of the one permission set every agent follows: a connection the sandbox blocks while a command runs is settled the way a tool call is, through the same mode, grants and approval card. In this PR "gateway" means the local OpenShell gateway (a service on 127.0.0.1:17670 with mTLS), not
raven gateway.Why OpenShell: on the same Mac (colima), a sandbox was ready in 1.03 s against boxlite's 1.56 s, and eight at once took 2.08 s against 10.4 s; a single command round trip is slower (8.6 ms against 1.6 ms). The Linux figures are in the Performance section of the docs page.
Contract change:
CONTRACTS_VERSIONmoves to 44.ApprovalResponder.await_approvaltakes aneeds_personkeyword, and the pluginServiceLocatorcarriessandbox_gateway.The OpenShell backend
OpenShellExecutor(raven/sandbox/openshell_executor.py) keeps the existing model of one sandbox per executor: the main loop owns one, and every subagent run and DAG node gets its own. All SDK calls sit behind anOpenShellControlPlaneprotocol. Commands run throughExecSandboxassh -c, and stdio MCP servers throughExecSandboxInteractive. The workspace, extra volumes,/agent-homeand/plugin-dataare bind mounted at the guest paths boxlite used, and the path translation moved intoraven/sandbox/mounts.py. A timeout reports exit-1with "Command timed out", as the other executors do, and the command's own budget is the deadline: the gateway enforces it and reports its own exit 124, and a local backstop kills the call if the gateway does not answer. Any failure while the sandbox starts, its startup check included, is aSandboxInitError, which the agent loop logs and stays up on./bin,/usr,/lib,/etc,/proc,/var/log,/dev/urandom) are read-only,/tmpand the mounted volumes are writable, and everything else is unreachable.pip install,apt-getandnpm i -gtherefore do not work in the sandbox, and neither does writing to$HOMEoutside the mounts.stop()or a failed start, so neither a sandbox that failed to start nor the orphan sweep loses its delete to a closed client.backend: "auto"and"boxlite"to"openshell"and removesdebuganddiskSizeGb, with one notice per change."auto"meant boxlite with no fallback, so the rewrite keeps failing closed when OpenShell is missing.raven sandboxcommand group, the sandbox debug server,scripts/boxlite_cli.pyanddocs/sandbox/.openshell sandbox list,execandconnectreplace them.sandboxextra isanyioplusopenshell>=0.1.8,<0.2(not on win32), anduv.lockdrops boxlite and adds openshell and grpcio.raven upgradekeeps the extra when the OpenShell SDK is installed.raven onboardchecks that the SDK imports and that a gateway answers; on Windows it offers no sandbox choice and says why, and skipped or non-interactive onboarding there keeps a configured backend and says commands cannot run until Host (direct) is chosen or the backend is set tonone(switching to the host takes the confirmation the interactive choice asks for).One permission set for the network
permissions.networkreplacestools.sandbox.allowNet: a default ofopen(every host name of three or more labels on every port, plus common package, code-hosting and model-provider names on common ports, the closest OpenShell allows to "any host", seeNVIDIA/OpenShell#3856) orclosed, and allow or deny rules by host (with OpenShell's*and**wildcards, each standing for whole labels), ports and program. A loader floor (config version 17) moves anallowNetthere with a notice;trueis the open default,falseclosed, a host list those hosts on 80 and 443 with the default closed (ahost:portentry becomes a rule for that port, and an entry no rule can hold, such as an address range, is left out and named in the notice), and"*"in a list keeps the open default. Every sandbox compiles its policy from it: the main loop's, spawns', DAG nodes', and the MCP servers a session or a playbook starts in one. A sandbox reads the live set (with an unpersistedallowNetstill honoured) and applies a change throughUpdateConfigbefore its next command, process start or MCP tool call (the compiled policies are compared as dicts, so an unchanged one costs microseconds, not a hash of 65,535 ports); every sandbox's reader (the main loop's, subagents' and a Playbook's MCP servers') keeps its last valid set across parsing, validation or OS read failures, and closes the network until a set has validated (only an absent file answers the open default); a command, process start or MCP tool call is not run while a change that takes something away has not loaded, one change is in flight per sandbox at a time, a version the gateway took but the sandbox has not loaded is checked again rather than sent again, and an executor built with no network source gets none.ExecResult.denials). A failed command waits for the sandbox's "relay closed" line, which arrives after its denials (measured: 0.25 s idle, up to 1.85 s under load), so a denial is not missed under load or half-read. The log names the sandbox, not the command (measured: with two commands at once in one sandbox, the later one's result carried the earlier one's refusal, and no log line carries an id that ties it to a command), so refusals logged after the command ended (plus a quarter second) are left out, and the prompt says the connections were blocked while a command was running.PermissionGate.authorize_runtime, asked from inside the tool body; a person deciding stops the tool's deadline): a target a deny rule names is refused;askasks you (asandbox.networkcard on the web, the usual approval prompt in the TUI and IM, afetchpermission request over ACP);smartlets a network-specific reviewer open what the command plainly needs;fullopens it for the session (decision D3). The mode is held no looser than one a plugin gate over the call declares aspermission_mode(raven-oncall's gate declares the owner's), and, for the main sandbox every conversation shares, than the configuredpermissions.mode, so one conversation's own looser mode does not open it for the others. With nobody to ask it stays blocked, the result says so and-mexits 3. Allow once opens it in that sandbox until it stops (D1), allow for this session in every sandbox of the conversation until Raven restarts; the main sandbox is shared by every conversation, which every prompt says, the TUI, IM and ACP ones included (D2). The model is told to run the command again, or, when the refused sandbox did not load the approval, that it may still be blocked; nothing is re-run for it.localhostormetadata.google.internal(anything not shaped like a public DNS name), is never opened by the mode or the reviewer, also when a Raven host runs the product as an ACP agent: the request carriesraven.needsPersonin_meta, and the host's auto-approver refuses it. One prompt covers at most ten targets. Agents of one conversation that hit the same target share one prompt; a refusal or a session grant is shared, an allow-once for another agent's sandbox is asked again.ApproveDraftChunk) when it opens exactly the grant and nothing else; otherwise Raven merges its own narrow rule.fulland asks over ACP, and raven-oncall keeps its trunk gate atfullbecause its own gate applies the owner's mode, which that gate declares for run-time asks.render.allowNetworkandrender.networkAllowlistare retired (decision D11). Its render jobs run on the host'stools.sandbox.gateway, which the plugin service locator lends every factory assandbox_gateway. It reads the browsers under its worker image's/ms-playwright, a read-only pathOpenShellExecutor(read_only_paths=...)adds beside the system paths: without it the worker found no Chromium there and could not run one.Decided, and left for the owner
allow_network_rule, one rule per target with its program) is in place; a permanent rule is added inpermissions.networkmeanwhile.**.*.*rule (endpoint ambiguity: tls=0 vs 1). It still stops Raven from opening the host, and Raven warns once per such rule. A hard block needsdefault: closed.GetGatewayConfigdoes not report the delivery mode. The docs explainOPENSHELL_CONFIG_DELIVERY_MODE=push(an approval then applies in 0.3 s instead of about 9 s).full. This predates the network work.Type
Verification
At the current revision, after rebasing onto the latest
main:env UV_NO_SYNC=1 make lint-python lint-imports lint-deps lint-types check-large-files check-source-language: exit 0; all 10 import contracts kept.env UV_NO_SYNC=1 make check-commits: exit 0.uv run --frozen --python 3.12 --all-extras pytest -q -n 4): 40409 passed, 266 skipped, 2 xfailed, 8 failed. The eight were also reported failing without this branch on the same machine: five proxy-environment cases intests/test_config_update_providers.py, the Node directory resolver case intests/test_install_script.py, the legacy workbook case intests/test_knowledge_parser_excel.py, and the unreadable-path case intests/test_subagent_node_runtime.pywhen run as root.git diff --check: exit 0. Each fix has its own commit, and so does the docstring reflow; the rebase preserved every earlier patch unchanged.Earlier verification reported for this PR, not repeated for these fixes:
RAVEN_OPENSHELL_IT=1 pytest tests/integration/test_openshell_sandbox_real_gateway.pyagainst OpenShell 0.1.8 on Ubuntu 24.04, kernel 6.8 and Docker 29: 14 passed with poll delivery and 14 passed with push delivery. This covered changing a running sandbox's network policy, narrowing the open set, denial reporting, grants, and approving OpenShell's own proposal. No real-gateway integration run was performed in the current fix round.Docs strict build passed. The earlier frontend runs reported 4955 source tests and 314 gate tests in
ui-web, and an up-to-date TUI i18n generator. These fixes change no frontend source.Relevant tests pass locally
Relevant lint / type checks pass locally
User-facing docs or screenshots are updated when needed
Risk
Anyone on boxlite: the first load rewrites the config to
"openshell", and the sandbox refuses to start until the OpenShell SDK and a gateway are installed. There is no fallback to running on the host. It needs Linux 6.2+ with Landlock ABI 3 and Docker 28+, or macOS with Docker Desktop or colima; Windows is not supported, and a Raven inside WSL 2 is a Linux host that can use it.The default egress is narrower than boxlite's, which was fully open: a two-label domain outside the built-in list (for example
example.com) is blocked until a rule or an approval opens it.The writable filesystem is narrower than the boxlite VM's: only
/tmpand the mounted volumes are writable. File-heavy work runs several times slower than on the host, because opening a file in an OpenShell sandbox costs about ten times what it does in a plain container.On a root host the agent's sandbox cannot start: OpenShell refuses a root workload, so the sandbox runs as the image's user and cannot write a root-owned workspace.
Approving a blocked connection changes a running sandbox's policy. What is opened in the main sandbox reaches every conversation until Raven restarts, as the prompt says; in
fullmode a blocked public host is opened for the session without asking (decision D3), and stays open if the conversation is later switched back toask. In the main sandbox that happens only whenpermissions.modeitself isfull; a conversation switched tofullon its own is asked there.A refusal's time comes from the sandbox's clock and the window it is matched to from the host's. They are one clock on Linux; on macOS the Docker VM's clock must stay within a quarter second of the host's, or a command's own refusals can fall outside the window.
While the gateway cannot load a network change that removes or narrows a rule, sandboxed commands, process starts and MCP tool calls are refused with a message saying so (exit 1 for a command), and run again once it loads; a change that only adds rules never holds a command back.
A failed MCP call waits one second for a refusal; one held back longer (seen up to 1.85 s under heavy sandbox churn) is missed, and the call's own error stands without the policy note.
Raven's own agents now run with the owner's allow and ask rules, not only the refusals, and in an OpenShell sandbox when the host uses one. They take the owner's mode unless their hosting pins one (Raven-Code:
fullfor a one-shot turn,askover ACP).CONTRACTS_VERSION44: a plugin that implementsApprovalRespondermust accept theneeds_personkeyword; the in-tree responders do.A
permissions.networkrule with a wildcard inside a label (api*.example.com) fails validation at load. Such a rule never matched a refused host, and OpenShell does not activate a sandbox on that pattern.raven sandboxis gone; scripts that called it needopenshell sandbox ....Rollback: revert the squash commit, then set
tools.sandbox.backendback to"none"or"boxlite"by hand, and put anallowNetback if one was moved: an older build fails to load a config that says"openshell", and does not readpermissions.network.Security impact considered
Backward compatibility considered
Rollback path is clear for risky changes
Related Issues
Follow-ups, not closed by this PR: #1277, #1278, #1279