29 Commits
Author SHA1 Message Date
Aleks Petrov fed08004c8 docs(examples): fix pilot.yaml run comment port 2026-10-05 13:10:01 +02:00
Aleks Petrov ea04ada4fb feat(examples): window success/cost by model to 30d
Both per-model bargauges were lifetime (hydrated counters blend eras).
Window with max_over_time - min_over_time over 30d (not increase(): the
counters are store-hydrated and dip on restart). The >20-exec gate is
now also windowed. Fleet has consolidated to one model in-window, so
both currently render a single bar; more return automatically when other
models run in-window. Titles gain (30d) to match delivery/ci cards.
2026-08-06 16:03:56 +02:00
Aleks Petrov 8422d82639 fix(examples): ci pass rate goes green at 90% (was 95%)
Green threshold was 0.95, so the honest 30d figure (~94.8%) sat in the
yellow band and read as a warning. Lower the green cutoff to 0.9; red
<0.8 and yellow 0.8-0.9 unchanged.
2026-08-06 15:55:38 +02:00
Aleks Petrov eeee2f56eb feat(examples): window ci pass rate to 30d to match delivery rate
pilot_ci_runs_total is a lifetime hydrated counter, so the gauge read
all-time (92.8%). Window it to 30d with max_over_time - min_over_time
(the hydrated-counter pattern used across this config) for the honest
94.8%; increase() would inflate to 96.3% by re-adding the hydration base
on each of the 5 restart dips/30d. Pilot exposes no pilot_window_ci_*
gauge, so this is a client-side window; note in-config that true parity
would need a server-computed gauge from Pilot.
2026-08-06 15:41:48 +02:00
Aleks Petrov 55badff1d7 feat(examples): sort success/cost by model bargauges highest-first
Wrap both per-model queries in sort_desc(). Bargauges run as instant
queries and grom preserves Prometheus's returned vector order, so the
bars now rank by value top-to-bottom (success by %, cost by $).
2026-08-06 15:26:46 +02:00
Aleks Petrov 9caa36a319 refactor(examples): pilot quality+pipeline as a 2x2 block
Regroup row 2 into a 2x2:
  ci pass rate      | pipeline latency
  success by model  | cost by model

