UI money pages: Cost & Budget + Compliance depth, tokens/budget/benchmark signals#219
Conversation
…caps in the client projection [wave:money] additive fields for #92/#215: per-run tokenTotals (input/output/total from persisted metrics), metricsSource (persisted | events | none — mirrors resolveRunTotals incl. the metrics_write_failed drift downgrade), and loopBudgetUsd resolved from the project's .rstack/budget.json — the same file evaluateLoopBudget enforces, so the dashboard never shows a cap the loop wouldn't actually stop on. Snapshot-level loopBudgets lists the armed caps per source root. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The REST path sent raw buildFullState output while the WebSocket path sent toClientState(state) — so REST-served clients (first paint + WS-down fallback) missed every projection-only field (evidenceRecent, stageCost / stageTokens, and the new tokenTotals / metricsSource / loopBudgets) and hauled full event/evidence streams over the wire. Both transports now send the same projection; the ETag hashes the projection so 304s stay reachable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, stage money fills Append-only block: budget consumption track/fill with ok/near/over states, SEQ-vs-PAR benchmark bar colors, amber per-stage money fill, bench badge row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…arallel benchmark panel #215 slices: cumulative tokens (1.73M-style compact, in/out breakdown) as a headline KPI next to cost with a provenance pill (persisted metrics vs event recompute); a Cost & Tokens by Stage panel from the #135 stage maps; and artifacts/parallel-benchmark.json rendered as SEQ-vs-PAR bars with the improvement % against the 40% evidence gate and an honest mock-vs-real badge — a modelled measurement never looks like a live one. Benchmark fetches are cached (misses re-checked after 60s); absent telemetry renders an explanatory empty state, never a fabricated $0.00. Panels attach client-side so the shared page shell stays untouched by the parallel wave. Part of #215 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… consumption vs the loop cap Replaces the stub (#92 + #215 budget slice): actual tracked spend + token totals with per-run provenance counts, a Budget Consumption governance panel (run_budget_usd cap vs actual with ok/near/over progress bars — the copy states the goal loop enforces this cap in code before every iteration), cost-per-run table with data-source pills and honest dashes, spend-by-stage bars across the scope, and the Business Flex planned budgets kept as the planned-vs-actual reference. No telemetry = an explanatory empty state, never $0.00 pretending to be real. Closes #92 (Cost & Budget half) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…_report.json #92 compliance half: overall score, gap severity chips, release gate, and per-framework rows (pass/partial/gap counts, status) from the stage-13 artifact, plus a severity-first controls list with gap descriptions and remediation actions. Normalizes both report shapes in the wild (the agent contract's framework_scores/compliance_requirements and the compact controls/overall_score form); truncated or unparseable artifacts are said so, not pretended parsed. Probes the cached run-report endpoint directly because index-served runs arrive with an empty stageReports list. Honest empty state explains the optional stage and why adoption skips it. Closes #92 (Compliance half) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…provenance, budget caps 26 tests: client-state provenance (persisted / drift-downgraded / none) and budget-cap wiring against real tmp-dir budget.json files; Run Analytics KPI/stage-money/benchmark builders on the July fixture numbers ($4.87, 1.73M tokens, 3 stages, mock badge, 60% vs 40% gate); Cost & Budget summary/governance/table builders incl. the no-$0.00 rule and over/near/ under cap states; compliance model normalization for both report shapes, severity-first controls, the index-served probe path, and the honest empty states — all via the sandboxed-bundle + fake-DOM pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # src/observability/dashboard/ui/styles.js
Closes #92
Part of #215 (tokens + per-stage cost, run_budget_usd consumption, parallel benchmark slices)
What ships
Run Analytics (
ui/pages/run-analytics.js)1.73M,1.42M in / 312k outbreakdown) beside Cost, which now carries a provenance pill:persisted metricsvsrecomputed from eventsstage_cost_usd/stage_tokensmaps (P0: Cumulative token + cost metrics persisted in metrics.json #83/[BLE-6.1] Populate cost/context fields from builder contracts #135)artifacts/parallel-benchmark.json(Parallel-execution benchmark harness for data-independent stages #159): SEQ-vs-PAR bars, improvement % against the 40% evidence gate, and an honest modelled — mock workload / measured — real stages badge from the artifact'smode— a mock result can never masquerade as a live measurement. Fetches cached per run; misses re-checked after 60s.Cost & Budget (
ui/pages/cost-budget.js) — stub replacedrun_budget_usdcap vs actual with ok / near / over progress bars. This is a governance surface and the panel copy says so: "run_budget_usd is enforced in code, not by prompt text: the goal loop checks actual spend against this cap before every iteration and stops the run when it is reached." No cap configured → empty state explaining how to arm the brake via.rstack/budget.json$0.00Compliance (
ui/pages/compliance.js) — scorecard per #92compliance_report.jsonframework_scores/compliance_requirementsand the compactcontrols/overall_scoreform); truncated/unparseable artifacts are said so/api/run-reportendpoint directly because index-served (cold) runs arrive with an emptystageReportslistState layer (
state/client-state.js, sole-owned; additive)tokenTotals,metricsSource(persisted | events | none, mirroringresolveRunTotalsincl. themetrics_write_faileddrift downgrade),loopBudgetUsdper run + snapshotloopBudgets— read from the exact.rstack/budget.jsonthatevaluateLoopBudgetenforces, so the UI never shows a cap the loop wouldn't stop onServer alignment (one focused fix in
server.js,[wave:money]-tagged)/api/statenow sends the sametoClientStateprojection as the WebSocket path. It previously leaked the raw state, so REST-served clients (first paint + WS-down fallback) were missing every projection-only field — including the pre-existingevidenceRecentthe drawer already reads and thestageCost/stageTokensUI: surface the July harness signals — checkpoints, context pressure, goal loop, approval audit, tokens, benchmark #215 calls "already in the client payload" — while hauling full event/evidence streams over the wire. ETag hashes the projection so 304s stay reachable.Verification (fixture run
2026-07-06T12-00-00-000Z-ui-fixture-july-signals)Hub run from the worktree (
node bin/rstack-business.js --port 3923), verified in a real browser via preview + DOM inspection:$4.8700cost withPERSISTED METRICSpill,1.73Mtokens,1.42M in / 312k out06-architecture $1.12 · 451k tok,07-code $2.65 · 888k tok,08-testing $1.10 · 393k tokMODELLED — MOCK WORKLOAD,60% FASTER — CLEARS THE 40% GATE, Sequential 2s vs Parallel 900ms, stage-group chips, measurement note verbatim$4.87 actual tracked spend,1.73M tokens,1/3 runs reporting cost, and with a local.rstack/budget.jsoncap of $10:$4.87 of $10.00 — 49% of cap used — $5.13 headroom(green bar); runs without telemetry show—+NO TELEMETRY, never $0.00compliance_report.json:40%overall,1 critical / 1 high / 1 mediumgap chips, release gateblocked — 1 CRITICAL gap (HIPAA-02)…, HIPAA1 pass · 1 partial · 1 gap of 3 controls, severity-first controls with Gap/Fix linesGates
npm test(681 pass, incl. new 26-testtests/dashboard-money-pages.test.jsand the #216 bundle-compile test),npm run lint,npm run validate(196 agents),node scripts/security-audit.mjs,git diff --check— all green.🤖 Generated with Claude Code