Skip to content

Fix trial_confirmation.go sub-step bullets to use console.FormatListItemStderr#43588

Merged
pelikhan merged 6 commits into
mainfrom
copilot/fix-trial-confirmation-sub-steps
Jul 5, 2026
Merged

Fix trial_confirmation.go sub-step bullets to use console.FormatListItemStderr#43588
pelikhan merged 6 commits into
mainfrom
copilot/fix-trial-confirmation-sub-steps

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

The two sub-step bullet pairs in trial_confirmation.go (the a./b. lines under "For each of N executions") used raw fmt.Fprintf(os.Stderr, ...) instead of console helpers, making them visually inconsistent with all surrounding steps and stripping TTY-aware color/style in non-interactive contexts.

Changes

  • pkg/cli/trial_confirmation.go — replaced the four raw fmt.Fprintf sub-step calls with console.FormatListItemStderr, covering both the single-workflow and multi-workflow code paths:
// Before
fmt.Fprintf(os.Stderr, "     a. Execute %s\n", workflowName)
fmt.Fprintf(os.Stderr, "     b. Auto-merge any pull requests created during execution\n")

// After
fmt.Fprintln(os.Stderr, console.FormatListItemStderr(fmt.Sprintf("a. Execute %s", workflowName)))
fmt.Fprintln(os.Stderr, console.FormatListItemStderr("b. Auto-merge any pull requests created during execution"))

FormatListItemStderr applies TTY-aware styling (using stderr's TTY state rather than stdout's) and a prefix, consistent with how the rest of the execution steps render.


Generated by 👨‍🍳 PR Sous Chef · 6.18 AIC · ⌖ 6.22 AIC · ⊞ 3.7K ·
Comment /souschef to run again

…ItemStderr in trial_confirmation.go

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix trial_confirmation.go sub-step bullets to use console.FormatListItemStderr Fix trial_confirmation.go sub-step bullets to use console.FormatListItemStderr Jul 5, 2026
Copilot AI requested a review from pelikhan July 5, 2026 16:36
@pelikhan pelikhan marked this pull request as ready for review July 5, 2026 16:41
Copilot AI review requested due to automatic review settings July 5, 2026 16:41
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #43588 does not have the 'implementation' label and has only 4 new lines of code in business logic directories (threshold: 100).

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped.

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

This PR updates the trial execution plan output in gh aw so the lettered sub-steps under “For each of N executions” render using the console list-item helper, making the output consistent with other styled/TTY-aware console formatting in the codebase.

Changes:

  • Replaced raw fmt.Fprintf(os.Stderr, " a./b....") lines with console.FormatListItemStderr(...) for the single-workflow path.
  • Applied the same list-item formatting change to the multi-workflow path.
