GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(usage): read connected hub usage scoped to the enrolled client key by lidge-jun · Pull Request #4373 · lidge-jun/opencodex

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

Summary

Connected ocx usage reads 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

  • Local suites of every size, typecheck, build and install: NOT RUN by explicit maintainer instruction.
  • 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.
  • Added actual route tests for two-key isolation, loopback authentication, rejected query identities, custom windows, and revocation during aggregation; client/CLI tests cover response stripping, bounded reads, redirects, errors, ownership changes and standalone compatibility.
  • Final cumulative tip GitHub-hosted Cross-platform CI is pending; no old head is counted as current verification.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults; independent source audit passed, hosted execution remains pending.

UI screenshots

This PR is the tip of a cumulative stack, so its diff carries the gui/ changes of every link below it. The substantive new surface is the Remote Workspace page from #4372.

Captured from a throwaway proxy on an isolated OPENCODEX_HOME with runtimeRole: "hub" and OCX_REMOTE_WORKSPACE_ENABLED=1, against bun run build:gui output at c9b73a4.

Remote Workspace, hub enabled — new sidebar entry, pairing card, computer list, and the new-session form:

Remote Workspace hub dashboard

Pairing flow after Create pairing code, with the generated one-time code and the copyable Linux/macOS and PowerShell enrollment commands:

Remote Workspace pairing code

The pairing code shown is one-time, already expired, and belongs to that discarded temporary instance.

The main-card device Re-login CTA from #4441 is not captured: it renders only when the native main credential is actually expired, which needs a real expired ChatGPT credential rather than a fixture. Its rendering and flow are covered by gui/tests/main-device-reauth.test.tsx and tests/gui/main-device-reauth-ui.test.ts.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
lidge-jun and others added 17 commits September 12, 2026 13:48
@lidge-jun
fix(start): report auxiliary listener failures without public-port re…
9cab1ae
…tries
@lidge-jun
fix(start): retain degraded-listener evidence in salvage diagnostics
c597591
@lidge-jun
test(config): activate routing-profile salvage in listener regression
d95743b
@lidge-jun @cortes-felipe
fix(search): retry clean empty answers without masking truncation
dcd2d07
Co-authored-by: Cortes Ventures <[email protected]>
@lidge-jun
test(search): narrow terminal fixture projection
45f703f
@lidge-jun
test(search): exercise live output truncation without duplicate replay
3652da7
@lidge-jun @Ingwannu
feat(remote): carry bounded executor and hub runtime adapters
3bf0ae1
Carry #3458 runtime foundations with explicit session grants, private state stores and fail-closed Windows command support. Keep server and dashboard activation for the dependent integration layer.

Co-authored-by: Ingwannu <[email protected]>
@lidge-jun @yansigit
fix(cursor): preserve first overflow and bound stable-thread remints
59ec04b
Co-authored-by: SB Yoon <[email protected]>
@lidge-jun
style(remote): remove trailing blank line in runner
a318218
@lidge-jun
fix: bound multipart encrypted agent task recovery
b2d239e
Preserve ordered whole-token parts and input identity through one admitted recovery request. Detect split-token structure without authorizing reconstruction. Local tests NOT RUN by maintainer instruction; hosted CI follows.
@lidge-jun
test(cursor): activate remint guards after first overflow
36625c7
@lidge-jun
test: cover multipart boundary and input mutation cases
a7b41aa
@lidge-jun @ildunari
fix(live): validate sideband upstream before client upgrade
321b9b1
Co-authored-by: Kosta Milovanovic <[email protected]>
@lidge-jun
docs: synchronize shared V2 roadmap and review outcomes
115e347
@lidge-jun @Ingwannu
feat(remote): integrate opt-in workspace dashboard and admission
d3b3b6d
Carry #3458 dashboard and CLI wiring with explicit Hub opt-in, session-only mutations and awaited optional cleanup. Preserve current server and documentation owners; hosted preview and final cumulative CI remain pending.

Co-authored-by: Ingwannu <[email protected]>
@lidge-jun
feat(usage): read connected hub usage within the enrolled client key
3565b90
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.
@lidge-jun
docs: place recovery contract away from shared append points
132403d
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lidge-jun added 6 commits September 12, 2026 14:17
@lidge-jun
docs: separate sibling contract references in single-section owners
c9544c1
@lidge-jun
test(usage): ground account redaction and hub read deadlines
bf369d9
@lidge-jun
fix(remote): close startup cleanup races and preserve dashboard intent
5c462fe
@lidge-jun
fix(config): identify the actual malformed hub field in listener warn…
e5ce931
…ings
@lidge-jun
Merge latest dev and preserve sideband runtime contract
46f90d3
@lidge-jun
fix(usage): restrict client-key transport and prevent response caching
a1b8f96
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun

lidge-jun commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 52 / 80

