fix(examples): honest metric semantics across pilot.yaml cards

Corrections from the Pilot-side agent review:

- success rate -> pilot_issue_level_success_rate (shipped/attempted,
  deduped across retries), matching the web pilot-dashboard.json incl.
  its 50/80 thresholds. The per-attempt pilot_success_rate reads higher
  (retries count in its favor) and is deprecated for delivery health.
- cost / issue -> cost / shipped: issues_processed_total counts attempt
  outcomes, not unique issues — a third denominator on one row.
- prs merged / ci pass rate labeled '(recent)': GH-4093 hydrates PR
  counters from the execution_events ledger (~2026-07 on), so they are
  not lifetime like the cost/token cards beside them. True lifetime
  hydration + a real ci_runs counter are upstream Pilot asks.
This commit is contained in:
Aleks Petrov committed 2026-07-09 16:15:39 +02:00
1 parent 5b50bd236f
commit 0afe1708b4
1 file changed
+19 -10
+19 -10
View File
@@ -13,14 +13,18 @@ widgets:
unit: percentunit
sparkline: true
grid: { x: 0, y: 0, w: 6, h: 4 }
# Thresholds mirror the web pilot-dashboard.json Issue Success Rate panel.
thresholds:
- color: red
- value: 0.8
- value: 0.5
color: yellow
- value: 0.95
- value: 0.8
color: green
queries:
- expr: pilot_success_rate
# Issue-level: shipped / attempted, deduped across retries — same metric as
# the web dashboard. The per-attempt pilot_success_rate reads higher (retries
# count in its favor) and is deprecated for delivery health (Pilot TASK-392).
- expr: pilot_issue_level_success_rate
- type: stat
title: tokens
@@ -31,28 +35,32 @@ widgets:
- expr: sum(pilot_tokens_consumed_total)
- type: stat
title: cost / issue
title: cost / shipped
unit: currencyUSD
decimals: 2
sparkline: true
grid: { x: 12, y: 0, w: 6, h: 4 }
queries:
# Cost per *shipped* issue — same denominator family as the success-rate
# card (issues_processed_total counts attempt outcomes, not unique issues).
# `> 0` guards the zero-denominator case: renders "no data", not +Inf.
- expr: sum(pilot_execution_cost_usd_total) / (sum(pilot_issues_processed_total) > 0)
- expr: sum(pilot_execution_cost_usd_total) / (sum(pilot_issues_shipped_total) > 0)
- type: stat
title: prs merged
title: prs merged (recent)
unit: short
sparkline: true
grid: { x: 18, y: 0, w: 6, h: 4 }
queries:
# Lifetime total since pilot#4029 (counters hydrate from the store on boot;
# PR instrumentation fixed upstream via GH-4093).
# NOT lifetime, unlike the other row-1 cards: GH-4093 hydrates this from the
# execution_events ledger, which only reaches back to ~2026-07 — the ~1,100+
# pre-ledger merges are absent. Drop "(recent)" once Pilot hydrates the full
# history.
- expr: sum(pilot_prs_merged_total)
# Row 2 — CI pass gauge + token breakdown bars.
- type: gauge
title: ci pass rate
title: ci pass rate (recent)
unit: percentunit
min: 0
max: 1
@@ -66,7 +74,8 @@ widgets:
queries:
# Pilot exports no CI-specific pass/fail counter; PR outcomes are the closest
# proxy (pilot_prs_failed_total also counts approval rejections / merge
# escalations, not only CI failures).
# escalations, not only CI failures). "(recent)": the PR counters cover the
# execution_events ledger era (~2026-07 on), not lifetime — see "prs merged".
# `> 0` guards the zero-denominator case: renders "no data", not +Inf.
- expr: sum(pilot_prs_merged_total) / ((sum(pilot_prs_merged_total) + sum(pilot_prs_failed_total)) > 0)