Find the stale units
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
Update staleUnits so the preview shows the full impact of an edit on the selected job.
Reproduce
- Run the Go sample for target label after an edit to units. Compare the stale-unit line with the expected stdout.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains Graph, parseGraph, buildOrder, show and main. staleUnits receives the slice buildOrder returned.