Skip to main content

Module thread_lifecycle

Module thread_lifecycle 

Source
Expand description

Pure thread drop / promote / refresh planning.

Owns decision logic shared by heddle thread drop, heddle thread promote, heddle thread refresh, and cleanup sweeps:

  • drop disposition (refuse current / missing / delete-missing / drop steps)
  • what a drop removes (unmount? checkout? ref? registry?)
  • promote path defaults and in-place conversion preconditions
  • refresh checkout selection and conflict-marker materialization (pure)

FS materialization, merge apply, mount RPCs, registry I/O, and recovery advice strings stay CLI-owned. Callers resolve path/mode/freshness facts first, then invoke these helpers.

Structs§

ThreadDropOptions
Caller-supplied facts for pure drop preflight (no I/O).
ThreadDropPlan
Pure plan describing what a successful drop should remove / update.
ThreadPromoteOptions
Caller-supplied facts for pure promote preflight (no I/O).
ThreadPromotePlan
Pure plan for heddle thread promote.
ThreadRefreshOptions
Caller-supplied facts for pure refresh preflight (no I/O).

Enums§

CleanWorktreeGuard
Where the clean-worktree preflight should look before mutating a thread.
ThreadDropDisposition
Outcome of pure drop planning before any mutation.
ThreadRefreshPlan
Pure disposition for heddle thread refresh before rebase/merge I/O.

Functions§

contains_conflict_marker_bytes
Whether existing file bytes already contain full conflict-marker triplets.
format_refresh_conflict_markers
Format conflict markers for a refresh conflict (CURRENT / INCOMING).
plan_clean_worktree_guard
Select the clean-worktree guard from force + execution-path facts.
plan_cleanup_thread_drop
Pure plan for a cleanup sweep drop (thread cleanup).
plan_thread_drop
Pure preflight for heddle thread drop / drop_thread_silent.
plan_thread_promote
Pure option preflight for heddle thread promote.
plan_thread_refresh
Pure preflight for refresh checkout selection and no-op / refusal gates.
promote_confirm_in_place_removal
Confirm in-place conversion teardown after FS identity facts are known.
promote_existing_checkout_path
Existing checkout path preferred for identity / in-place conversion checks.
promote_in_place_conversion_candidate
Whether promote should consider tearing down the thread’s own existing checkout before writing a solid tree at the default path.
resolve_promote_target_path
Resolve the promote target path and whether the default was used.
should_materialize_refresh_conflict_markers
Whether refresh should write conflict markers for a path given its current on-disk content.
thread_mode_requires_unmount
Whether a thread mode owns a FUSE/virtual mount that must be torn down before the checkout directory is removed or replaced.