WorktreeTask

The common part of the worktree.* OPAL tasks: the bindings of the host and the checkout of a call (trove-parts §TPO-4).

In the namespace octomy::trove::opal. Declared in src/libs/libworktreeopal/worktreeopal/WorktreeTasks.hpp.

Detailed description

The family reaches the worktrees part, libworktree, and nothing else. It does not depend on libtrove (§TPA-1 rule 5). The host gives it a WorktreeTaskBindings: the lease store, a function for the checkout of the current Trove project, and a function for the worktree folder of a checkout.

Each call builds a GitOrchestrator and a Worktrees for its checkout. Both are light, and a call on a plan thread then shares no git state with another call.

The reads, worktree.list and worktree.status, declare no scope, the house rule for idempotent reads. Every other task declares worktree.write. ensure and sync confirm once per session. park, finalize and remove cannot be undone, so they confirm every call. The lease tasks confirm Always: a lane or a session claims and renews without a prompt, and the scope is kept, so the operator can revoke it (§TPO-1).

A write (sync, park, finalize, remove) takes an optional holder argument: the lease holder of the caller. A worktree with a live lease of another holder refuses the write (§TPW-4).

See also octomy::trove::git::Worktrees, octomy::trove::git::WorktreeLeases.

In this section