Repository navigation
delivery + autonomy analytics: persist a reap.branch_pushed event row a… - #1215
Merged
Merged
Conversation
- reap: persist a reap.branch_pushed event row beside the lifecycle-bus emit
- events: EventsRepo.listEventsByKindsForRuns
- analytics: public delivery block (branchPushToPrOpenMs, prOpenToMergeMs,
dispatchToMergeMs, endToMergeMs) + outcomes.autonomy {merged, autonomous, rate}
(merged AND unsteered AND first attempt, via parent_run_id/retry_of)
- ui: telemetry-metrics populates AUTONOMY, ISSUE -> MERGE -> DISPATCH -> MERGE;
loop-tab buildStages reads the delivery block, 'PR open -> merge' relabel
- golden fixture for the public analytics envelope; projection/integration tests;
gen:docs + gen:openapi; seeds/mulch session bookkeeping
# Conflicts: # src/ui/src/pages/telemetry/telemetry-metrics.tsx
jayminwest
enabled auto-merge (squash)
September 3, 2026 21:00
warren-run-bot
added a commit
that referenced
this pull request
Sep 3, 2026
…s (warren-ea4e) The union of #1215 (warren-bc9c) and #1223 (warren-97ae) pushed two files past the 500-line check:size budget. Both are brought under by splitting, not by editing the ratchet: - src/server/handlers/runs/analytics.ts (521) -> 280: the REDACTED_*/ PUBLIC_* field allowlists, spectator types, RunAnalyticsBody/ RunAnalyticsTokensSection, and projectRunAnalytics move to src/server/handlers/runs/analytics.projection.ts. analytics.ts re-exports the whole projection surface, so existing import paths keep resolving (39-public-exposure.*, public-projections.test.ts). - src/runs/analytics/run-metrics.test.ts (510) -> 485: the cost economics tests (costUsd percentiles + null-cost averaging) move to src/runs/analytics/run-metrics.economics.test.ts. Also updates: - scripts/dups-allowlist.json: the RunAnalyticsTokensSection grandfather pair now points at analytics.projection.ts, where the interface lives after the split. - src/server/handlers/__golden__/responses/analytics-runs.json: golden was stale against the union (missing warren-bc9c delivery block and warren-97ae autonomy section); regenerated. - scripts/bundle-size-budgets.json: auto-raised (+874B raw js / +579B gzip js, within cap) via the authoritative --update path on bun 1.3.14 (.bun-version); the union's UI growth was tripping the bundle guard in this environment too. check:all: 12/12 gates passed. check-file-sizes --headroom 10 report (files at/within 10 lines of ceiling; union merges must watch these): - at ceiling (0 left): registry/schema.ts, runs/reap/{run,preview.test, pipeline,state.test}, runs/stream/bridge.ts, runtime/contract.ts, runtime/k8s/{pod-spec,log-stream}.test.ts, core/wire.ts, forge/github/provider.ts, ui/src/api/types.ts, server/main/index.ts, server/bridge-reconnect.ts, forge/github-app (499), k8s/provider.ts (2 left) - 1-10 left: runs/stream/stats.test.ts (3), runtime/k8s/log-stream.ts (3), runtime/k8s/pod-spec.ts (3), db/schema/sqlite.ts (3), runs/analytics/run-metrics.ts (4), handlers/runs.dispatch.test.ts (5), k8s/pod-watcher.test.ts (6), k8s/finalize-entrypoint.ts (6), k8s/agent-entrypoint.test.ts (6), runtime/local/engine.test.ts (7), k8s/provider.test.ts (7), acceptance 39-public-exposure.ts (7), warren-config/schema.ts (8), runs/retry/provider-retry.ts (10)
jayminwest
added a commit
that referenced
this pull request
Sep 3, 2026
…r … (#1222) * economics wire additions: cost percentiles, cap hits, cost-basis bucket (warren-ea4e) - /analytics/runs: totals.costUsd StatSummary (avg/median/p95 over priced rows via summarize()) and a top-level capHits count from budget.exceeded events via EventsRepo.listByKind — RUN_FAILURE_REASONS has no cost-cap member, so the event scan is the only signal. - /analytics/cost: byCostBasis buckets (api vs subscription_estimate vs unpriced; unpriced folds rows with null costUsd regardless of basis). - All three readOperator: 'costUsd' joins REDACTED_RUN_TOTALS_FIELDS, 'capHits' joins REDACTED_RUN_ANALYTICS_FIELDS; public-projections.test asserts the partition and the wire-level redaction. - Golden fixtures analytics-runs.json / analytics-cost.json pin both operator bodies (three seeded runs, two cap-hit events, one non- terminal unpriced run). - Economics tab renders Cost per run / Budget cap hits / Spend by cost basis panels with honest empty states; UI wire types optional on the spectator body. - Bundle: totals.raw.js re-baselined (measured + HEADROOM_RAW) per the warren-4e7a/warren-25b7 warren-run precedent; gzip floors untouched. * mulch: record hydration note * fix size-budget union break: split analytics projection and cost tests (warren-ea4e) The union of #1215 (warren-bc9c) and #1223 (warren-97ae) pushed two files past the 500-line check:size budget. Both are brought under by splitting, not by editing the ratchet: - src/server/handlers/runs/analytics.ts (521) -> 280: the REDACTED_*/ PUBLIC_* field allowlists, spectator types, RunAnalyticsBody/ RunAnalyticsTokensSection, and projectRunAnalytics move to src/server/handlers/runs/analytics.projection.ts. analytics.ts re-exports the whole projection surface, so existing import paths keep resolving (39-public-exposure.*, public-projections.test.ts). - src/runs/analytics/run-metrics.test.ts (510) -> 485: the cost economics tests (costUsd percentiles + null-cost averaging) move to src/runs/analytics/run-metrics.economics.test.ts. Also updates: - scripts/dups-allowlist.json: the RunAnalyticsTokensSection grandfather pair now points at analytics.projection.ts, where the interface lives after the split. - src/server/handlers/__golden__/responses/analytics-runs.json: golden was stale against the union (missing warren-bc9c delivery block and warren-97ae autonomy section); regenerated. - scripts/bundle-size-budgets.json: auto-raised (+874B raw js / +579B gzip js, within cap) via the authoritative --update path on bun 1.3.14 (.bun-version); the union's UI growth was tripping the bundle guard in this environment too. check:all: 12/12 gates passed. check-file-sizes --headroom 10 report (files at/within 10 lines of ceiling; union merges must watch these): - at ceiling (0 left): registry/schema.ts, runs/reap/{run,preview.test, pipeline,state.test}, runs/stream/bridge.ts, runtime/contract.ts, runtime/k8s/{pod-spec,log-stream}.test.ts, core/wire.ts, forge/github/provider.ts, ui/src/api/types.ts, server/main/index.ts, server/bridge-reconnect.ts, forge/github-app (499), k8s/provider.ts (2 left) - 1-10 left: runs/stream/stats.test.ts (3), runtime/k8s/log-stream.ts (3), runtime/k8s/pod-spec.ts (3), db/schema/sqlite.ts (3), runs/analytics/run-metrics.ts (4), handlers/runs.dispatch.test.ts (5), k8s/pod-watcher.test.ts (6), k8s/finalize-entrypoint.ts (6), k8s/agent-entrypoint.test.ts (6), runtime/local/engine.test.ts (7), k8s/provider.test.ts (7), acceptance 39-public-exposure.ts (7), warren-config/schema.ts (8), runs/retry/provider-retry.ts (10) * mulch: update expertise --------- Co-authored-by: warren <311177657+warren-run-bot@users.noreply.github.com> Co-authored-by: Jaymin West <jayminwest@gmail.com> Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
seeds: sync 2026-09-03
Agent notes
dispatchToMergeMs, endToMergeMs) + outcomes.autonomy {merged, autonomous, rate}
(merged AND unsteered AND first attempt, via parent_run_id/retry_of)
loop-tab buildStages reads the delivery block, 'PR open -> merge' relabel
gen:docs + gen:openapi; seeds/mulch session bookkeeping
Run
run_xkr8mcm5w32pSeeds
Commits (3)
Files changed
Prompt
Show prompt
🤖 Opened by warren run
run_xkr8mcm5w32p