Watch
0
0
Fork
You've already forked hyperhive
0

docs/review-classifier: cost comes from OTEL labels, not the swarm UI

This commit is contained in:
atlas 2026-10-10 19:25:09 +02:00
commit 46e9966e17

View file

@ -213,9 +213,9 @@ Two pages in the [swarm UI](ui.md), `admins` only like the rest of it.
### Recent runs ### Recent runs
One card per run: the repo, the PR, how many classifications ran, and the One card per run: the repo, the PR, and how many classifications ran.
run's overall cost. Selecting a card expands it to show each Selecting a card expands it to show each classification's result, the same
classification's result, the same rows as the review table. rows as the review table.
### Try-out ### Try-out
@ -231,18 +231,16 @@ that branch, where you log in as usual and open the PR yourself.
## Observability and cost ## Observability and cost
Every run records its cost, which the recent-runs page shows. Where the cost The swarm UI shows no token counts, cache counts or cost, on any page. On the
comes from depends on the runtime: claude runtimes, every classifier run starts its `claude` process with
`OTEL_RESOURCE_ATTRIBUTES` naming the repo and the PR, so the cost reads from
the metrics store by repo and PR. On a subscription, cost is notional.
- An ACP agent reports a running cost total (`ReportedCost` in On the ACP runtime, the harness counts the agent's `usage_update` running
`hive-runtime/src/acp/stream.rs`); a session's last total is its cost. totals and exports them as `hyperhive.agent.cost.usage`, labelled with only
- The `claude` CLI reports token counts, including cache reads and writes. `model` and `currency`
The dashboard already estimates a cost from token counts with a price ([`observability.md`](../scheduler/observability.md#acp-reported-cost)). That
table (`modelPrices` in [`dashboard.md`](../web-ui/dashboard.md)). cost has no repo or PR label yet.
- On a subscription, cost is notional.
The cache token counts also show whether the shared context gets the cache
reuse it's meant to.
The classifier logs each run's result to its journal, which ships to The classifier logs each run's result to its journal, which ships to
VictoriaLogs like every swarm service container's VictoriaLogs like every swarm service container's
@ -280,9 +278,8 @@ These get settled, and filled in here, as the work reaches them:
account's forge token live, and which component holds the token. account's forge token live, and which component holds the token.
- **Model naming across runtimes.** How the swarm-level model setting - **Model naming across runtimes.** How the swarm-level model setting
handles runtime-specific model names. handles runtime-specific model names.
- **Cost method per runtime and telemetry labels.** The exact cost source - **ACP cost labels.** How an ACP run's cost gets a repo and PR label, so
per runtime, and the resource attributes that keep the classifier's spend it reads from the metrics store like the claude runtimes' cost.
separate from the agents' on the existing dashboards.
- **Async message medium.** Which queue subjects or streams carry the - **Async message medium.** Which queue subjects or streams carry the
messages between `swarm-controller` and the classifier. messages between `swarm-controller` and the classifier.
- **Reviewer handoff.** How a later reviewer, human or agent, learns the - **Reviewer handoff.** How a later reviewer, human or agent, learns the