Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Refactors safe-output compiler helpers into focused files without changing behavior.
Changes:
- Extracts job environment construction into a dedicated file.
- Moves upload and custom-script helpers into the steps module.
- Reduces the main safe-output job compiler to 765 lines.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/compiler_safe_outputs_envvars.go |
Houses job-level environment construction. |
pkg/workflow/compiler_safe_outputs_steps.go |
Houses upload and custom-script step helpers. |
pkg/workflow/compiler_safe_outputs_job.go |
Removes extracted helpers and retains job orchestration. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped. The PR 'Decompose safe-output compiler helpers' contains only production code changes (pkg/workflow/compiler_safe_outputs_envvars.go, compiler_safe_outputs_job.go, compiler_safe_outputs_steps.go) with no accompanying test changes.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check.
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship. PR is a pure code-move refactor (splitting compiler_safe_outputs_job.go into compiler_safe_outputs_envvars.go and compiler_safe_outputs_steps.go) with no logic changes, no new abstractions, and no added complexity. Nothing to cut.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment.
|
There was a problem hiding this comment.
Verdict
No blocking issues found in the changed lines. This is a mechanical helper extraction, and I did not find any changed-line correctness, performance, or safety regressions in the moved code.
Reviewed themes
- job-level safe-output environment assembly stayed behaviorally identical
- helper extraction for artifact upload and custom script generation stayed functionally equivalent
- no new tests were added, but this PR also does not appear to change logic
🔎 Code quality review by PR Code Quality Reviewer · gpt54 · 4.92 AIC · ⌖ 6.74 AIC · ⊞ 4.5K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design — approving with one minor suggestion.
📋 Key Themes & Highlights
Key Themes
- Cross-file logger coupling: the new
compiler_safe_outputs_envvars.gousesconsolidatedSafeOutputsJobLogfromcompiler_safe_outputs_job.go, leaking a package-internal identifier across files. A dedicatedconsolidatedSafeOutputsEnvvarsLogwould make each file self-contained.
Positive Highlights
- ✅ Clean mechanical decomposition — the moved code is identical to what was removed; no logic changes.
- ✅ Import cleanup in
compiler_safe_outputs_job.gocorrectly drops the now-unusedencoding/json,sort, andsliceutilimports. - ✅
compiler_safe_outputs_steps.gonow owns all step-builder helpers, making the responsibility boundary clear. - ✅ The
scriptNameToHandlerNameandgenerateSafeOutputScriptContentfunctions are a better fit in the steps file; the move improves navigability.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 37.6 AIC · ⌖ 9.93 AIC · ⊞ 7.8K
Comment /matt to run again
| } | ||
| } | ||
|
|
||
| // Note: GH_AW_CI_TRIGGER_TOKEN is added at the step level (in buildHandlerManagerStep) |
There was a problem hiding this comment.
[/codebase-design] consolidatedSafeOutputsJobLog is declared in compiler_safe_outputs_job.go but used here — this cross-file logger coupling makes compiler_safe_outputs_envvars.go harder to read and maintain independently.
💡 Suggested fix
Declare a dedicated logger at the top of compiler_safe_outputs_envvars.go:
import "github.com/github/gh-aw/pkg/logger"
var consolidatedSafeOutputsEnvvarsLog = logger.New("workflow:compiler_safe_outputs_envvars")Then replace consolidatedSafeOutputsJobLog.Printf(...) on this line with consolidatedSafeOutputsEnvvarsLog.Printf(...). This keeps each file self-contained and the namespace matches the filename — consistent with the rest of the codebase.
@copilot please address this.
There was a problem hiding this comment.
Implemented a file-scoped consolidatedSafeOutputsEnvvarsLog in compiler_safe_outputs_envvars.go and updated the serialization warning to use it. Commit 727b809.
There was a problem hiding this comment.
Clean mechanical decomposition — all functions moved verbatim into focused files with no behavioral changes. Imports adjusted correctly. LGTM.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 28 AIC · ⌖ 8.74 AIC · ⊞ 5.7K
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (278 new lines in 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. ❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
|
@copilot run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR Triage
Pure decomposition of
|
compiler_safe_outputs_job.goexceeded the compiler file-size guideline and contained a 144-line job environment builder, making safe-output compilation harder to review and evolve.Environment construction
buildJobLevelSafeOutputEnvVarstocompiler_safe_outputs_envvars.go.Step helper organization
compiler_safe_outputs_steps.go.compiler_safe_outputs_job.goto 765 lines.