The sandbox policy derived a linked checkout's shared Git directory from its `.git` pointer and granted it. That put Git worktree knowledge and a worktree-only entry (`prepare`) into a generic service. The policy now bounds a Session by its directory and adds only configured directories and those a Host plugin registered through `registerWritableRoot`; relative to the lower branch its source changes in one place, the root it reads. - `prepare`, the derivation state, its three listeners, and `src/linked-checkout.ts` are removed. - The worktree service creates under the Session's policy as on the lower branch; removal and restoration swap the root for the source checkout. The forge panel's blocker reads the Session's root alone. - A Session that works in a linked worktree cannot write the repository's Git directory under workspace-write without a grant. Tests pin the denial and that a registered grant admits creation, restoration, and a commit. Granting the Git directory of the checkout a Session works in is left to a separate plugin that reads the layout and registers the directory.
14 lines
559 B
YAML
14 lines
559 B
YAML
# Bilingual-pair consistency record for worktrees.md (docs/i18n/README.md): per heading
|
|
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
# After editing either side, bring the other along and re-record with:
|
|
# pnpm run verify-translation-pairing --write docs/subsystems/worktrees.md
|
|
/git-worktrees:
|
|
en: a0def5edd90e9189
|
|
zh: 96c3f6fa48eb850d
|
|
/git-worktrees/creation-and-retention:
|
|
en: d33f26f44f51da9f
|
|
zh: 5c7577a1981b297c
|
|
/git-worktrees/request-and-result:
|
|
en: 5801c5909e1873a0
|
|
zh: 5c36a4c4ea97ecad
|