MCPcopy Create free account
hub / github.com/github/gh-aw / generateEngineOutputCleanup

Method generateEngineOutputCleanup

pkg/workflow/engine_output.go:76–91  ·  view source on GitHub ↗

generateEngineOutputCleanup generates the workspace cleanup step for engine-declared output files. It does NOT upload an artifact — paths are added to the unified agent artifact instead.

(yaml *strings.Builder, engine CodingAgentEngine)

Source from the content-addressed store, hash-verified

74// generateEngineOutputCleanup generates the workspace cleanup step for engine-declared output
75// files. It does NOT upload an artifact — paths are added to the unified agent artifact instead.
76func (c *Compiler) generateEngineOutputCleanup(yaml *strings.Builder, engine CodingAgentEngine) {
77 outputFiles := engine.GetDeclaredOutputFiles()
78 if len(outputFiles) == 0 {
79 engineOutputLog.Print("No engine output files to clean up")
80 return
81 }
82
83 engineOutputLog.Printf("Generating engine output cleanup for %d files", len(outputFiles))
84
85 // Add cleanup step to remove workspace output files after they have been collected.
86 // Only files outside /tmp/gh-aw/ need explicit removal.
87 cleanupYaml, hasCleanup := generateCleanupStep(outputFiles)
88 if hasCleanup {
89 yaml.WriteString(cleanupYaml)
90 }
91}

Calls 4

generateCleanupStepFunction · 0.85
PrintMethod · 0.80
PrintfMethod · 0.45