Skip to content

[Code Quality] Fix incorrect percentage calculation in Copilot Agent Analysis report #50433

Closed as not planned

Description

@github-actions

Description

The copilot-agent-analysis.md workflow prompt computes an incorrect success-rate percentage. In the 2026-08-04 run (discussion #50367), the report states "Merged: 39 (63%)" and shows "62.9%" in the metrics table for 39/71 merged PRs. The correct value is 39/71 = 54.9%, not 62.9%/63%.

This was flagged by the Daily Regulatory Report #50406, which cross-checks daily/periodic report discussions for internal consistency. It notes the error makes the reported "4th consecutive daily decline" trend look less steep than it actually is (true drop is 87.1% -> 54.9%, not 87.1% -> 62.9%).

Suggested Changes

  • Review the percentage/success-rate calculation instructions in .github/workflows/copilot-agent-analysis.md (around lines 234 and 270, where [percentage]% is derived from agent_prs_merged / agent_prs_total)
  • Ensure the prompt/logic explicitly specifies merged / total * 100 rounded correctly, and add a worked example so the agent computing this at runtime doesn't round or truncate incorrectly
  • After editing, run make recompile to regenerate the lock file

Files Affected

  • .github/workflows/copilot-agent-analysis.md
  • .github/workflows/copilot-agent-analysis.lock.yml (regenerated)

Success Criteria

  • Given merged=39, total=71, the workflow computes and reports 54.9% (not 62.9%/63%)
  • No regression in other percentage-based fields in the same report

Source

Extracted from Daily Regulatory Report - 2026-08-04 (#50406), which reviewed Copilot Agent Analysis #50367

Priority

Medium - Self-contained data-accuracy bug affecting trend reporting, not blocking.

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 85.3 AIC · ⌖ 4.64 AIC · ⊞ 10.3K · ◷

  • expires on Aug 5, 2026, 5:19 PM UTC-08:00

Activity

  1. github-actions commented on Aug 6, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-08-06T01:19:03.711Z.

    Closed by Workflow

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions