Skip to content

feat: isolate sandbox session outputs and enforce tenant writes - #961

Open
yaojin3616 wants to merge 16 commits into
mainfrom
codex/session-isolated-sandbox-output
Open

feat: isolate sandbox session outputs and enforce tenant writes#961
yaojin3616 wants to merge 16 commits into
mainfrom
codex/session-isolated-sandbox-output

Conversation

@yaojin3616

Copy link
Copy Markdown
Collaborator

Summary

  • add configurable session-output sandbox publication with one executor and one configured publication owner
  • isolate writable output paths, serialize execution through leases, harden bwrap process cleanup, and mount the host venv read-only at /opt/clawith/venv
  • auto-inject and validate tenant_id for tenant-scoped DAO writes, migrate Runtime chat-message writers, and add a safe NULL tenant backfill script
  • restore FastAPI database dependencies accidentally changed to db=None, and fix the LLM model tenant UUID double-conversion
  • add the v1.12.0 specification/design and regression coverage

Validation

  • uv run pytest -q tests/test_sandbox_execution_policy.py tests/test_sandbox_subprocess_backend.py tests/test_agent_tools_storage_workspace.py tests/test_base_dao.py tests/test_agent_runtime_a2a_completion.py tests/test_agent_runtime_trigger_completion.py tests/test_llm_model_tenant_scope.py tests/test_api_database_dependencies.py — 57 passed
  • git diff --cached --check — passed
  • ./scripts/arch-guard.sh — passed (legacy warnings only)
  • deployed the same source snapshot to the 163:3009 environment; backend healthy
  • verified session-output bwrap execution, tenant backfill (138 updated, 0 unresolved), and a full HTML generation/publish Run reaching delivered

Y1fe1Zh0u added a commit that referenced this pull request Aug 14, 2026
The v1.11.4 Runtime resolves dynamic MCP tools through durable execution bindings, while the sandbox PR test still mocked the retired name-only helper. Point the test at the binding resolver without weakening either contract.\n\nConstraint: Preserve v1.11.4 Tool execution binding semantics while integrating PR #961.\nRejected: Restore the name-only MCP helper | duplicates routing state and weakens execution integrity.\nConfidence: high\nScope-risk: narrow\nDirective: Sandbox tests must mock the same binding boundary used by Runtime execution.\nTested: 59 scoped sandbox, Tool validation, and builtin contract tests passed.\nNot-tested: Full backend suite at commit time.
Y1fe1Zh0u added a commit that referenced this pull request Aug 14, 2026
PR #961 adds one execute_code policy lookup and publication metadata to every sandbox dispatch. Update existing mocks and catalog assertions to model those now-required inputs while preserving the no-reexecution outcome contract.\n\nConstraint: Integrate isolated Session output without weakening existing AgentBay readiness or unknown-execution safety.\nRejected: Hide the execute_code policy lookup in production | would make model guidance diverge from the active sandbox policy.\nConfidence: high\nScope-risk: narrow\nDirective: Sandbox backend mocks must expose the active workspace and publication contract.\nTested: Three previously failing integration tests passed.\nNot-tested: Full backend suite at commit time.
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