feat(usage): read connected hub usage scoped to the enrolled client key - #4373
feat(usage): read connected hub usage scoped to the enrolled client key#4373lidge-jun wants to merge 5 commits into
Conversation
Expose a bounded GET /v1/usage projection for explicitly authenticated configured keys, reusing filtered aggregation and its incomplete-history metadata. Connected CLI reads the hub data plane with token/connection ownership checks, never local fallback or management credentials. Local tests NOT RUN; hosted CI follows.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 52 / 80이 PR은 connected 클라이언트의 서버 테스트가 CLI·client·server·attribution 쪽으로 꽤 있습니다. 설계상 “계정 합계를 클라이언트에 새지 않는다”는 점이 분명합니다. 다만 stacked base라서 지금 현재 경로 경로 range 파싱 - 쿼리에서 스택 - 부모 #4357이 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
Connected
ocx usagereads the hub data plane using the enrolled client key, instead of calling a missing local management endpoint. The hub returns only that authenticated key's numeric totals and provider/model/day rows; account attribution, raw entries and other clients' records are excluded.The bounded response retains range/surface/provider/model/custom-window options and explicit incomplete-history metadata. Invalid connections, changed token ownership, unsupported hubs and read failures are reported without local fallback. Addresses #4205.
Manual chain: #4357 (readable totals) → this PR (client-scoped read). Base is
codex/260912-60plus-operations-totals; this layer uses its aggregate metadata contract. No native stack is registered. Merge decisions belong to the parent coordination task.Verification
git diff --check: passed. Independent design and implementation-entry audits passed; independent security/source implementation review passed at3565b90 and the two-test follow-up bf369d9.Checklist