[Design] Minimum safe Desktop composer compatibility across client updates

Đang mở
#7,587 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend, desktop, security

Hướng nghiên cứu

Start with the package admission, HTTP controller, usage policy, routing preflight, and macOS RPC consumer boundary linked in the issue; then read the decisions requested for units A–E. The work is to agree on a consumer-facing contract, with several independently reviewable units and explicit dependencies. Done means owners resolve the security and consumer evidence questions and define acceptance against an actual submitted turn; symptom investigation remains in #6196 and identity revocation in #7582.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement streaming

[Design] Minimum safe Desktop composer compatibility across client updates

Area

Multiple areas

What are you trying to accomplish?

Keep a signed-in Codex Desktop usable when the main account has exhausted its allowance but an independently authorized pool account or external provider can serve the selected route. Keep actual usage, credits, spending restrictions and server-side account/provider limits authoritative.

This is the design/security follow-up requested in #7368's closing comment, before adding a dependency or desktop UI. #7368 remains closed. The remaining composer symptom is already tracked in #6196.

What prevents this today?

At dev c51b0b4:

  • Windows admission pins one historical package version. Package identity, supported payloads and composer acceptance are separate claims.
  • HTTP correction covers GET JSON usage and GET SSE usage streams; upgraded sockets remain opaque. POST subscriptions and broker frames are outside that contract.
  • Account-wide consent lasts three minutes. Routing preflight cannot prove a conversation's selected provider.
  • The macOS RPC shim can be attached without seeing gate-bearing messages. Synthetic tests and attachment alone do not establish composer coverage (#6196).

Current status (2026-10-28): identity revocation #7582, fresh package-proof binding #7709, and paired GUI-session authority #7775 are merged. These are bounded completed slices. The maintainer's current disposition explicitly leaves version-independent admission, broker transport, usage consumers and session consent subject to their owner/security decisions. This issue remains open; those merges do not authorize the remaining expansion or establish live composer acceptance.

What should OpenCodex do?

Agree on the smallest consumer-facing contract and review the following units independently. Several can proceed in parallel.

Unit Scope and actual dependency
A. Identity revocation #7582 is merged into dev as bef4f50e281e5b3e240218c83fc4afc8cb8f8751. Preserve its stale-generation protection in later work.
B. Version-independent admission Retain official family/publisher, canonical basename and App-entry checks. A backend-only slice, independent of C/D/E.
C. Bounded broker transport Review dependency choice, fixed-host verified TLS/proxy routing, ordering, binary/text kind, heartbeat, backpressure and cancellation. Keep unrelated upgrades opaque.
D. Usage consumers D-HTTP would add POST subscription handling after proving its cache consumer, without C. D-push requires C and the snapshot/cache contract. Both can retain the existing trial.
E. Session consent Backend lifetime/revocation and capability negotiation can use existing GET/SSE without C/D-push. New UI depends on that contract and the requested design/security review.

Code dependencies are C -> D-push and E-backend -> E-UI. Newer-package activation additionally needs B's admission decision; authoring the other units need not wait. Shared controller edits need integration checks, not a five-PR serial chain.

Only paths shown to populate or update the affected composer's gate/cache should enter correction:

Surface Evidence and minimum treatment
GET /backend-api/wham/usage and GET /backend-api/wham/usage/stream Existing JSON/SSE contract; confirm the affected client consumes it.
POST /backend-api/wham/usage/subscriptions Closed #7368 prototype/tests only. Prove its cache consumer; preserve renewal/generation metadata and request bytes. No WS dependency.
Broker /backend-api/pages/realtime-broker/u<digits>/ws Prototype topic codex-work-usage-push-v1, usage.snapshot and recovered subscribe catchups only. Native consumer/host proof remains required; fixtures do not establish a universal WS or ws.chatgpt.com requirement.
App-server account/rateLimits/read result / account/rateLimits/updated notification Existing macOS projection; only useful where those messages feed the gate.

Partial pushes require a proven merge/retained-state contract; omitted protection data is not authorization. Unrelated topics, unknown schemas, protected states and non-success responses retain original content. UI projections never become pool capacity or billing evidence.

Owner/security decisions requested:

  1. May strict package identity and fail-closed payload validation replace exact-version admission? Define invalidation of any cached, completed package proof.
  2. Which consumer/cache evidence establishes the first supported surface? Leave unproved paths unclaimed.
  3. Approve or reject the WS dependency/host expansion, library and transport bounds. Define broker refresh: closing a shared socket also affects unrelated topics.
  4. Accept or reject account-wide runtime-session consent without per-conversation isolation. Define withdrawal, identity/routing changes, recovery/re-exhaustion, stop/crash and certificate deadlines. Require capability negotiation with older servers.
Example usage or interface

Main account exhausted + valid selected alternate route -> Desktop can submit -> the ordinary proxy dispatch admits or refuses using that route's real credentials and limits. A request that actually needs the exhausted native account still gets its genuine refusal.

Unknown identity/schema, withdrawal or protected spending -> original state remains authoritative. Report response production, native cache update and composer submission separately.

Alternatives or workarounds

Use the existing RPC projection where it reaches the consumer, or retain the existing short trial for a narrowly supported HTTP surface. Authless mode is a different workflow because it changes the signed-in account presentation. Provider inference routing alone cannot repair a turn the client never submits.

Keep cost small: no per-version/response model calls or bundle analysis; cheap path/method/topic rejection; bounded snapshot decoding; coalesced package probes with explicit invalidation; current identity/routing checks before output.

Additional context

Current source: package admission, HTTP controller, usage policy, routing preflight, RPC consumer boundary.

The closed #7368 diff is a prototype reference, not current-dev behavior or native end-to-end proof. No new implementation, dependency, UI, live configuration or exhausted-account acceptance run is included in this design request.

Related: #5941 is closed, #6196 open, #4878 closed as duplicate. Closed #7100 concerns pool spending priority. #4869 is closed as not planned and proposes a different per-thread Reserve override. Keep symptom investigation in #6196 and identity revocation in #7582.

Acceptance needs a genuinely exhausted signed-in account, eligible alternate route, proven consumer/cache update and an actual submitted turn. Also verify genuine native refusals, protected limits, identity changes and disable/restart/crash cleanup. Synthetic tests and transport counters alone are insufficient.

Checks
  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.
Ngôn ngữ chính
TypeScript
Star
16.9k
Fork
1.3k
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
814

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lidge-jun/opencodex

Tất cả issue của lidge-jun/opencodex

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.