← Back to Pull requests

feat(roles): asb --roles with no role named opens the project's roles, or its setup when the environment is not built yet #415

Closed
unknown closed this pull request without merging on Nov 16, 2026 23:28 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 22:36 UTC
Author

asb --roles with no role named now opens the project's own roles: the approved .agent-sandbox's supervisor, planner-N, implementer-N, reviewer-N and gate roles, in that order and by number, and no other role. So asb --roles --resume is the one line that opens a round.

A project that needs its setup step runs it first. It needs setup when it has a setup role whose [conda:setup] names an environment (asb --init roles --env NAME; --shared-env writes no setup role, and with no environment [conda:setup] is commented out). Setup has not run while that environment has no conda-meta, which conda creates when it creates the environment and which --init already uses to tell a built environment. Then asb --roles runs asb --role setup with the line's words, in the terminal:

--roles: the setup role has not built the environment at ~/.local/share/agent-sandbox/conda/envs/NAME yet: running asb --role setup

With none of those roles in the file, asb --roles is refused, naming asb --roles ROLE....

tmux is now looked for after the dot-file review and the role list, so the setup launch needs none.

Tests

tests/unit/roles-tmux.bats, a new test: an empty environment runs --role setup and tmux is never called; with conda-meta there, the five groups open in order (planner-2 before planner-10), without setup, an extra role or the globs; a setup role with [conda:setup] commented out opens the five groups. The test for --roles with no role now expects the new refusal.

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

Diff: 200 lines (+150 / -50) across 2 files Reviewer: pearu Review duration: 51m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 200 lines diff across 2 files
0.36
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.317
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #415"
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: 36.2% (MEDIUM) · Higher = larger blast radius
36.2%
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: 14.3% · Safe to merge
14.3%