Plan the build order
The shipping team is adding a CI impact preview for its label-printing job. It accepts exported unit dependencies on stdin, plus target and edited lines, and reports a stable plan and the units affected by the edit. This is a conservative unit-graph model; it does not execute compiler commands, install packages or predict a native cache. Input graphs are acyclic and declare every dependency.
What needs to change
Implement buildOrder so a reviewer sees one stable plan containing every unit the selected job needs.
Reproduce
- Use go run with the sample export for label and compare the resulting build order with the expected stdout.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains Graph, parseGraph, show and main. Input graphs have no cycles; each imported name also has a unit line.