fix(gemini): move error files into /tmp/gh-aw/ before artifact bundling#20938
Merged
fix(gemini): move error files into /tmp/gh-aw/ before artifact bundling#20938
Conversation
…(#issue) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
March 14, 2026 14:15
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts how Gemini CLI diagnostic error reports are collected so they live under /tmp/gh-aw/, keeping unified artifact uploads under a single common ancestor (avoiding actions/upload-artifact least-common-ancestor path issues) and ensuring secret redaction coverage.
Changes:
- Relocates Gemini error report artifacts to
/tmp/gh-aw/and adds a pre-bundle step to move files from/tmp/before redaction/upload. - Extends the engine interface with
GetPreBundleStepsand injects these steps into the main job prior to secret redaction. - Updates tests and the locked smoke workflow to reflect the new artifact paths and behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/step_order_validation.go | Updates rationale around allowing certain wildcard /tmp/ paths, noting Gemini now relocates into /tmp/gh-aw/. |
| pkg/workflow/gemini_engine.go | Declares Gemini error reports under /tmp/gh-aw/ and adds a pre-bundle mv step to relocate reports from /tmp/. |
| pkg/workflow/gemini_engine_test.go | Adds/updates unit tests for declared output path and pre-bundle step content. |
| pkg/workflow/compiler_yaml_main_job.go | Injects engine GetPreBundleSteps before secret redaction in the generated main job steps. |
| pkg/workflow/agentic_output_test.go | Updates workflow/output assertions to require /tmp/gh-aw/... and ensure /tmp/... isn’t used for artifact paths. |
| pkg/workflow/agentic_engine.go | Adds GetPreBundleSteps to WorkflowExecutor and provides a default no-op implementation on BaseEngine. |
| .github/workflows/smoke-gemini.lock.yml | Reflects the new “move files” step and updates artifact upload paths to /tmp/gh-aw/.... |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
pelikhan
approved these changes
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
actions/upload-artifactcomputes the least-common-ancestor (LCA) of all upload paths to determine artifact-internal prefixes. The Gemini engine declared/tmp/gemini-client-error-*.json, pulling the LCA up to/tmp/instead of/tmp/gh-aw/. This caused all artifact files to be stored with agh-aw/prefix, sosafe_outputsextractedagent_output.jsonto/tmp/gh-aw/gh-aw/agent_output.jsoninstead of the expected/tmp/gh-aw/agent_output.json, resulting in 0 safe outputs processed.Changes
GetPreBundleSteps()onWorkflowExecutor— runs steps before secret redaction and the unified artifact upload; no-op default inBaseEngineGeminiEngine.GetPreBundleSteps()emits a step that relocates Gemini CLI error reports before bundling:GeminiEngine.GetDeclaredOutputFiles()updated to/tmp/gh-aw/gemini-client-error-*.jsonso the artifact LCA stays at/tmp/gh-aw/GetPreBundleSteps()before secret redaction so relocated files are scannedstep_order_validation.gocomment and all affected tests; recompiled all 173 lock files