Improve compile output clarity and color - #49139
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8b8cb5a7-945d-4268-86ac-0135da49c377
There was a problem hiding this comment.
Pull request overview
Improves compile output readability by aggregating repetitive batch notices and clarifying summaries and guidance.
Changes:
- Adds batch-mode notice aggregation and suppresses per-workflow success output.
- Improves compilation summaries, schedule formatting, and slash-command grammar.
- Updates tests for summary and warning behavior.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/schedule_preprocessing.go |
Zero-pads displayed cron times. |
pkg/workflow/permissions_compiler_validator.go |
Aggregates the Copilot billing tip. |
pkg/workflow/compiler_validators.go |
Aggregates experimental-feature warnings. |
pkg/workflow/compiler_validators_test.go |
Tests feature usage collection. |
pkg/workflow/compiler_types.go |
Adds batch-mode state and accessors. |
pkg/cli/compile_summary_output_test.go |
Updates summary expectations. |
pkg/cli/compile_stats.go |
Reports succeeded and failed workflow counts. |
pkg/cli/compile_post_processing.go |
Corrects slash-command guidance grammar. |
pkg/cli/compile_post_processing_warning_test.go |
Tests singular guidance grammar. |
pkg/cli/compile_pipeline.go |
Enables and renders aggregated batch output. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 10/10 changed files
- Comments generated: 3
- Review effort level: Medium
| batchMode := !config.Verbose && len(mdFiles) > 1 | ||
| compiler.SetBatchMode(batchMode) | ||
| compiler.SetQuiet(batchMode) |
There was a problem hiding this comment.
Fixed in the latest commit. compileSpecificFiles now sets batchMode = !config.Verbose && len(config.MarkdownFiles) > 1 at the top of the function, calls compiler.SetBatchMode(batchMode) and compiler.SetQuiet(batchMode), and calls displayBatchCompilationNotices before returning — so all compile paths (single directory, multiple explicit files, directory flag) share the same aggregation behavior.
| return workflowDataList, nil | ||
| } | ||
|
|
||
| func displayBatchCompilationNotices(compiler *workflow.Compiler, config CompileConfig) { |
There was a problem hiding this comment.
Added pkg/cli/compile_batch_notices_test.go with TestDisplayBatchCompilationNotices (6 sub-cases: empty usage, single feature aggregate, multi-feature sorted by count, Copilot tip, JSON-mode suppression, verbose-mode suppression) and TestBatchModeSetOnSpecificFilesWhenMultiple (verifies the batch-mode condition and that notices are rendered exactly once). Two new setters on workflow.Compiler (SetExperimentalFeatureUsage, SetCopilotTipNeeded) enable direct control without a full compilation.
| if stats.Errors > 0 && failedWorkflowCount > 0 { | ||
| summary = fmt.Sprintf("Compiled %d workflow(s): %d error(s) across %d failed workflow(s), %d warning(s)", | ||
| stats.Total, stats.Errors, failedWorkflowCount, stats.Warnings) | ||
| successCount := max(stats.Total-failedWorkflowCount, 0) |
There was a problem hiding this comment.
Fixed in the latest commit. CompilationStats now carries an explicit Succeeded int field that is incremented at the workflow-success branch in both compileSpecificFiles and compileAllFilesInDirectory. printCompilationSummary uses stats.Succeeded directly instead of Total - len(FailureDetails). The grant strict-failure path no longer calls trackWorkflowFailure (which inflated FailureDetails without a matching Total increment); it records the error only in validationResults for JSON output and surfaces it via the returned error. Existing compile_summary_output_test.go cases were updated to set Succeeded explicitly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8b8cb5a7-945d-4268-86ac-0135da49c377
|
@copilot run pr-finisher skill |
…ithub/gh-aw into copilot/compile-output-cleanup
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot please run the
|
… test, and track Succeeded explicitly - Thread 1: enable batch mode + quiet suppression in compileSpecificFiles when !verbose && >1 files, and call displayBatchCompilationNotices at the end so all compile invocations have consistent aggregation behavior - Thread 2: add TestDisplayBatchCompilationNotices covering empty usage, single/multiple feature aggregation, copilot tip, JSON mode, and verbose mode; add TestBatchModeSetOnSpecificFilesWhenMultiple for end-to-end batch setup - Thread 3: add Succeeded int to CompilationStats tracked explicitly at the success branch; use it directly in printCompilationSummary instead of Total - len(FailureDetails); move grant (post-compilation tool) failure out of FailureDetails to avoid inflating the failed-workflow count; update existing test cases to set Succeeded - Add SetExperimentalFeatureUsage and SetCopilotTipNeeded setters to workflow.Compiler for test use Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 364c1c8e-f8fd-45b3-8560-468c78bb93ce
…into copilot/compile-output-cleanup
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot please run the
|
All three review threads have been addressed in code (commit 89601c3 and earlier):
Local validation passed:
The review threads need to be marked as resolved in GitHub's UI. I cannot access GitHub's API through the localhost remote to resolve them programmatically. |
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot please run the
|
PR finisher completed. All review feedback has been addressed in code: Review Thread Fixes (commit 89601c3):
Current Validation Status:
What's needed: The review threads are resolved in code but need to be marked as resolved in GitHub's UI. This agent cannot access GitHub's API through the localhost remote to resolve threads programmatically. A maintainer with GitHub UI access should mark the three review threads as resolved, then re-trigger CI. |
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot please run the skill, address any unresolved review feedback, and rerun checks once the branch is up to date.
|
All work completed. No code changes needed: ✅ All 3 review threads addressed (commit 89601c3) The review threads are resolved in code but require manual GitHub UI action to mark as resolved. A maintainer should:
No further agent action possible - the localhost remote prevents programmatic thread resolution. |
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot please run the
|
PR Finisher Status✅ Code Changes CompleteAll three review threads are fully addressed in code:
✅ Local Validation Passes
|
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. @copilot please run the
|
Review Threads StatusAll three review threads are fully addressed in code (commit 89601c3): ✅ Thread r3683035382: Batch mode for explicit filesFix location:
✅ Thread r3683035431: Test coverageFix location:
✅ Thread r3683035477: Succeeded trackingFix location:
✅ Validation Complete
|
|
@copilot run pr-finisher skill |
|
🎉 This pull request is included in a new release. Release: |
Summary
Validation
make agent-report-progress./gh-aw compile(266 workflows compiled successfully; output remains 191 lines when captured)Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Run: https://github.com/github/gh-aw/actions/runs/30548343701
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
run: https://github.com/github/gh-aw/actions/runs/30563574734