Add immutable layered Python environments #206

Merged
weichen merged 3 commits from feature/layered-python-env into main 2026-10-15 14:24:46 +00:00
Owner

Sandbox executions can import a read-only base layer and request extra wheels through python_env. Allowlisted packages install on the host; everything else waits for an approval card.

Why: pip install cannot work inside the offline sandbox, and the service PATH resolved python3 to a path hidden by the sandbox.
Evidence: local go tests of execenv, tools, store, app, server, runmgr, config, and the CLI. CI on this head is the authority.
Impact: schema 35, exec env root, admin API.
Refs: Agent-System-Dev feature/layered-python-env

Sandbox executions can import a read-only base layer and request extra wheels through python_env. Allowlisted packages install on the host; everything else waits for an approval card. Why: pip install cannot work inside the offline sandbox, and the service PATH resolved python3 to a path hidden by the sandbox. Evidence: local go tests of execenv, tools, store, app, server, runmgr, config, and the CLI. CI on this head is the authority. Impact: schema 35, exec env root, admin API. Refs: Agent-System-Dev feature/layered-python-env
weichen added 2 commits 2026-10-15 14:02:01 +00:00
Why: The sandbox hides the host home directory and has no network, so pip install --user cannot supply python-docx, and the service PATH resolved python3 to a linuxbrew path that does not exist inside the sandbox.
Evidence: SELF go test of execenv, tools, store, app, server, runmgr, config, and cmd/agent-system on this worktree. CI has not run.
Impact: Sessions inherit a read-only base layer. Extra packages are requested through python_env, auto-approved only from the allowlist, and mounted per conversation. Schema 35 adds the request and binding tables.
Refs: .task/feature-layered-python-env.md
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-15 14:04:04 +00:00
Register exec env tables in storage migration
ci / vet-and-test (pull_request) Successful in 1m1s
ab12fea474
Why: Schema 35 adds exec_env_requests and exec_env_bindings. The SQLite-to-Postgres copier refuses to run when a business table is missing from its ordered list.
Evidence: SELF go test ./cmd/storage-migrate -run TestCopyOrderCoversAllFixtureTables. CI run 3343 failed on this exact check.
Impact: Those two tables move with the rest of the database. They have no foreign keys, so they can follow the existing recovery tables.
Refs: pull 206
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit edc2e69f9f into main 2026-10-15 14:24:46 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#206