@@ -83,6 +83,16 @@ func TestBuildDepGraph_LinearChain(t *testing.T) {
8383 tmpDir := t .TempDir ()
8484
8585 // A -> B -> C (A depends on B, B depends on C)
86+ //
87+ // a
88+ // |
89+ // v
90+ // b
91+ // |
92+ // v
93+ // c
94+ //
95+ // Build order: c, b, a
8696 writeSpec (t , tmpDir , "c.wanda.yaml" , strings .Join ([]string {
8797 "name: c" ,
8898 "dockerfile: Dockerfile" ,
@@ -141,6 +151,16 @@ func TestBuildDepGraph_Diamond(t *testing.T) {
141151 tmpDir := t .TempDir ()
142152
143153 // Diamond: A -> B, A -> C, B -> D, C -> D
154+ //
155+ // a
156+ // / \
157+ // v v
158+ // b c
159+ // \ /
160+ // v
161+ // d
162+ //
163+ // Build order: d, then b and c (either order), then a
144164 writeSpec (t , tmpDir , "d.wanda.yaml" , strings .Join ([]string {
145165 "name: d" ,
146166 "dockerfile: Dockerfile" ,
@@ -204,6 +224,11 @@ func TestBuildDepGraph_CycleDetection(t *testing.T) {
204224 tmpDir := t .TempDir ()
205225
206226 // Cycle: A -> B -> A
227+ //
228+ // a <--+
229+ // | |
230+ // v |
231+ // b ---+
207232 writeSpec (t , tmpDir , "a.wanda.yaml" , strings .Join ([]string {
208233 "name: a" ,
209234 "deps: [b.wanda.yaml]" ,
@@ -309,6 +334,16 @@ func TestBuildDepGraph_TransitiveDeps(t *testing.T) {
309334
310335 // A -> B -> C, A only lists B in deps (not C)
311336 // C should still be discovered transitively
337+ //
338+ // a (deps: [b])
339+ // |
340+ // v
341+ // b (deps: [c])
342+ // |
343+ // v
344+ // c
345+ //
346+ // A doesn't directly list C, but C is discovered via B
312347 writeSpec (t , tmpDir , "c.wanda.yaml" , strings .Join ([]string {
313348 "name: c" ,
314349 "dockerfile: Dockerfile" ,
0 commit comments