Expand description
The milestone as a typed dependency graph, with the partitions a work surface would otherwise compute for itself.
§What is derived here and what is not
The graph itself is not derived here. crate::plan already walks the canonical records
and produces the edges, the waves, the statuses, the dependents and the findings; this
module reads that answer and computes the four things a plan surface needs and the plan
does not carry:
- the partitions by readiness — ready, blocked, waiting, in progress, review, completion-blocked, complete, cancelled. Grouping is a derivation, and a derivation done in a template is a derivation done differently in every template.
- the critical blockers — which unfinished issues hold back the most downstream work, measured as the transitive closure of the dependents relation. What to unblock first is the question a milestone exists to answer.
- the parallelizable subsets — of the startable work, which issues may genuinely run
at the same time: same wave, each
parallel_safe, and no two sharing a scope path. The plan warns about a scope conflict; this partitions around it. - the cycles — the plan reports that a cycle exists and names every issue stuck behind one. That is the right diagnostic and the wrong shape for a reader who wants to fix it: the strongly connected components are what a person edits.
§Determinism
Every list here is ordered by crate::order::natural_cmp over the canonical issue id,
which is the repository’s canonical order and is total — identities are unique, so no
comparison ever ends in a tie. Nothing is ordered by a hash-map walk, by discovery order
or by insertion order, so two runs over the same records, on two machines, produce the
same bytes. test/cases/129_executable_issues.sh asserts that byte-for-byte.
The graph algorithms below are deterministic for the same reason: the depth-first walk of
cycles visits roots in canonical order, and the greedy partition of
parallel_sets considers candidates in canonical order.
Structs§
- Critical
Blocker - One unfinished issue that holds back downstream work, and how much.
- Milestone
Counts - One milestone’s issues counted by readiness, plus the two denominators.
- Milestone
Edge - One dependency edge of the milestone’s graph,
frombeforeto. - Milestone
Graph - One milestone as an executable dependency graph.
- Milestone
Node - One issue of a milestone, as a node of its graph.
- Parallel
Set - One subset of the startable work that may genuinely run at the same time.
- Scope
Conflict - Two issues of one wave that cannot run together, and the path that stops them.
Functions§
- cycles
- Every dependency cycle of the issue graph, each as its strongly connected component in canonical order, the components themselves in canonical order.
- parallel_
sets - Partition startable work into subsets that may genuinely run at the same time.
- transitive_
dependents - Every issue that waits on
id, directly or through another, in canonical order.