Skip to content

Improve compile output clarity and color - #49139

Merged
pelikhan merged 10 commits into
mainfrom
copilot/compile-output-cleanup
Jul 30, 2026
Merged

Improve compile output clarity and color#49139
pelikhan merged 10 commits into
mainfrom
copilot/compile-output-cleanup

Conversation

@pelikhan

@pelikhan pelikhan commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • suppress per-workflow success noise during batch compilation
  • aggregate repeated experimental feature notices and the Copilot billing tip
  • restore adaptive terminal colors for compile diagnostics written to stderr
  • color workflow paths, warning labels/icons, informational tips, and successes using the existing palette
  • preserve ANSI-free output when compile output is redirected or captured
  • make compilation summaries, schedule times, and slash-command guidance clearer
  • add coverage for batch output and stderr color-profile behavior

Validation

  • make agent-report-progress
  • ./gh-aw compile (266 workflows compiled successfully; output remains 191 lines when captured)
  • pseudo-terminal compile run confirms ANSI styling is emitted interactively
  • redirected compile run confirms zero ANSI sequences

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

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 11 AIC · ⊞ 8.7K ·
Comment /souschef to run again


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.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12 AIC · ⊞ 8.7K ·
Comment /souschef to run again


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.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.3 AIC · ⊞ 6.3K ·
Comment /souschef to run again


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

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.6 AIC · ⊞ 8.7K ·
Comment /souschef to run again

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8b8cb5a7-945d-4268-86ac-0135da49c377
Copilot AI review requested due to automatic review settings July 30, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +367 to +369
batchMode := !config.Verbose && len(mdFiles) > 1
compiler.SetBatchMode(batchMode)
compiler.SetQuiet(batchMode)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/cli/compile_stats.go Outdated
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@pelikhan pelikhan changed the title Improve compile output clarity Improve compile output clarity and color Jul 30, 2026
@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot run pr-finisher skill

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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.

@copilot please run the pr-finisher skill, update this branch if needed, and then address any remaining review feedback before rerunning checks.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 11 AIC · ⊞ 8.7K ·
Comment /souschef to run again

pelikhan and others added 2 commits July 30, 2026 14:18
… 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>
pelikhan and others added 3 commits July 30, 2026 14:24
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 364c1c8e-f8fd-45b3-8560-468c78bb93ce
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot July 30, 2026 14:38
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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.

