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