[maintainer-simulation] Cost page AIC rounding makes per-repository and workflow dollar values disagree with totals

Aperta
#20,097 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

Start with the aicc branch of formatNumber in dashboard/site/src/view-formatters.js, where values are rounded to unit.significant before formatAicc divides by 100. Check the DLS-UNIT-004 rule in docs/dashboard-language-specification.md and the aic unit on cost-by-repository and cost-by-workflow in dashboard/site/dashboard-fragments/overview.json. Done means the per-repository slices, the center total and the per-workflow values reconcile, which needs a maintainer decision on the spec change first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Finding from simulation (synthetic local fixture), not production.

Summary

On the Cost page, aicc-formatted values are rounded to 2 AIC before conversion to dollars. Parts then do not add up to the displayed total, and small per-run costs are distorted.

Maintainer impact

A FinOps maintainer sees three repositories at $0.40 each (sum $1.20) beside a center total of $1.18. Per-workflow values show $0.22 and $0.18 and an average of $0.04, even though the fixture runs cost 0.5 to 6 AIC. Cost figures cannot be reconciled.

Affected scenario

S08 (desktop 1440x1000).

Preconditions

Local simulation fixture: 36 successful synthetic runs, 3 repositories, 2 workflows each. Each repository has 39 AIC (true $0.39), 117 AIC in total ($1.17).

Reproduction

  1. Start node scripts/maintainer-simulation.mjs serve and open the local dashboard at 1440x1000.
  2. Expand Data and click Cost.
  3. Read the "Cost per repository" pie slices, the center "AIC cost" total, and the "Cost per workflow" bars.
  4. Reproduced in a fresh browser session.

Expected / actual

  • Expected: slices of $0.39 each, with a total of $1.17, or at least parts that agree with the total.
  • Actual: slices of $0.40 each, a total of $1.18, and an average of $0.04 per run.
Evidence and source paths
  • Artifact maintainer-simulation: shots/s08.png, shots/s08-repro.png, results.json.
  • dashboard/site/src/view-formatters.js formatNumber: with unit.format === 'aicc' it rounds to unit.significant (2 AIC) and then calls formatAicc (value/100).
  • docs/dashboard-language-specification.md DLS-UNIT-004 requires this rounding.
  • dashboard/site/dashboard-fragments/overview.json cost-by-repository and cost-by-workflow use the aic unit.

Potential minimal fix (hypotheses)

  • Format aicc after dividing by 100 and rounding to cents, instead of rounding to 2 AIC first. This needs a DLS-UNIT-004 change.
  • Alternatively, show the unrounded AIC in tooltips or aria labels so totals can be reconciled.

Tested SHA: fb8ce95eda1a96712fbce50c84ff2162bf25c375
Run: https://github.com/githubnext/gh-cao/actions/runs/41409482643

Generated by Dashboard Maintainer Simulation · copilot · auto · ~96 AIC · ⌖ ~1 AIC · ⊞ 10.4K · ◷

  • expires on Nov 16, 2026, 8:08 AM UTC
Lingua principale
JavaScript
Stelle
14
Fork
5
Merge medio
3h 24m
PR unite (30g)
796

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di githubnext/gh-cao

Tutte le issue di githubnext/gh-cao

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.