Repository navigation
Show Plan usage across the Fleet in the CLI and Console - #2204
Merged
Merged
Conversation
thirdshift plan-usage and the Console's /plan-usage (with /api/v1/plan-usage) default to the Fleet once a machine is paired or saved, and take --fleet, --machine <name> and --local. Each Fleet machine is asked for its own view alone, saved for when it goes offline, and grouped into one row per subscription login by the identity its Harness reports (Claude organization and email, Codex account id, Muse label); agy and grok stay per machine. Clearing cooldowns becomes an act-scoped Console action, so the two interim parity exclusions go. The push after each Command, and plan-usage --push, send this machine's saved view under the report scope. Every Console header warns while a configured route is in cooldown or at its ceiling, linking to Plan usage. Closes #2182
…pers Plan usage takes the Fleet's saved views and pairing once per operation, so the default view, machine choices and the view shown agree; load takes a Reach instead of two Options that had to agree. Outgoing reports are a route and a body, Login.login is identity, the page reuses the CLI's empty-view text, and the tests reuse the Metrics report helpers.
A paired peer's refusal reason reached `thirdshift plan-usage` text output with its control characters intact, so a peer could set the terminal title, clear the screen or rewrite lines. Print it through the same report_line the cronjobs Fleet view uses; JSON keeps the text as sent.
# Conflicts: # src/plan_usage.rs
This was referenced Nov 14, 2026
Console /plan-usage, Fleet shared-login grouping, console report push, and header warning pill
#2182
Closed
Merged
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
thirdshift plan-usageand the Console's new Plan usage page show the Fleet by default once a machine is paired, saved or reported. The view groups shared subscription logins, and the Console header warns while a configured route is used up.plan-usageare gone. Each machine choice and--clearhas an API twin, and ADR 0026 records why this one read answers for the Fleet.Slot,Heldand the FleetStatusmove tosrc/console/fleet/snapshot.rs, which Fleet metrics now uses too.Evidence
Execution evidence
The same fixture (grok in cooldown on its routes) was run against both builds with
/tmp/ts2182-capture/evidence.sh <binary>.Before (
origin/issue-583build):After (this branch):
New tests:
cargo test --test console plan_usage::: 6 passed. It covers CLI/API parity, the header pill, clearing underactandread, Fleet grouping, offline fallback, a pushed NATted report, and the after-Command push.cargo test --bin thirdshift plan_usage::fleet console::plan_usage: 6 passed.node --test console/tests/plan-usage.test.cjs: 2 passed, at desktop and phone widths.Full Console browser suite:
npm test --prefix consolepassed 207/207.Site:
npm test --prefix sitepassed 69/69, andnpm run docs:check --prefix siteis clean.Format and lint:
cargo fmt --checkandcargo clippy --all-targetsare clean.Full Rust suite:
cargo test --no-fail-fastpassed 4559 and failed 6. This host has no C linker, so the suite ran in anode:22container with the host toolchain, and all 6 failures are container artifacts:could not fully sweep session …: could not read process …'s environment: Permission deniedand failed their no-warning assertions:architect_run(run 1),launch_pull,opencode_sessionsandrun_notification.architect_runpassed once ptrace was allowed.trial_scopeneeds systemd.session::execution_tests::partial_stdout…andactivity_log::an_activity_log_that_cannot_be_written…failed under load and pass alone.CI runs the suite natively.
Visual evidence
Console header, desktop 1440×900, with a route in cooldown and one at its ceiling:
Console header, mobile 390×844, same state:
Unaddressed findings
Standards
after_commandbuilds reports without report destinations. Declined; I ran the reviewer's test as written and it passes:cargo test --test console plan_usage::a_finished_command_without_report_destinations_builds_and_warns_nothing→... ok.src/console/report.rsafter_commandstill returns atif config.console.report.is_empty() { return; }before building any report.cachedinsrc/logs/metrics/fleet.rs). Plan usage keeps one view per machine.Slot,Held,Status) were extracted tosrc/console/fleet/snapshot.rs. A generic fallback over both payloads would mean reworking the Metrics model in this ticket.Spec
plan-usage --push [<destination>]is scope creep. Declined:src/console.rsassert_cli_parity: "{} has no paired CLI command"), and ADR 0026 makes every endpoint the twin of a CLI command./api/v1/plan-usage/report, andplan-usage --pushis its twin, asmetrics --pushis for/api/v1/metrics/report.Security
None unaddressed. The Security review found one introduced finding and fixed it in a2988d8:
thirdshift plan-usage --fleetprinted a paired peer's refusal reason to the terminal with its control characters intact. A peer could use this to set the terminal title, clear the screen or rewrite lines.cronjobs::report_line, the same treatment the cronjobs Fleet view uses. JSON keeps the text as the peer sent it.cargo test --test console plan_usage::a_fleet_peers_refusal_reaches_the_terminal_without_control_charactersfailed before the fix and passes after it.All other findings were fixed in bde9559:
Captureper operation;Reachinstead of two coupledOptions;Outgoingas a route and body;identityandpeer_viewrenames;Both reviewers read every changed file.
site/docs/index.htmlwas excluded as generated output fromdocs/guide.md;docs:checkpasses. No changed file was left unread.Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
New read, action and report endpoints, a header line and a nav entry. Nothing is migrated. Saved peer views live in a new
logs/fleet-plan-usage/directory.Blast Radius: moderate
plan-usage --jsonnow answers with the Fleet shape once a Fleet machine is paired or reported.--localkeeps the old one.metrics and Plan usage not reported./api/v1/plan-usagereads paired peers with this Console's saved Fleet tokens, for aread-scope view only. ADR 0026 records this.Closes #2182
Built with claude 2.1.322 · claude-opus-5-5 · high