Skip to content

Fix failing unit test: align Metrics Trends row labels with test expectations#34833

Merged
pelikhan merged 2 commits into
mainfrom
copilot/aw-avenger-failed-fix
May 26, 2026
Merged

Fix failing unit test: align Metrics Trends row labels with test expectations#34833
pelikhan merged 2 commits into
mainfrom
copilot/aw-avenger-failed-fix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

TestRenderCrossRunReportMarkdown_IncludesNewSections was failing because it asserted the markdown output contains "Cost Trend" and "Token Trend", but renderMarkdownMetricsTrend rendered those rows as "Cost" and "Tokens".

Change

  • Renamed table row labels in renderMarkdownMetricsTrend (audit_cross_run_render.go):
    • "Cost""Cost Trend"
    • "Tokens""Token Trend"
- fmt.Fprintf(os.Stdout, "| Cost | $%.4f | $%.4f | $%.4f | $%.4f | %s |\n", ...)
+ fmt.Fprintf(os.Stdout, "| Cost Trend | $%.4f | $%.4f | $%.4f | $%.4f | %s |\n", ...)

- fmt.Fprintf(os.Stdout, "| Tokens | %d | %d | %d | %d | %s |\n", ...)
+ fmt.Fprintf(os.Stdout, "| Token Trend | %d | %d | %d | %d | %s |\n", ...)

Copilot AI linked an issue May 26, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix workflow failure in Avenger Fix failing unit test: align Metrics Trends row labels with test expectations May 26, 2026
Copilot AI requested a review from pelikhan May 26, 2026 01:53
@pelikhan pelikhan marked this pull request as ready for review May 26, 2026 01:54
Copilot AI review requested due to automatic review settings May 26, 2026 01:54
@pelikhan pelikhan merged commit 17c225a into main May 26, 2026
@pelikhan pelikhan deleted the copilot/aw-avenger-failed-fix branch May 26, 2026 01:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes a failing markdown rendering unit test by aligning the “Metrics Trends” table row labels with what the test asserts.

Changes:

  • Updated the Metrics Trends markdown table label from Cost to Cost Trend.
  • Updated the Metrics Trends markdown table label from Tokens to Token Trend.
Show a summary per file
File Description
pkg/cli/audit_cross_run_render.go Adjusts markdown table row labels in renderMarkdownMetricsTrend to match unit test expectations.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

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.

[aw] Avenger failed

3 participants