@copilot please run the pr-finisher skill, address these unresolved review threads (newest first), and rerun checks once the branch is up to date:

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12 AIC · ⊞ 8.7K ·
Comment /souschef to run again

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[!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....

All three review threads have been addressed in code (commit 89601c3 and earlier):

  1. Batch mode for explicit files: compileSpecificFiles now sets batch mode when compiling multiple files (lines 56-58 of compile_pipeline.go)
  2. Test coverage: Added pkg/cli/compile_batch_notices_test.go with comprehensive batch notice tests
  3. Succeeded tracking: CompilationStats.Succeeded field added and incremented at workflow success points

Local validation passed:

  • ✅ make fmt
  • ✅ make lint
  • ✅ make agent-report-progress (including test-unit)
  • ✅ 266 workflows compiled successfully

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.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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.

@copilot please run the pr-finisher skill, address any unresolved review feedback, and rerun checks once the branch is up to date.

Generated by PR Sous Chef run: https://github.com/github/gh-aw/actions/runs/30557283067

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.3 AIC · ⊞ 6.3K ·
Comment /souschef to run again

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[!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....

PR finisher completed. All review feedback has been addressed in code:

Review Thread Fixes (commit 89601c3):

  1. ✅ Batch mode for explicit files - compileSpecificFiles sets batch mode for multiple files
  2. ✅ Test coverage - pkg/cli/compile_batch_notices_test.go added with comprehensive tests
  3. ✅ Succeeded tracking - CompilationStats.Succeeded field tracks successful compilations

Current Validation Status:

  • ✅ make fmt - passed
  • ✅ make golint - 0 issues
  • ✅ Working tree clean, no uncommitted changes
  • ✅ All 266 workflows compile successfully

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.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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.

@copilot please run the skill, address any unresolved review feedback, and rerun checks once the branch is up to date.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.6 AIC · ⊞ 8.7K ·
Comment /souschef to run again

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[!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....

All work completed. No code changes needed:

✅ All 3 review threads addressed (commit 89601c3)
✅ Local validation passing (fmt, lint, test-unit)
✅ Working tree clean, 266 workflows compile successfully

The review threads are resolved in code but require manual GitHub UI action to mark as resolved. A maintainer should:

  1. Mark the 3 review threads as resolved in GitHub's UI
  2. Re-trigger CI to get fresh results

No further agent action possible - the localhost remote prevents programmatic thread resolution.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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.

@copilot please run the pr-finisher skill, verify the previously addressed review feedback is fully resolved, and post a concise status update. If all review threads are already addressed in code, help get the remaining unresolved threads resolved in GitHub and make sure checks are green.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 4.94 AIC · ⊞ 8.7K ·
Comment /souschef to run again

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[!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....

PR Finisher Status

✅ Code Changes Complete

All three review threads are fully addressed in code:

  1. Batch mode for explicit files (compile_pipeline.go:56-58)

    • compileSpecificFiles sets batchMode = !config.Verbose && len(config.MarkdownFiles) > 1
    • Calls compiler.SetBatchMode(batchMode) and compiler.SetQuiet(batchMode)
    • Calls displayBatchCompilationNotices before returning
  2. Test coverage (pkg/cli/compile_batch_notices_test.go)

    • TestDisplayBatchCompilationNotices with 6 sub-cases
    • TestBatchModeSetOnSpecificFilesWhenMultiple verifies batch-mode logic
  3. Succeeded tracking (compile_stats.go:29)

    • CompilationStats.Succeeded field tracks successful compilations
    • Used at line 148: successCount := stats.Succeeded

✅ Local Validation Passes

  • make fmt
  • make lint ✓ (warnings are pre-existing)
  • make test-unit ✓ (impacted tests passed)

⚠️ Manual Actions Required

Review threads need manual resolution:

CI re-run required:

  • Agent pushes do not trigger CI workflows
  • Several workflows show "action_required" status from the last HEAD push
  • Action needed: Close/reopen the PR or manually trigger workflows to get fresh CI results

Summary

All code work is complete and locally validated. The PR is functionally ready for merge pending human actions: resolve the 3 review threads in GitHub's UI and re-trigger CI for fresh check results.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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.

@copilot please run the pr-finisher skill, address these unresolved review threads (newest first), and rerun checks once the branch is up to date:

Generated by PR Sous Chef run: https://github.com/github/gh-aw/actions/runs/30572496291

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 7.46 AIC · ⊞ 8.7K ·
Comment /souschef to run again

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[!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....

Review Threads Status

All three review threads are fully addressed in code (commit 89601c3):

✅ Thread r3683035382: Batch mode for explicit files

Fix location: pkg/cli/compile_pipeline.go:56-58

  • compileSpecificFiles sets batchMode = !config.Verbose && len(config.MarkdownFiles) > 1
  • Calls compiler.SetBatchMode(batchMode) and compiler.SetQuiet(batchMode)
  • Calls displayBatchCompilationNotices at line 299 before returning

✅ Thread r3683035431: Test coverage

Fix location: pkg/cli/compile_batch_notices_test.go

  • TestDisplayBatchCompilationNotices with 6 sub-cases covering aggregation logic
  • TestBatchModeSetOnSpecificFilesWhenMultiple verifies batch-mode activation

✅ Thread r3683035477: Succeeded tracking

Fix location: pkg/cli/compile_stats.go:29

  • CompilationStats.Succeeded field explicitly tracks successful compilations
  • Used at line 148: successCount := stats.Succeeded

✅ Validation Complete

  • make fmt
  • make test-unit ✓ (all impacted tests passed)
  • Working tree clean

⚠️ Limitations

I cannot resolve these threads programmatically—the GraphQL API is blocked in the sandboxed environment. Each thread already has a substantive Copilot reply explaining the fix. Per the pr-finisher skill, these threads should be resolved, but manual action is required:

Manual resolution needed: A maintainer with GitHub UI access should mark the three threads as resolved and re-trigger CI (agent pushes don't trigger workflows).

@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot run pr-finisher skill

@pelikhan
pelikhan merged commit 1ec2057 into main Jul 30, 2026
34 of 35 checks passed
@pelikhan
pelikhan deleted the copilot/compile-output-cleanup branch July 30, 2026 19:56
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants