fix(init): what --init makes under .asb/ is static: a replaced path refuses (exit 2); --env-dir for a project that tracks .env (#389) #399
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 302 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.342
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #399"
general
weight: 0.35
pearu
asb --initruns on the host and writes into.asb/, which a role with the project read-write can change. #387 made it skip a path a role had replaced with a symbolic link and carry on with exit 0: a linked.asb/implgot no clone while the rest was written, and a linked.asb/migratestill lost files, because_init_purpose'srm -f .asb/migrate/<name>ran through the link.What
--initmakes under.asb/is now static. Before it writes anything,.agent-sandboxincluded, it checks every path it would write or write under. A path that is a link, or is not what--initmakes there, refuses the run with exit 2, naming the path and what to do; a link you made under.asb/is refused too. A link that appears while--initruns stops it at the next write. A path declared under.asb/with a..in it is refused as well;--initused to create it, empty, outside the project. Outside.asb/nothing changes: an environment reached through your own link is fine.The two reads that copy the dot-file into its new version (the completion of the environment's lines, and
--apply's insert) now go through_as_dotfile_read. That read pattern also exited silently with status 1 under errexit, #387's append included; each now prints its refusal.--env-dir DIR. A project that tracks.envhas one in every Implementer's clone, exactly where the roles model puts the environment.--init --envnow refuses that case and suggests--env-dirwith a name the project does not track. The default stays.envwith byte-identical output, so existing projects see no change. A re-run keeps each clone's name, read from its active prefix line, a name changed by hand included.--env-dirrenames a clone's lines where no environment is built at any name they have, and is refused where one is (--initnever moves an environment), and with--shared-env. Without--env, nothing is made there and nothing is refused.The
--shared-envnote about a setup role no longer claims the role came from an--initwithout an environment. docs/config.md, docs/roles.md and models/README.md state the refusals and the option; docs/design.md lists what remains for host-side writes; CHANGELOG says the refusal instead of the skip. The new unit tests fail against main's engine. Not here: #389 points 1, 2 and 7.---
_🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._