Repository navigation
Closed
Labels
p1Priority 1: high, should do next
Description
Observation
Sandbox agents running against the egg repo do not have access to the project's .venv. From a recent issue-1962 coder container:
ls .venv/→No such file or directorypython3 -c "import sys; print('\n'.join(sys.path))"resolves to/usr/lib/python313(system Python), with/opt/egg-runtime/{sandbox,shared}on the path but no project venv.
.venv is gitignored, so the gateway worktree mount does not bring it into the container, and restore_prebuilt_deps does not populate it for jwbron/egg repos.
Impact
- Agents that run
make lint,make test,make security, or any direct Python tooling get system Python, missing project dev dependencies (ruff, mypy, pytest, bandit, etc.). - Symptoms surface inconsistently — e.g., .venv/bin/python permission denied breaks custom lint checks #1541 reported
.venv/bin/python: Permission deniedfrommake lint-custom, but the underlying problem is broader: agents don't have a working project Python environment. - Behavior diverges from host development (where
make depsproduces a usable.venv), so an agent's local pass signal is not equivalent to CI.
Possible causes
This may be a tool-availability problem, a prompting problem, or both:
- Tool availability — the
.venvis not part of the gateway-mounted worktree (gitignored) and does not appear under/opt/prebuilt-deps/jwbron--egg/. Options: prebuild.venvinto the prebuilt-deps snapshot, runmake depson container start, or otherwise expose project deps to whatever Python the agent invokes. - Prompting — even if
.venvwere present, agents are not told to use it. The Makefile'sPYTHON := $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,python3)auto-detects, but agents that invokepython3/pytest/ruffdirectly will bypass it.
Acceptance criteria
- A fresh sandbox container working in the egg repo can:
- Import a project dev dependency without falling back to system site-packages (e.g.,
python -c "import ruff"succeeds and resolves from project deps). - Run
make lintandmake testagainst the same toolchain CI uses, withoutPermission deniedorModuleNotFoundErrorfor project dev deps.
- Import a project dev dependency without falling back to system site-packages (e.g.,
- The choice of fix (prebuilt snapshot, on-start install, image-baked deps, etc.) is open.
Background
Supersedes #1541, which was filed against the symptom (.venv/bin/python: Permission denied from make lint-custom). The actual problem is that no .venv exists in the agent's working tree at all, so any path through it fails — permission denied is one of several possible failure modes.
Metadata
Metadata
Assignees
Labels
p1Priority 1: high, should do next
Activity
Address review: parameterize repo_deps_base, doc fail-fast contract
Fix #2087: fail loudly when sandbox build_commands silently break (#2090
plan #2073: revise plan addressing reviewer_plan NACK
implement #2073 phase 4: validator (CLI + MCP tool)
implement #2073 phase 5+6: detectors, egg's own repo file, example re…
fix(#2073): mypy lint clean + pip-install-e regex fix (tester NACK)
test #2073: 325 tests for layered repo-config + onboard detectors + v…