← Back to Pull requests

fix(conda)!: a project's environments under agent-sandbox's conda root live in a directory of its own, and are declarable #417

Closed
unknown closed this pull request without merging on Nov 19, 2026 12:36 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 07:39 UTC
Author

Under [conda] base = sandbox, asb --init MODEL --env NAME made the environment at ~/.local/share/agent-sandbox/conda/envs/NAME and wrote [connect] lines naming it, which every role refused: that directory is the sandbox's control plane. Measured: the github model's gh-* roles and gh-setup could not launch or --check ("is inside the sandbox's own control plane ..., in every mode"); the roles model's setup role, the market roles and --shared-env's copy-on-write lines hit the same rule.

  • A name under the sandbox's conda root is the project's own: <root>/envs/<project>-<hash>/NAME (the directory's name made safe, at most 32 characters, and 12 hex digits of the SHA-256 of its path) for --init --env, [conda] name at launch, --roles' setup check and the Implementers' clones (micromamba create --clone PATH, measured on the pinned 2.9.0). Two projects' dev are two environments, paths that differ only in punctuation included. The host's base is unchanged.

  • A path declaration (its key, outside: source, a link's implied declaration, its bind) may name <root>/envs/<project>-<hash>/<name> or deeper; the root, its envs/, a project's directory there and everything else under ~/.local/share/agent-sandbox stay refused, and so does an environment as CWD or as a profile's [agent] base.

  • A conda prefix longer than 255 bytes is refused under either base (--init --env and an Implementer's clone, [conda] name/prefix): packages relocate through a 255-byte placeholder and micromamba installs past it silently.

  • --shared-env under the sandbox base takes a path; a bare name is refused, the layout said.

  • The roles model's Supervisor and Implementers update their environment by prefix, with the conda command the briefing names: conda env update -p PREFIX ... or micromamba env update -y -p PREFIX ... (the Supervisor's -n NAME named the root's shared envs/NAME, and there is no conda inside); [permissions:supervisor] names both.

  • Breaking: a project that ran --init --env NAME under the sandbox base edits its prefix and [connect] lines to the new path (the refusal names it) and approves the file again; an old-layout path's refusal says so. No migration (CHANGELOG).
  • Tests: per model (roles, github, market), every role passes --check after --init --env under the sandbox base, and one role of each kind the model has launches: the setup role with the environment read-write, a copy-on-write role with its layer, a role without the environment's line (fails on main). Also: two projects, one name; directory names and the 255 limit; --shared-env name vs path; the carve-out's edges, CWD and [agent] base refused, a link into an environment asked about; --roles' setup check; the clone without {envpath}; the Supervisor's rendered command under both bases.

    ---
    _🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._

    Diff: 364 lines (+273 / -91) across 4 files Reviewer: pearu Review duration: 296m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 364 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #417"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%