Agent OrchestrationFleet phase 1 — Foundation gaps
Source Branch Policy for Isolated Mounts
Status: Open — design only, nothing implemented; MountConfig has no source-branch field and worktree/clone materialization always starts from the host repo's current HEAD
Shipped baseline
Per-mount shared | worktree | clone isolation is shipped (MountConfig in crates/jackin-config/src/schema.rs), but the isolation type carries no source-branch policy. Worktree materialization resolves the base commit with a plain git -C <src> rev-parse HEAD (crates/jackin-isolation/src/materialize.rs), so every isolated checkout inherits whatever the host repo happens to have checked out at launch time, including detached HEAD. There is no --mount-source-branch CLI flag, no TUI control for it, and no workspace-schema field for it today.
Remaining work
- Workspace schema. Add
source_branch_policy(+source_branchfor thenamedcase) toMountConfigincrates/jackin-config/src/schema.rs, with a versioned migration incrates/jackin-config/src/migrations.rs(bumpCURRENT_WORKSPACE_VERSION, add a migration fixture, re-bake existingafter.tomlfixtures, add a Schema Versions timeline entry). - Runtime resolution. In
crates/jackin-isolation/src/materialize.rs, resolve the policy (host_head/current_branch/default/named/ask) to a concrete ref beforeworktree addorclone, without ever mutating the host checkout (no implicitswitch/checkout/pull/fetch). - CLI. Add
--mount-source-branch <dst>=<policy>[:<branch>]tojackin workspace create/editincrates/jackin/src/cli/workspace.rs, validated the same way--mount-isolationis today. - Console editor. Replace the current isolation row-cycling in
crates/jackin/src/console/tui.rswith a mount settings dialog (source folder, container destination, readonly, isolation, mode-gated source-branch group), plus a named-branch picker and an ask-on-launch prompt reusing the existing launch dialog surface (crates/jackin-runtime/src/runtime/progress.rs). - Tests. Parsing, migration, policy resolution,
worktree/clonematerialization, invalid combinations, and TUI state transitions. - Docs. Workspaces guide, Mounts guide, workspace command reference, configuration reference, schema versions — once the feature ships.
Out of scope (for this item)
- Implicit fetch/pull of branch lists — local refs only.
- Per-role source-branch defaults.
- Grouped multi-mount ask dialog — one mount at a time.
- Source-branch policy for
shared,tmpfs, orephemeralmodes. - Automatic PR-branch discovery as a policy option.
Related work
- Research: Source Branch Policy for Isolated Mounts — full problem framing, product positioning, TUI mockups, data model, and open design questions.
- Ephemeral mount modes — another sign that isolation is becoming a configurable mount strategy, not a single enum.
- Session keep and resume — resume becomes more predictable when every isolated checkout records exactly which branch/commit it started from.
- Launch Progress TUI — provides the rich launch dialog surface for
Ask on launch. - Task source abstraction — future PR/task flows can reuse this policy once a task carries its own branch source.