Skip to content

chore: update aic computation in impact efficiency report#39585

Merged
mnkiefer merged 7 commits into
mainfrom
copilot/fix-aic-computation
Jun 16, 2026
Merged

chore: update aic computation in impact efficiency report#39585
mnkiefer merged 7 commits into
mainfrom
copilot/fix-aic-computation

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

gh aw logs --start-date -180d returns 0 runs, causing every Impact Efficiency Report to show AIC = 0 and Impact Efficiency = undefined. The gh-api-fallback path also always sets aic: null, so neither code path was producing usable cost data.

Changes

scripts/prepare-objective-impact-report-dataset.sh

  • Fetches memory/token-audit branch (written daily by the AIC Usage Audit) and aggregates all daily snapshots within the 180-day window into a new aic-by-workflow.json dataset
  • Each snapshot contributes total_aic and run_count per workflow; entries are summed across all matching days
  • Extends dataset-manifest.json with aic_by_workflow_source, aic_by_workflow_snapshot_count, and aic_by_workflow_total for provenance
  • Failed individual snapshot reads are logged to stderr instead of silently producing nulls

.github/workflows/objective-impact-report.md

  • Adds aic-by-workflow.json to required inputs
  • Replaces AIC Source of Truth priority order: aic-by-workflow.json is now primary; workflow-logs.json is fallback only
  • Instructs agent to surface workflows with missing AIC entries in the Data Quality section rather than treating them as zero-cost

pr-sous-chef: requested branch update for https://github.com/github/gh-aw/actions/runs/27631101484

Generated by 👨‍🍳 PR Sous Chef · 53 AIC · ⌖ 1.05 AIC · ⊞ 17.4K ·

Copilot AI and others added 3 commits June 16, 2026 15:45
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…flow.json

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…lity guidance

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI requested a review from mnkiefer June 16, 2026 15:56
@mnkiefer mnkiefer changed the title Fix AIC computation in Impact Efficiency Report chore: update aic computation in impact efficiency report Jun 16, 2026
@mnkiefer mnkiefer marked this pull request as ready for review June 16, 2026 15:56
Copilot AI review requested due to automatic review settings June 16, 2026 15:56

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 fixes missing/zero AI Credits (AIC) in the Impact Efficiency Report by introducing a deterministic, aggregated AIC dataset sourced from daily token-audit “memory” snapshots, and updating the report workflow to prioritize that dataset over workflow-run logs.

Changes:

  • Add generation of aic-by-workflow.json by aggregating daily snapshots from the memory/token-audit branch across the 180-day window.
  • Extend dataset-manifest.json with provenance/coverage fields for the aggregated AIC dataset.
  • Update the Impact Efficiency Report workflow instructions to require and prioritize aic-by-workflow.json for AIC.
Show a summary per file
File Description
scripts/prepare-objective-impact-report-dataset.sh Fetches and aggregates token-audit daily snapshots into aic-by-workflow.json, and adds manifest provenance fields.
.github/workflows/objective-impact-report.md Requires aic-by-workflow.json and updates AIC source-of-truth guidance to use it as primary.
.github/workflows/objective-impact-report.lock.yml Regenerated lock file reflecting the workflow markdown updates.

Copilot's findings

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 3

Comment thread scripts/prepare-objective-impact-report-dataset.sh
Comment thread scripts/prepare-objective-impact-report-dataset.sh Outdated
Comment thread .github/workflows/objective-impact-report.md Outdated
mnkiefer and others added 2 commits June 16, 2026 18:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer

Copy link
Copy Markdown
Collaborator

@copilot Resolve conflicts

…fix-aic-computation

# Conflicts:
#	.github/workflows/objective-impact-report.lock.yml

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Resolve conflicts

Resolved in d0427bd.

@mnkiefer mnkiefer merged commit 6cf5c0c into main Jun 16, 2026
@mnkiefer mnkiefer deleted the copilot/fix-aic-computation branch June 16, 2026 16:41
Copilot AI restored the copilot/fix-aic-computation branch June 16, 2026 16:42
Copilot stopped work on behalf of mnkiefer due to an error June 16, 2026 16:42
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.

3 participants