Two 12-col Y-bands (y:4, y:11) at h:7 keep the same y:4->18 footprint,
so rows below don't shift. pipeline latency drops from full-width to
half-width (noted in-config). Downstream row comments renumbered.
2026-08-06 15:18:05 +02:00
Aleks Petrov b6fdae6408 fix(examples): apply the >20-exec gate to cost-by-model too
Consistency with success-by-model: drop dead-experiment models
(glm-5.1, claude-opus-4-7[1m]) from the per-model spend bargauge.
2026-08-06 15:12:17 +02:00
Aleks Petrov f8bf711937 fix(examples): gate success-by-model to models with >20 lifetime execs
pilot_executions_total is a lifetime hydrated counter, so every model
ever run is exported forever. Tiny-sample dead experiments (glm-5.1 = 7
execs, claude-opus-4-7[1m] = 1 exec) pegged the panel at a meaningless
100%. Gate the series to >20 lifetime executions so only real,
comparable models render.
2026-08-06 15:05:19 +02:00
Aleks Petrov f083ed3fdd fix(examples): wrap pilot_window_* stat queries in max() — window-label churn leaves a dead sibling series the stat card can pick 2026-08-06 13:41:01 +02:00
Aleks Petrov 44817b9261 docs(examples): pilot headline cards → rolling-window gauges (pilot#4735)
delivery rate + cost/shipped now read pilot_window_delivery_rate /
pilot_window_cost_per_delivered_usd instead of the lifetime era-blended
aggregates (~79.9% / ~$0.80 forever). Cards read 0 until the daemon
carries the pilot#4739 aggregate fix — noted in the panel comments.
2026-08-05 19:50:43 +02:00
Aleks Petrov 8e37acaaba fix(pilot-dashboard): restart-immune windowed queries for hydrated counters
Store-hydration re-bases pilot_* counters at daemon boot; when the base
lands below the pre-restart live value, Prometheus reads a counter reset
and increase() adds the full lifetime base as new activity (observed:
prs/3h rendered 1236 vs a true value of 3 after the 2026-07-23 12:18Z
restart). Replace increase() with max_over_time - min_over_time on the
four hydrated-counter panels (prs/3h, execs by result, breaker trips,
tokens/5m) and document the finalize-time token counting + lifetime
per-model panels (April glm-5.1 experiment rows are real data).
2026-07-23 16:08:42 +02:00
Aleks Petrov 9285ec529b feat(examples): drift-watch pilot dashboard — per-model scoring/cost, pipeline p50 latency, guard-counter row 2026-07-16 23:58:49 +02:00
Aleks Petrov 02bc7f043c docs(examples): pin prs/3h until pilot#4134 monotonicity fix — restarts re-poison windows 2026-07-11 15:24:16 +02:00
Aleks Petrov 89368d85da feat(examples): 'this run / right now' row — process view under the business view
execs-this-run (session-scoped by nature; sparkline sawtooth marks
daemon restarts), queue depth, active PRs, api error rate. Answers
'what is the daemon doing' without re-polluting the lifetime rows.
2026-07-11 15:23:27 +02:00
Aleks Petrov 7ce89bb042 docs(examples): note the counter monotonicity poisoning in the prs/3h TODO 2026-07-09 20:33:07 +02:00
Aleks Petrov 4fa5b051df fix(examples): prs window 24h -> 3h until the hydration back-fill ages out
The 2026-07-09 17:28 deploy back-filled +976 pre-ledger merges;
increase() reads that as throughput for a full trailing window. 3h
window exits the artifact tonight; TODO in-file to widen back to 24h
after 2026-07-10 ~17:30.
2026-07-09 20:01:10 +02:00
Aleks Petrov 77e3f88486 feat(examples): prs merged -> prs / 24h session throughput
Rolling-day increase() answers 'how many PRs do we merge per session';
the lifetime total stayed readable via the pr delivery gauge. decimals:
0 because increase() extrapolates fractionally.
2026-07-09 19:55:36 +02:00
Aleks Petrov 966e0b8bd5 fix(examples): tokens/5m chart — increase() so the title means what it says
rate()[5m] plots tokens per SECOND (5m-smoothed); the title promised
tokens per 5 minutes. increase()[5m] delivers exactly that, ~300x
larger values, and the area under the curve is total tokens.
2026-07-09 19:44:22 +02:00
Aleks Petrov e017d1a52e fix(examples): pilot PR counters are lifetime now — drop (recent), retitle gauge
Pilot 2f25dcd0 hydrates pilot_prs_merged/failed from executions
(lifetime), so the window caveats are obsolete. The merged/(merged+
failed) gauge reads 99% on lifetime data — that's PR delivery, not a
plausible CI pass rate, so retitle honestly until pilot#4134 ships the
real pilot_ci_runs_total counter.
2026-07-09 19:36:55 +02:00
Aleks Petrov 6c1a9fd06f feat(widget): overlay mode for multi-series timeseries
Multi-series charts previously always stacked — the stacked flag was
parsed but never honored. Now stacked: false (the default) overlays on
a shared y-scale via render.BrailleMulti: first series as filled area,
later ones as lines on top, one color per series. This matches
Grafana's default timeseries rendering, so imported dashboards look
right too. Solid (--ascii) mode keeps stacking: no block overlay
primitive exists.

examples/pilot.yaml grows a full-width 'time / issue' row overlaying
avg PR time-to-merge (area) with avg execution duration (line), both
1h windows. exec durations are session-scoped upstream (hydration
asked in pilot#4134), so that series starts sparse.
2026-07-09 19:03:32 +02:00
Aleks Petrov e2c65d426e chore: rename project grot -> grom
Grafana's mascot and AI helper are both named Grot
(grafana.com/grot) — a name collision flagged on the r/grafana
launch thread. grom (Polish: thunder) keeps the short Slavic name
without squatting on Grafana's brand.

Renames the Go module, cmd dir, binary, brew cask, docs, examples,
and dev docs. Old repo URL redirects; module path is new as of
v0.2.0.
2026-07-09 18:21:43 +02:00
Aleks Petrov 0afe1708b4 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.
2026-07-09 16:15:39 +02:00
Aleks Petrov 5b50bd236f fix(examples): replace duplicate success gauge with CI pass rate
Row 1 stat and row 2 gauge both showed pilot_success_rate. The gauge now
tracks PR delivery instead: merged / (merged + failed), the closest proxy
Pilot exports (no CI-specific pass/fail counter; failed also counts
approval rejections and merge escalations).

Also drop the stale 'reads 0' caveat on the prs-merged card — upstream
PR instrumentation is live since GH-4093 (54 merged on the live board).
2026-07-09 16:02:58 +02:00
Aleks Petrov 892650a341 fix(examples): pilot.yaml lifetime counter semantics
pilot#4029 shipped (store-hydrated counters survive daemon restarts), so
raw pilot_*_total sums are now lifetime totals:

- 'prs / session' stat -> 'prs merged' (lifetime); note that the upstream
  PR instrumentation currently exports 0 (tracked on pilot#4029)
- cumulative cost chart comment: curve is all-time spend, not since-restart
2026-07-08 21:11:08 +02:00
Aleks Petrov fc086f1ac9 feat(examples): universal dashboard for any Prometheus
Uses only 'up' and the scrape_* metrics Prometheus attaches to every target,
so it renders out of the box on a stock install — no exporters, no
self-scrape job required. Covers all four widget types.
2026-07-07 20:39:15 +02:00
Aleks Petrov b01d806265 feat(stat): sparkline trend bands under stat values
- config: 'sparkline: true' on stat widgets routes their queries through
  query_range, so the existing value+trend rendering receives history.
- grafana import: stat graphMode maps 1:1 — absent/'area' (Grafana default)
  → sparkline on, 'none' → off.
- examples/pilot.yaml row 1 reworked: success rate, tokens, cost/issue
  (zero-denominator guarded), prs/session — all with trend bands.
- demo gallery: all four row-1 cards carry the subdued band.
2026-07-07 20:24:07 +02:00
Aleks Petrov fa49a2b462 chore(examples): poll every 10s
examples/pilot.yaml: refresh 30s → 10s.
2026-07-07 18:24:08 +02:00
Aleks Petrov 48168660f5 fix(render): NaN-as-gap timeseries + richer example dashboard
The live dashboard's charts collapsed into solid blocks jammed against the right
edge, unlike the demo gallery's airy full-width braille. Two causes:

- prom.go QueryRange dropped NaN samples, and scaleToDots/resampleCols
  right-align when points < columns — so a sparse series (p95: ~60/90 buckets
  NaN) lost its time axis and got shoved right as a filled block. Now QueryRange
  keeps NaN positionally; the braille scalers render NaN as a gap (height 0) and
  ignore it in min/max; Series.Last() and TimeSeries.collect() skip NaN. Sparse
  ranges now render at their true timestamps with gaps, and stacked multi-series
  stay index-aligned. Regression tests in render + prom.

- examples/pilot.yaml was thin and used sparse query shapes. Rebuilt to mirror
  the demo: 24-col gridPos layout (4 stats / gauge + bar gauge / two charts),
  tokens-by-direction as a bar gauge, and always-defined cumulative/rate charts.

go test -race and golangci-lint clean; demo gallery unchanged.
2026-07-07 16:11:16 +02:00
Aleks Petrov 4cfb29e515 feat(datasource): Prometheus queries, YAML config, and query_range braille pipeline
Phase 2 + Phase 3 of the v0.1 MVP.

Phase 2 — instant queries + native config:
- internal/datasource: Datasource interface at the consumer boundary
  (QueryInstant/QueryRange) with Instant/Range request types.
- internal/datasource/prom: client_golang-backed impl; {{label}} legend
  expansion; NaN samples dropped.
- internal/config: canonical Dashboard/WidgetSpec model + strict YAML loader
  (KnownFields, validation, defaults).
- internal/app: BuildWidget spec→widget factory.
- cmd/grot run: --config/--prom/--theme/--watch; per-widget ctx timeout so one
  slow/failing query never breaks the grid.

Phase 3 — query_range + braille timeseries:
- internal/app/step: StepFor(range, chartWidth) — chartWidth×2 dots → step
  rounded up a clean ladder, 10s floor; sample count never exceeds the dot
  budget (table + invariant tests).
- cmd/grot run: layout planned once per tick so fetch (step sizing) and draw
  share widths; timeseries routed through QueryRange; --ascii block fallback.
- examples/pilot.yaml: p95 execution + stacked tokens-by-model timeseries.

Known gap: range NaN points are dropped rather than
kept as positional gaps, which collapses the time axis for sparse series and
would misalign stacked multi-series. To be addressed before stacked ships.
2026-07-07 15:09:48 +02:00