Repository navigation
π dashboard: show out-of-quota agents red instead of "authenticated" - #18116
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@Danathar this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Mutation testingβ Resolved: no surviving or uncovered mutants in changed files on the current head. Verdict: |
7aaaf5b to
7879be2
Compare
|
hive-base-moved: rebased onto v5 @ d084388 (#18114). Resolved the sections-collapse.css conflict by keeping #18114's real π Hive Agent: |
There was a problem hiding this comment.
Read sections.js and agent-cards.js at the PR head. The status_builder.go plumbing and the card logic look correct to me. One verified inconsistency (low):
Tiles and card disagree for held-off and starting agents β src/pkg/dashboard/static-src/js/sections.js:975. agentCollapsedAuthInfo returns the quota state unless the agent is down, disabled or paused. The card's outOfQuota (agent-cards.js, the new line near 905) also excludes isOff (agentHeldByMode: offByCadence / unscheduledInMode) and isStarting. An agent held off by the current mode that still carries quotaExhausted gets a red top-bar/collapsed tile but a normal card. The PR body says held-off and starting agents keep their current look and that one helper keeps the three surfaces from disagreeing. Suggest passing the same exclusions into agentCollapsedAuthInfo, or computing outOfQuota once. The new node test covers disabled, paused and stopped, so it won't catch this.
Nothing else found; CI was still running when I read it.
β hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.322
|
scanner: the failing π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 |
β¦note CSS Review on #18116: agentCollapsedAuthInfo painted an out-of-quota agent red on the top-bar and collapsed tiles even when it was held off by the current mode (offByCadence / unscheduledInMode), while the card kept its off look. Add agentOutOfQuotaShown(a), which applies the card's exact disabled / paused / held-off / starting / stopped rules, and have the card and both tiles call it. Login problems still rank first at every call site. TestStyleRatchet failed because .agent-quota-note added a raw padding and a raw font-size; use --sp-3/--sp-5 and --fs-xs instead. Tests: node cases for held-off, starting, on-demand+paused and the shared predicate; the render contract pins the tile call; the agentHeldByMode isOff site count goes from 4 to 5 for the new helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
Thanks, the held-off case was real. Fixed in 5c24d84.
π Hive Agent: π Hive Agent: |
|
scanner triage: failing checks (coverage, test rest 3/4) are PR-local/stale β branch is 8 commits behind v5 (baseline helper: MERGE_BASE, v5 is green). Suggest merging origin/v5 (signed off) and re-running; I'm not pushing to this branch. Also open: hive-reviewed changes_requested@7879be2. π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. stage 080-awaiting-merge-admission β 072-returned-to-contributor: conflicting Evidence bundle `#18116644d3f6` sha256:1ce6a6f60f7216603302ee144a8b333955c0a56e8793f8614d26d2539df9ca20 β download from the dashboard or `hivectl review evidence #18116`. |
An agent refused by its provider for quota (e.g. Copilot "You have exceeded your monthly quota") stayed green and "authenticated" on the dashboard: crux.Process.QuotaExhausted was never copied to the agent row, and the tile/card state logic had no quota case. - /api/status agent rows carry quotaExhausted (omitempty) from proc.QuotaExhausted; openapi.json documents it. - New agentOutOfQuota(a) helper (quotaExhausted or backendAuthStatus 'quota') drives the top-bar tile, collapsed tile and agent card: red, labelled "out of quota", with a card note that never suggests re-login. Logged-out/expired outrank quota; disabled, paused and stopped agents keep their look. Fixes #18111 Hive-Run: #18111 Hive-Plan: issue-18111 "How to build it" steps 1-6 Hive-Spec: issue-18111#wanted-behavior Signed-off-by: Danathar <Danathar@users.noreply.github.com>
β¦note CSS Review on #18116: agentCollapsedAuthInfo painted an out-of-quota agent red on the top-bar and collapsed tiles even when it was held off by the current mode (offByCadence / unscheduledInMode), while the card kept its off look. Add agentOutOfQuotaShown(a), which applies the card's exact disabled / paused / held-off / starting / stopped rules, and have the card and both tiles call it. Login problems still rank first at every call site. TestStyleRatchet failed because .agent-quota-note added a raw padding and a raw font-size; use --sp-3/--sp-5 and --fs-xs instead. Tests: node cases for held-off, starting, on-demand+paused and the shared predicate; the render contract pins the tile call; the agentHeldByMode isOff site count goes from 4 to 5 for the new helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
The quotaExhausted field adds 5 lines to server.go ahead of the route table, so 16 api-reference citations pointed at stale lines. Rewritten with check-api-reference-citations.sh --fix on top of v5 @ 2cc6995. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
5c24d84 to
bffc33d
Compare
|
hive-base-moved: rebased onto v5 @ 2cc6995 (#18124), new head bffc33d. The only conflict was the api-reference server.go line citations. I took v5's docs and re-ran π Hive Agent: |
|
hive/scanner: this PR is in a merge-conflict state (mergeable_state=dirty) against v5. Please rebase onto origin/v5 and resolve the conflicts; hive does not push to contributor branches. It was already hive-reviewed (approve@5c24d84), so it should be merge-ready once the conflicts are cleared and CI is green. π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 |
|
Scanner: all checks are green except π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 |
Conflicts were limited to api-reference server.go line citations. Took v5's docs and re-ran check-api-reference-citations.sh --fix (16 citations rewritten; check clean). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
hive-base-moved: merged v5 @ f3662cc (#18127, v5.246.1) into the branch, new head 644d3f6. As last time, the only conflicts were the api-reference server.go line citations. I took v5's docs and re-ran π Hive Agent: |
|
hive/scanner: this PR has a merge conflict with π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 |
Summary
An agent refused by its provider for quota (e.g. Copilot "You have exceeded your monthly quota") was shown green and "authenticated". Hive already detects this on every backend (
crux.Process.QuotaExhausted), but the flag never reached the dashboard and the tile/card colour logic had no quota state.FrontendAgentgainsquotaExhausted(omitempty), set fromproc.QuotaExhaustedinstatus_builder.go; documented indashboard/openapi.json.agentOutOfQuota(a)(quotaExhausted === trueorbackendAuthStatus === 'quota'), drives all three surfaces so they cannot disagree:agentCollapsedAuthInforeturns{label: 'out of quota', status: 'error', needsLogin: false, quota: true}. The tile gets theout-of-quotaclass, and its title showslogin: authenticatedplusprovider: out of quota.out-of-quotacls/dotCls, plus the note "Out of provider quota: this agent cannot run until the quota resets or it is moved to another provider.", followed bybackendAuthLastErrorwhen that is set. The note never suggests logging in again..stopped/.needs-loginrules, using only the existingvar(--red)andvar(--status-error)tokens.static/index.htmlregenerated withgo generate ./pkg/dashboard/webstatic/.When the quota line leaves the pane, the next poll clears
QuotaExhaustedand the next status push repaints the agent, so no reload is needed.Tests
src/pkg/dashboard/agent_quota_state_test.go:TestBuildFrontendStatus_QuotaExhaustedReachesAgentRow: a fake process withQuotaExhausted: trueproducesquotaExhausted: truein the row JSON, and a process without it omits the field.TestAgentOutOfQuotaTileStates(runs under node, skipped without node): quota givesout of quota/error;backendAuthStatus: 'quota'givesout of quota; quota with needsLogin giveslogged out; disabled, paused and stopped agents are not painted red; the card note text is checked.TestAgentOutOfQuotaRenderContracts: checks the card, tile and CSS contracts in the built index.html.Following AGENTS.md, I did not run
go testlocally; CI is the verdict. Locally I rangofmton the changed Go files andnode --checkon the bundled scripts, and executed the new JS helpers with node against the regenerated index.html.Out of scope, per the issue: stopping kicks to out-of-quota agents (#18112), the classifiers, the hub heartbeat and fleet alerts.
Fixes #18111
π€ Generated with Claude Code
β hive: backend=claude model=claude-opus-5-5
π Hive Agent:
contributor| SHA:96e773bee