Skip to main content

Module resolve

Module resolve 

Source
Expand description

Per-checkout status resolution (spec §Status resolution).

Effective status of a task on a checkout = fold of its StatusChanges, restricted to those whose anchor_commit is an ancestor of HEAD (unanchored changes apply everywhere), ordered by (at, id). A change whose anchor’s ancestry is unknown (missing commit facts / unfetched sha) is skipped — treated open — and downgrades the resolution to Partial so the caller can flag the task. No qualifying changes ⇒ open.

Structs§

CachedAncestors
Memoizing wrapper so repeated anchors don’t repeat expensive lookups.
FactsAncestors
Ancestor set over the CommitFact graph, for git-free nodes (the hub, the dashboard’s branch selector). BFS closure from head; if the walk ever needs a sha with no fact, the closure is incomplete and non-members answer Unknown instead of No (spec: never silently closed — and never silently not-closed either).
MapAncestors
Test helper: membership map, Yes iff contained, else No.
PartialMapAncestors
Test helper: like MapAncestors but with an explicit unknown set.
ResolvedStatus

Enums§

Ancestry
Resolution
Status

Traits§

AncestorSet
Answers “is sha an ancestor of (or equal to) this checkout’s head?”. &mut so implementations can memoize.

Functions§

effective_status
Fold changes (must already be in (at, id) order, as produced by World::changes_for) against an ancestor set. base is Exact or Facts depending on where anc gets its answers.