Show a summary per file
File Description
pkg/cli/trial_confirmation.go Switches the “a./b.” sub-step lines to console.FormatListItemStderr for consistent, stderr-TTY-aware list formatting.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread pkg/cli/trial_confirmation.go Outdated
@@ -179,8 +179,8 @@ func showTrialConfirmation(opts trialConfirmationOptions) error {
workflowName := opts.parsedSpecs[0].WorkflowName
if opts.repeatCount > 0 && opts.autoMergePRs {
fmt.Fprintf(os.Stderr, console.FormatInfoMessage(" %d. For each of %d executions:\n"), stepNum, opts.repeatCount+1)
Comment thread pkg/cli/trial_confirmation.go Outdated
@@ -196,8 +196,8 @@ func showTrialConfirmation(opts trialConfirmationOptions) error {

if opts.repeatCount > 0 && opts.autoMergePRs {
fmt.Fprintf(os.Stderr, console.FormatInfoMessage(" %d. For each of %d executions:\n"), stepNum, opts.repeatCount+1)
@github-actions github-actions Bot mentioned this pull request Jul 5, 2026

@github-actions github-actions Bot 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.

LGTM. The four raw fmt.Fprintf calls are cleanly replaced with console.FormatListItemStderr — the correct stderr-TTY-aware helper — matching how observability_insights.go and other callers render list items. No test regressions detected. The slight indentation change ( a. • a.) is intentional and consistent with all surrounding steps.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 27.7 AIC · ⌖ 5.83 AIC · ⊞ 4.9K

@github-actions github-actions Bot 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.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 36.3 AIC · ⌖ 6.79 AIC · ⊞ 6.7K
Comment /matt to run again

Comment thread pkg/cli/trial_confirmation.go Outdated
@@ -179,8 +179,8 @@ func showTrialConfirmation(opts trialConfirmationOptions) error {
workflowName := opts.parsedSpecs[0].WorkflowName
if opts.repeatCount > 0 && opts.autoMergePRs {
fmt.Fprintf(os.Stderr, console.FormatInfoMessage(" %d. For each of %d executions:\n"), stepNum, opts.repeatCount+1)

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.

[/codebase-design] The parent header on this line still uses FormatInfoMessage (stdout TTY detection) while writing to os.Stderr — the same TTY mismatch this PR fixes for the a./b. sub-steps.

💡 Suggestion

Replace FormatInfoMessage with FormatInfoMessageStderr for all fmt.Fprintf(os.Stderr, ...) call sites in this file:

// Before (still inconsistent after this PR)
fmt.Fprintf(os.Stderr, console.FormatInfoMessage("  %d. For each of %d executions:\n"), stepNum, opts.repeatCount+1)

// After (fully consistent)
fmt.Fprintf(os.Stderr, console.FormatInfoMessageStderr("  %d. For each of %d executions:\n"), stepNum, opts.repeatCount+1)

There are ~15 similar call sites throughout this function. A single sweep would complete the fix the PR started.

@copilot please address this.

@github-actions github-actions Bot 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.

REQUEST_CHANGES — the fix migrates to FormatListItemStderr correctly for TTY-awareness, but introduces two visual regressions that need addressing before merge.

Blocking issues (2)

Indentation regression

FormatListItemStderr renders " • " + item — identical leading depth to the numbered parent step (" N."). The sub-steps are no longer visually subordinate; they appear as siblings. Old code used five leading spaces. See line 182–183.

Redundant bullet + letter label

The item strings "a. Execute ..." and "b. Auto-merge ..." already carry letter labels. After wrapping with FormatListItemStderr, the output is " • a. Execute ..." — both a bullet and an alphabetic label. Every other FormatListItemStderr call in the codebase passes plain unlabelled text. Pick one convention: either drop the a./b. prefixes and rely on the bullet, or use a plain fmt.Fprintf with letter labels and add TTY-aware styling manually. See line 182.

Both issues affect both the single-workflow and multi-workflow code paths identically.

🔎 Code quality review by PR Code Quality Reviewer · 57.3 AIC · ⌖ 5.33 AIC · ⊞ 5.4K
Comment /review to run again

Comment thread pkg/cli/trial_confirmation.go Outdated
fmt.Fprintf(os.Stderr, " a. Execute %s\n", workflowName)
fmt.Fprintf(os.Stderr, " b. Auto-merge any pull requests created during execution\n")
fmt.Fprintln(os.Stderr, console.FormatListItemStderr(fmt.Sprintf("a. Execute %s", workflowName)))
fmt.Fprintln(os.Stderr, console.FormatListItemStderr("b. Auto-merge any pull requests created during execution"))

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.

Indentation regression: the sub-steps now appear at the same column as their numbered parent, breaking the visual hierarchy.

💡 Details and suggested fix

FormatListItemStderr renders " • " + item — two leading spaces plus a bullet. The parent step line also uses two leading spaces:

  3. For each of N executions:
  • a. Execute workflow.md         ← same column as parent!
  • b. Auto-merge pull requests

The old code used five leading spaces (" a.") which placed sub-steps clearly inside the parent. The new rendering breaks the subordinate relationship.

To fix, prepend extra spaces inside the item string to push the bullet deeper:

fmt.Fprintln(os.Stderr, console.FormatListItemStderr("    a. Execute "+workflowName))
fmt.Fprintln(os.Stderr, console.FormatListItemStderr("    b. Auto-merge any pull requests created during execution"))

This produces " • a. Execute ..." which indents past the parent " N.". The same fix applies to the multi-workflow branch (lines 199–200).

Comment thread pkg/cli/trial_confirmation.go Outdated
fmt.Fprintf(os.Stderr, console.FormatInfoMessage(" %d. For each of %d executions:\n"), stepNum, opts.repeatCount+1)
fmt.Fprintf(os.Stderr, " a. Execute %s\n", workflowName)
fmt.Fprintf(os.Stderr, " b. Auto-merge any pull requests created during execution\n")
fmt.Fprintln(os.Stderr, console.FormatListItemStderr(fmt.Sprintf("a. Execute %s", workflowName)))

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.

Redundant label + bullet: passing "a. Execute ..." into FormatListItemStderr yields " • a. Execute ..." — both a bullet point and a letter label are visible simultaneously.

💡 Details and suggested fix

FormatListItemStderr unconditionally prepends " • ". The item strings passed in are "a. Execute ..." and "b. Auto-merge ...", so the rendered lines are:

  • a. Execute workflow.md
  • b. Auto-merge any pull requests created during execution

Every other FormatListItemStderr call in the codebase passes plain text without letter prefixes. The original intent of these sub-steps was to use lettered labels (a/b) to indicate ordering within the parent step. A bullet prefix undermines that by adding a second, redundant visual marker.

Either drop the letter prefix and just use the bullet:

fmt.Fprintln(os.Stderr, console.FormatListItemStderr("Execute "+workflowName))
fmt.Fprintln(os.Stderr, console.FormatListItemStderr("Auto-merge any pull requests created during execution"))

Or skip FormatListItemStderr and keep the letter label with appropriate indentation and TTY-aware styling directly.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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

Unresolved review feedback to address:

  • github-actions: requested changes

Generated by 👨‍🍳 PR Sous Chef · 6.18 AIC · ⌖ 6.22 AIC · ⊞ 3.7K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

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

Unresolved review feedback to address:...

Addressed the unresolved review feedback in 936f59c. Local validation passed (make agent-report-progress, make test), and the updated output now uses stderr-aware info formatting consistently while rendering the repeated sub-steps as indented nested bullets. CI on this new agent-generated head still needs a maintainer-triggered rerun.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Triage — Run §28750744185

Field Value
Category bug
Risk 🟢 Low
Score 28 / 100
Action ⏸️ defer
Batch pr-batch:console-migration

Score breakdown: Impact 12 + Urgency 8 + Quality 8

Rationale: Single-file fix migrating sub-step bullets to FormatListItemStderr (1 file, +33/-27). CHANGES_REQUESTED from github-actions bot blocks merge. No CI checks recorded. Low urgency — cosmetic consistency fix, not a functional bug.

⚠️ Blocked: github-actions has CHANGES_REQUESTED. Agent must address review feedback before this can proceed.

Recommended next step: Defer until bot review concerns are addressed. Review in console-migration batch with #43587 and #43589.

Generated by 🔧 PR Triage Agent · 101.7 AIC · ⌖ 12.4 AIC · ⊞ 5.5K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments from github-actions, ensure the branch is up to date, and rerun checks once ready.

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

Generated by 👨‍🍳 PR Sous Chef · 22.2 AIC · ⌖ 8.8 AIC · ⊞ 3.7K ·
Comment /souschef to run again

Copilot AI and others added 2 commits July 5, 2026 19:12
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…firmation-sub-steps

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review comments from github-actions, ensure the branch is up to date, and rerun checks once ready.

Generated by PR Sous Chef: https:/...

Addressed the outstanding github-actions feedback on the current head: pkg/cli/trial_confirmation.go now uses stderr-aware info formatting throughout and renders the repeated execution sub-steps as indented nested bullets without redundant letter labels. I also updated the branch with origin/main in f386186, then ran make fmt, make lint, make test-unit, make test, make recompile, and make agent-report-progress successfully. CI on this agent-pushed head is still unverified because maintainer-triggered reruns are required.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

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

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

Generated by 👨‍🍳 PR Sous Chef · 11.5 AIC · ⌖ 4.41 AIC · ⊞ 3.7K ·
Comment /souschef to run again

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

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

Generated by PR Sous Chef: https:/...

No additional code change is needed on the current head: f386186 already addresses the github-actions review feedback in pkg/cli/trial_confirmation.go, and the branch is not behind main. The remaining github-actions threads are outdated on older commits. The current PR workflow runs for f386186 are all action_required with zero jobs started, so there is nothing I can rerun from the agent side; a maintainer needs to approve or re-trigger CI on this head.

@pelikhan pelikhan merged commit bb2d3f2 into main Jul 5, 2026
30 checks passed
@pelikhan pelikhan deleted the copilot/fix-trial-confirmation-sub-steps branch July 5, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Fix trial_confirmation.go sub-step bullets to use console.FormatListItemStderr

4 participants