Documentation
¶
Overview ¶
Package resident owns resident-root policy and path anchoring: the closed table of repository-wide roots awf owns at the primary control root, the predicate that recognises a path or a render kind as resident, the Roots value that resolves an output path against the right anchor, and the resident lifecycle operations. The sync core depends on this package; this package never depends on the core.
Index ¶
- func CollisionsAt(root string, planned []string) ([]string, error)
- func InspectRoots(root string) ([]string, error)
- func IsResidentKind(kind string) bool
- func IsResidentPath(path string) bool
- func PreserveRemoval(path string, preserved []string) bool
- func RootNames() []string
- type Roots
- type UninstallReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollisionsAt ¶
CollisionsAt filters planned project-relative paths to those that already exist under root and are not recorded in root's lock (not awf-managed). Split from InitCollisions so init's pre-prompt probe can plan outputs in a throwaway scaffold and test them against the real root; the ADR-0016 collision semantics are unchanged.
func InspectRoots ¶
InspectRoots examines direct children only. It never traverses a dynamic resident tree; a descendant other than the managed .gitignore keeps its root intact.
func IsResidentKind ¶
IsResidentKind reports whether a render kind is one of the resident roots' self-ignoring render units, so a caller never spells the names to decide it.
func IsResidentPath ¶
IsResidentPath reports whether a config-relative slash path names a resident root or something below one.
func PreserveRemoval ¶
PreserveRemoval reports whether a lock-relative path lies inside a resident root the inspection found to hold dynamic data, so removal must skip it.
Types ¶
type Roots ¶
Roots anchors output paths. Tracked is the invoking checkout that owns every tracked output; Resident is the primary control root that owns the dynamic resident trees. Both are construction inputs, fixed when a project opens.
func NewRoots ¶
NewRoots pairs the tracked and resident anchors into the value that owns output-path resolution.
func (Roots) ResolveOutput ¶
ResolveOutput resolves resident root artifacts at the primary control root while leaving every tracked output anchored at the invoking checkout.
type UninstallReport ¶
func Uninstall ¶
func Uninstall(ctx context.Context, root string) (UninstallReport, error)
Uninstall removes awf's generated footprint while preserving dynamic resident state. It is a free function so a broken config does not block it. touches-state: rendering/sync-and-drift:uninstall-removes-lock-entries - lock-tracked file removal; proof in resident_test.go
func (UninstallReport) Document ¶
func (r UninstallReport) Document() (presentation.Document, error)
Document maps an uninstall result into its complete ordinary presentation.