pub fn resolve_action(
repo: &Repository,
name: &str,
model: StackModel,
) -> ResolutionExpand description
Resolve the action for workon <name> under the given stack model.
Implements the four-rule cascade from ADR-024.
§Rule summary
- T has its own worktree →
Navigate. git’s lock makes this correctly first. - Current worktree’s branch shares T’s stack →
Checkoutin current worktree. (PR-2) - Deepest non-trunk ancestor of T with a worktree →
Checkoutthere. (PR-2) - Branch exists with no worktree →
Materialize; metadata without a ref →DeletedNode; nothing matches →NotFound.
Under StackModel::None rules 2–3 are skipped and only rule 1 / rule 4 fire.