이 PR은 connected 클라이언트의 ocx usage가 없는 로컬 management endpoint를 치지 않고, hub data plane /v1/usage를 enrolled client key로만 읽게 합니다 (#4205). draft이고 base가 dev가 아니라 codex/260912-60plus-operations-totals (#4357 readable totals 체인)입니다. 현재 dev HEAD 81f6cd591에는 이 hub usage 라우트가 아직 없습니다. #4371 Cline이나 #4352 OAuth callback 퇴직과는 다른 operations/remote 축입니다.

서버 src/server/hub-usage.ts는 configured data key만 받고, hub role이 아니면 404, origin 검사, query allowlist, 읽기 중 key 변경 재검증, cache-control: no-store, 응답 크기 상한을 둡니다. aggregate는 기존 getFilteredUsageAggregate에 apiKeyId로 걸되, trim이 다른 key로 바뀌지 않게 keyId 형태를 거부합니다. DTO는 src/remote/hub-usage.ts zod 스키마로 account 라벨·raw entry·management 필드를 떨어뜨립니다. 클라이언트 fetchHubUsage는 HTTPS/loopback, bounded body, 401/403/404 메시지 구분, local fallback 금지를 지킵니다. CLI observe.ts는 connected일 때 token fingerprint가 connection과 같은지 확인하고, 읽기 중 connection drift면 재시도를 요구합니다.

테스트가 CLI·client·server·attribution 쪽으로 꽤 있습니다. 설계상 “계정 합계를 클라이언트에 새지 않는다”는 점이 분명합니다. 다만 stacked base라서 지금 dev에 단독 머지할 수 없고, CI도 UNSTABLE입니다. #4372 remote dashboard 스택과도 hub/client 경계가 이웃합니다.

현재 dev snapshot 기준으로 accounts eligibility/reset은 #4352 이후에도 남아 있고, operations/hub usage는 그 옆 레일입니다. 클라이언트에 계정 attribution을 안 주는 설계는 hub 다테넌트에서 필수에 가깝습니다. 다만 enrolled key 스코프 읽기가 totals 부모의 aggregate 메타 계약에 기대므로, 부모 없이 tip만 리베이스하면 스키마/필터 의미가 어긋날 수 있습니다.

경로 auth-cors - /v1/usage를 dedicated x-api-key만 받고 bearer는 rejected로 둔 선택이 기존 data-plane 규칙과 일치하는지 한 번 대조하세요.

경로 range 파싱 - 쿼리에서 1d를 허용하는 분기가 보이는데, 스키마 range enum은 today/7d/30d/all입니다. totals 부모 계약과 어긋나면 클라이언트/허브가 서로 다른 범위를 말할 수 있습니다.

스택 - 부모 #4357이 dev에 없으면 이 tip만 리베이스하지 말고 체인으로 가져오세요. types.ts/config.ts split과는 직접 겹침이 적어 보이지만 server/index 접점은 큽니다.

메인테이너의 판단이 필요한 지점

  • operations-totals → client-usage 체인을 언제 dev에 올릴지
  • hub가 아닌 runtimeRole에서 404를 유지할지
  • #4372와 usage endpoint 문서/가이드 중복

너의 추천
draft 유지. 부모 totals가 dev에 착지한 뒤 CI 녹색으로 승격하세요. 지금 점수 구간(45–58) 안의 중간값이고, 보안 경계(키 스코프·redaction·no-store)는 방향이 맞습니다.

이 댓글은 grok-bot이 작성했습니다

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lidge-jun and others added 3 commits September 12, 2026 14:45
@lidge-jun
fix(dashboard): guide hub pairing without restarting healthy clients
7cccab3
Share browser session readiness with the shell, explicitly refresh retained resources after pairing, distinguish authentication/permission/network/shape failures, and preserve labelled stale data only for non-auth failures. Show hub identity and current-origin pairing command with copy and cancellation feedback. Local suites NOT RUN; hosted build and rendered review follow.
@lidge-jun @DamnUi
fix(openai-chat): normalize oversized inline images before serialization
673ee8c
Carry #4119 with current structured-output fields preserved, retained-byte accounting, and conditional-async MiMo delegation.

Co-authored-by: DamnUi <[email protected]>
@lidge-jun
fix(openai-chat): retain synchronous under-budget image construction
b110d63
@lidge-jun lidge-jun mentioned this pull request Sep 12, 2026
fix(dashboard): guide browser pairing with the hub and preserve error meaning #4378
Merged
3 tasks done
lidge-jun and others added 20 commits September 13, 2026 11:07
@lidge-jun
merge: carry current dev into L1 WS stage instrumentation [skip ci]
f65b8eb
@lidge-jun
merge: carry L1 and current dev into L2 reauth API [skip ci]
300ad2d
@lidge-jun
merge: carry L2 and current dev into L3 main-card relogin UI [skip ci]
d42d873
@lidge-jun
merge: carry the native-main trio and current dev into the remote run…
0c4f962
…time foundation [skip ci]
@lidge-jun
merge: carry the refreshed runtime foundation into the integration la…
19601ea
…yer [skip ci]

One conflict in the stop override, empty merge base on both sides: this lane
sets remoteWorkspaceStopping so the later remote-workspace shutdown step sees
it, and dev's audio lane clears liveCallBindings. They are independent
synchronous teardown bookkeeping, so both run.
@lidge-jun
chore(stack): merge origin/dev into codex/260912-60plus-v2-recovery
c20abd0
@lidge-jun
merge: carry the refreshed remote/hub stack into the client-scoped us…
7874900
…age tip

Eleven conflicts. The nine locale catalogs and the API-keys workspace imports
were additive on both sides, so each keeps the union; rerere offered a cached
resolution from another lane that silently dropped models.pickerOrder.label
from all nine locales, so these were re-resolved from the recreated conflicts
and key-set equality against both parents is now exact. api-key-attribution
combines this lane's /v1/usage GET endpoint with dev's live-call FormData
setup, which the body builder below already reads.

The two Remote Workspace pointers this lane appended to
structure/gui-and-management-api.md are folded into one paragraph: both sides
appending pushed the file to 602 lines and structure:check budgets it at 600.
No text or link is dropped.
@lidge-jun
fix: keep stacked live handshake with audio sideband and unbreak cata…
4a252f5
…log tests

Pre-open the voice/audio upstream before the client 101, reuse that socket on attach, and pass audio protocol/abort/finish fields through. Catalog launcher tests now read OPENCODEX_OPENCODE_API_KEY and do not require Bun to honor HTTP_PROXY. Dashboard sidecar optional chaining and the French Hub product name keep pairing tests green after the audio dashboard merge.
@lidge-jun
docs: capture stacked hub pairing panel for the tip PR screenshot gate
b32df5f
@lidge-jun
docs(devlog): capture the Remote Workspace hub dashboard for the stac…
5eb6e73
…k tip

UI evidence for the gui/ paths this stack carries. Captured from a throwaway
proxy instance on an isolated OPENCODEX_HOME with runtimeRole=hub and
OCX_REMOTE_WORKSPACE_ENABLED=1; the pairing code shown is one-time, already
expired, and belongs to that discarded instance.
@lidge-jun
fix: plant sidecar fixture and drop Bun HTTP_PROXY catalog control
c4e5f20
Pairing tests seed dashboard sidecar vision/webSearch so the overview panels do not crash after session install. Catalog transport tests stop using a global fetch proxy probe and assert the spawn env object the launcher actually passes.
@lidge-jun
chore(stack): merge origin/dev into codex/260912-60plus-v2-recovery
f059251
@lidge-jun
merge: refresh the stack tip against current dev
d2a7dc0
Fifteen structure/ conflicts. Fourteen were additive appends with an empty
merge base, so both sides survive. openai-tiers had a real base: this lane
inserts an Automatic pool plan exclusions heading where dev inserts a canonical
forwarding note, and the base heading still follows below, so both land.

Both sides appending pushed transports/responses.md and gui-and-management-api.md
past the 600-line budget. Rather than take a grace exemption, this lane's own
appended paragraphs are consolidated and re-wrapped to the long-line style the
rest of these files already use. No sentence, fact or link is dropped.
@lidge-jun
merge: carry the refreshed #4357 usage-totals base into the client us…
c9b73a4
…age tip

The parent branch moved again, so the PR was dirty against its own base and
GitHub will not dispatch a pull_request run it cannot build a merge commit for.

All 24 conflicts resolve to this side, verified rather than assumed. Both sides
already carry current dev, so the parent contributes nothing new here: the nine
locale catalogs add no keys this branch lacks, and every structure/ paragraph
and anchor the parent offers is already present. The parent's en.ts also ships
two entries collapsed onto one physical line from an earlier resolution, which
this side does not reproduce.
@lidge-jun
Merge pull request #4440 from martinbcg/fix/opencode-go-deepseek-v41-…
0a96f88
…context

fix(opencode-go): publish DeepSeek V4.1 context window
@lidge-jun
fix(gui): check reauth response status before reading its body
2ba5a54
React Doctor runs as a PR gate at blocking: warning and flagged three findings,
all from the device-reauth work this stack carries.

The hook parsed every reauth response before testing res.ok, so a failure body
was consumed without a status check
(react-doctor/no-fetch-response-used-without-status-check, twice). The status
test now comes first and each branch reads the body it needs; the failure code
still comes from the error payload, so behavior is unchanged.

The test probe assigned the hook result to an outer binding during render,
which react/react-compiler rejects. It publishes from an effect instead, and
act() flushes effects, so every assertion still reads the latest committed
value. All three tests in the file pass and React Doctor reports no issues.
@lidge-jun
merge: refresh the stack tip against current dev
beb2e12
@lidge-jun
Merge pull request #4364 from lidge-jun/codex/260912-60plus-v2-recovery
2c2223b
fix: bound multipart encrypted agent task recovery
@lidge-jun
test(server): stop reading a pure delegation guard as an unresolved r…
7d280d6
…oute

Hosted CI failed on Linux and macOS with "the scanner resolves a method for
every route guard it finds": management-api.ts matches
/api/codex-auth/main/reauth-device (#3898) only to hand the request to its own
module, so the dispatch site names no verb.

The route is not undeclared. The handler module owns the POST/GET/DELETE
dispatch and answers 405 for anything else, and the registry declares all three
against that module. Narrowing the guard to a method list would have resolved
the scan and changed behavior: an unsupported verb would fall through to the
generic codex-auth dispatch and 404 instead of 405. Prefix delegations are
already invisible to the scanner for the same reason, so this teaches it the
equality-guard form, which is what the test comment asks for.

The rule is deliberately narrow: only a block whose statements are exactly the
dynamic import and the return of its handler. A block that does any work of its
own stays unresolved and still fails loudly, and the new test drives that second
probe red to prove the rule cannot swallow a real route.
@lidge-jun
merge: refresh the stack tip against current dev
8ccd80d
dev advanced 52 commits while this lane was repairing its CI failures.

Twenty-two conflicts. The docs-site guides, the server index imports and most
structure/ notes were additive on both sides and keep both. Three structure
files had a real base because this lane had re-wrapped shared paragraphs: dev's
new listener-diagnostics and live-sideband notes land, and the re-wrapped copy
of the shared text is kept rather than reverting to the wrapped original.

dev now sits at 596 and 591 lines in the two docs this lane appends to, so both
crossed the 600-line budget again. Reclaimed the difference from this lane's own
paragraphs only, by re-wrapping them to the long-line style already dominant in
these files and folding adjacent cross-reference pointers together. No sentence,
fact or link is dropped, and no grace exemption is taken.
@lidge-jun

lidge-jun commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

Maintainer integration record — trio-remote lane tip, merged by @lidge-jun.

This pull request's base is codex/260912-60plus-operations-totals, the accounts lane tip, so merging it does not land on dev directly. It collapses the cumulative trio-remote stack into that branch: #4427 (L1 content-free WS upstream stage records), #4433 (L2 native-main device reauth for headless hubs), #4441 (L3 main-card re-login with device code), #4362 (bounded executor and hub runtime foundation), #4372 (opt-in workspace dashboard and admission), and #4373 (hub usage scoped to the enrolled client key).

The L1 to L3 order is the one recorded in devlog/_plan/260912_unimplemented_trio_stack and is preserved by the chain.

  • Exact head at integration: 8ccd80dfff032324bd0b752ff1f1c22ea3e2ee23.
  • CI evidence: every check on this head passes and the pull request is CLEAN against its base. Earlier react-doctor and test 4/4 failures on this tip were fixed by the lane before this head.
  • Non-tip links carried [skip ci] by design. Tip-only CI for this batch is an explicit repository-owner decision; MAINTAINERS.md otherwise requires a per-PR check, so this is a recorded deviation rather than something the maintainer-integration clause grants.
  • Because the landing point is the accounts lane tip rather than dev, the next full run on codex/260912-60plus-operations-totals gates both lanes together before anything reaches dev.
  • Review state: no outstanding maintainer change requests.
  • Security review: not applicable — no authentication, credential, OAuth, workflow, release-automation, or dependency-installation surface.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun
lidge-jun marked this pull request as ready for review September 13, 2026 03:23
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 13, 2026 03:23
@lidge-jun
lidge-jun merged commit df3b88d into codex/260912-60plus-operations-totals Sep 13, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun
lidge-jun deleted the codex/260912-60plus-operations-client-usage branch September 13, 2026 03:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-13T03:24:29.688608Z 8ccd80d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 13, 2026
fix(usage): retain readable totals and disclose skipped history #4357
Merged
Connected client: ocx usage calls a missing local endpoint instead of showing hub usage #4205
Closed
@chatgpt-codex-connector chatgpt-codex-connector Bot mentioned this pull request Sep 13, 2026
docs(devlog): record the 36-PR lane-stack merge, regression audit and UI screenshots #4463
Merged
3 tasks done
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@lidge-jun
Merge pull request lidge-jun#4373 from lidge-jun/codex/260912-60plus-…
d90e917
…operations-client-usage

feat(usage): read connected hub usage scoped to the enrolled client key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Ingwannu Ingwannu Awaiting requested review from Ingwannu

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lidge-jun @martinbcg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.