fix(engine): declared paths are fixed for the role: pinned with their sources; a symbolic link is the declaration it implies, approved by the user link by link; sources read only after their links are checked #401
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #401"
general
weight: 0.35
pearu
Part of #389. A declaration's access governs what is inside its path, not the path itself: the role cannot rename, remove or replace a declared path, so it cannot choose which host path a later launch binds.
What was possible before (each measured on main)
rolesSupervisor ranmv .asb .asb.moved; its read-only purpose files were then writable at the old path.ownpath uncovered the host's original.~/store/ = read-writeand./x/d/ = read-write outside:~/store/real/(alsocopy,copy-on-write), the role replaced~/store/realby a link to an undeclared~/secret; the next launch bound~/secret.shared, the role renamed~/.claude/CLAUDE.mdaway and put a link to~/secret/gthere; the next launch on an account bound that file read-write.The rule
read-writeincluded): the path, the directories on the way to it that the role has read-write from the host, its source, and the directories on the way to the source wherever a read-write host mount shows them, are mount points (each bound onto itself), so a rename or removal fails with EBUSY. A source counts in the modes that read or bind it. A directory on the way that the host does not have yet is made where and as bwrap would make it, and is fixed at the first launch already.P -> Ton the way of a declared path or a source, or inside a directory bound plainly from the host, is the declaration it implies:P = MODE outside:T, where MODE is whatPhas without the link. Where it would hand the role a host object outside its view, the user approves it: each such link is asked about on its own, apart from the dot-file, at a terminal (asb --trust, or a launch there), and refused without one, namingasb --trust. The approval is recorded per project with the links on the way, the target and the mode, and every launch resolves the path again against it. A changed link on a declared or channel path asks again (refused without a terminal); a changed link that only the review's scan found is left unbound until the next review, and blocks nothing. The question names the declaration that skips it when written in the dot-file. A link to what the role already sees, with any access, implies nothing: the role reaches the target with the access the target has. A declaration written for such a path keeps its mount, at the target's own path with the declaration's mode. An implied declaration passes the refusals a writtenoutside:passes (a secret store, the engine's own directories,~). bwrap cannot mount on a link, so the mount goes toT's own path (a link in a host directory stays) or covers the link (in a directory of the engine's)._as_src_guard), once what the links on the way to that source imply is in view or approved: at a launch on that launch's view, at a join against the keeper's view and the approvals. What is bound or read afterwards is the resolved target the check saw, not the link's path. A refused launch has read nothing through the link.--preset nativeis unchanged: nothing is pinned, checked or refused there.What changes for users and roles
git mvacross a fixed directory's boundary fails with "Invalid cross-device link" (mvandcpcopy instead); a single-file source reached through a read-write directory view is written in place, not replaced by a temp-file rename. Undersharedthis now includes the claude profile'sCLAUDE.md,settings.jsonandskills/.CLAUDE.md,skills/orcache/in~/.claude(dotfiles such asCLAUDE.md -> ../dot/claude/CLAUDE.md), links in the project and links on declared paths work. A launch without a terminal refuses once and namesasb --trust; the review asks about each link as the declaration it implies; once approved it is read with that mode. On main the same link was unreadable undersharedand failed with "bwrap: Can't mount on symlink destination" under the other presets.settings.json,plugins,agents,projects,rules,commandsor~/.claude.json(of~/.claudeonlyCLAUDE.md,skills/andcache/may be links), a project whose.agent-sandboxis a link, and a hide through a link. A linked~/.claudeitself is refused too, namingCLAUDE_CONFIG_DIRfor a base that lives elsewhere. Of these, main launched with a linked~/.claude.jsonand a linked~/.claude.asb --trust, not at a launch.asb --resetof acopychannel discards the copy; the next launch copies the source again (it used to copy at once)..asband.asb/rolesfor therolesSupervisor and setup role, thegithubsetup role and themarketrole; under the claude profile~/.claude/cache.Also fixed
copy-on-writechannel with a source elsewhere (the profile's relocation, oroutside:) read through its own path instead of the source; it now reads the source, ascopydoes. This is on main too.Not in this PR
copy,seed-onlyandcopy-on-writesources, which are read through (on main too); the next PR.--bind-fd, now possible with bubblewrap 0.12).Cost
Launch time of a plain
sharedlaunch, median of 9 alternated runs: 1794 ms on main, 2097 ms here. Nofindat an ordinary launch; the scan for links inside bound directories runs only in the review (asb --trust,--check,--roles).Tests
tests/unit/ro-pins.batsandtests/integration/ro-pins.bats(new, real bwrap): every mode on the key and the source side, each refusal, each refusal hint followed to a working launch, a refused launch leaving the host as it was.tests/integration/native-parity.bats: copy, seed-only and copy-on-write under native.tests/integration/profile-claude/accounts.bats: the two-launch shapes with an account.tests/integration/profile-claude/links.bats(new): the dotfiles link under each preset and with an account, a link planted by a role refused without a terminal and asked at one, a retargeted link or a changed mode asked again, an approved link resolved again at every launch (a second role changing a directory on its way gets nothing bound), a link to a read-only path the role sees giving no write, a link to a secret store refused, each refused location, a join against a link made since its launch.---
_🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._