Repository navigation
fix: usage dashboard fails on legacy global sessions - #129011
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Collaborator
Author
Land-ready verification
Known proof gap: no after-fix dashboard screenshot was captured because replacing the shared team Gateway with an unmerged branch would disrupt unrelated sessions. The original screenshot shows the symptom; the exact rejected handler path is covered by the failing-before/passing-after regression. The optional redacted dashboard-fixture rank-up is therefore skipped for this landing. |
Collaborator
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 26, 2026
Co-authored-by: roboclaw-bot <[email protected]>
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.
What Problem This Solves
Fixes an issue where users opening the Usage dashboard would see
AGENT_SELECTION_REQUIREDinstead of usage data when multiple agents use explicit ownership and the selected agent's store contains a legacyglobalsession row.Why This Change Was Made
The Usage Gateway handler already loads the explicitly selected agent's store, but its secondary row filter attempted to infer an ambient owner for
global. Explicit-ownership fleets have no ambient default, so that second inference rejected an already-owned row.The canonical owner-boundary repair retains the logical
globalrow inside the already agent-scoped store. Owner checks remain unchanged for every non-global key, including agent-prefixed rows from another agent.User Impact
The Usage dashboard loads normally for the selected agent on multi-agent installations that still have a legacy global session.
Evidence
AgentSelectionRequiredErroratfilterSessionStoreByAgent.pnpm test src/gateway/server-methods/usage.sessions-usage.test.ts src/gateway/server-methods/usage.test.ts src/gateway/server-methods/usage.sessions-usage-cache.test.ts src/gateway/server-methods/usage.cost-usage-cache.test.ts— 80 tests passed.pnpm check:changedpassed after rebasing onto the published head, including formatting, lint, core typecheck, and core-test typecheck.Live-proof gap
The original operator screenshot demonstrates the failing Usage surface. No after-fix screenshot was captured from the shared team Gateway because replacing that live service with an unmerged branch would disrupt unrelated sessions. The exact rejected Gateway handler path is instead covered by the failing-before/passing-after owner-boundary regression and exact-head hosted CI/Testbox remains mandatory for landing.