Replace ChatGPT app-server with an on-demand thin Rust transport - #601
Replace ChatGPT app-server with an on-demand thin Rust transport#601cogwheel0 wants to merge 24 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 169 files, which is 19 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (169)
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies. |
ChatGPT models were routed through direct-only gates that trusted only OpenRouter and Ollama, while the router subscribed to native auth unconditionally. Advertise and trust canonical ChatGPT tool capabilities, then subscribe through a configured-or-selected gate. Regression tests cover both tool availability and zero eager controller builds.
Force mobile model metadata onto direct web and image tools, import generated images from bounded validated payloads, and avoid false SVG classification from embedded metadata. Hide Codex conversation lifecycle items from the visible tool stream so only reasoning appears as Thinking while sources and generated images retain their native chat surfaces. Add protocol-shaped regression coverage and extend the exposure audit.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…p-server # Conflicts: # lib/l10n/app_cs.arb # lib/l10n/app_de.arb # lib/l10n/app_en.arb # lib/l10n/app_es.arb # lib/l10n/app_fr.arb # lib/l10n/app_it.arb # lib/l10n/app_ja.arb # lib/l10n/app_ko.arb # lib/l10n/app_nl.arb # lib/l10n/app_ru.arb # lib/l10n/app_sk.arb # lib/l10n/app_zh.arb # lib/l10n/app_zh_Hant.arb # lib/main.dart
Summary
Adds ChatGPT Account as a first-class backend, separate from Direct Connections, and replaces the intermediate in-process app-server with an on-demand thin Rust coordinator built on the pinned codex-api, codex-login, and codex-protocol crates.
Conduit remains the authoritative chat store. Rust starts only when ChatGPT is configured, selected, or has pending cleanup; it owns secure device-code authentication, Responses streaming, bounded scheduling, compaction, web search, and image generation.
Runtime boundary
Verification
Review status
Note
Add ChatGPT account backend with device-code login and on-demand Rust transport
conduit_chatgpt_runtime) built via Cargokit and bridged to Flutter using flutter_rust_bridge 2.12.0, exposing auth, model listing, turn streaming, and interruption APIs.ChatGptAccountAdapterimplementingDirectProviderAdapterwith model capability mapping, streaming completions, and cancellation that interrupts the native Rust turn.ChatGptConnectionControllermanages auth state,ChatGptVerificationBrowserhosts an in-app webview restricted toauth.openai.com, and auto-dismisses on success.PreferredBackend.chatgpt, routing guards that redirect unauthenticated users to a newChatGptAccountPage, and lazy runtime initialization gated on backend preference or pending cleanup state.SecureCredentialStorageunder a lock shared withdeleteAll; adds adirect_thread_bindingstable (schema v10) to durably bind local chats to ChatGPT transport sessions, with cascade-delete cleanup on disconnect.pagable0.4.0 crate and the Cargokit build toolchain; CI audit scripts enforce pinned Codex commits, an approved FRB API allowlist, fixed base URL, and compressed artifact size budgets.use_precompiled_binariesmeans every developer and CI machine now compiles the Rust runtime locally, significantly increasing cold build times.Macroscope summarized 40005e9.
Greptile Summary
This change adds ChatGPT Account as a first-class direct-chat backend, including native account authentication and streaming, durable local thread bindings and checkpoints, account-scoped cleanup on disconnect, routing, UI, and platform build integration.
The completion lifecycle was examined for the timing window where the native transport can emit a terminal event before
startTurnreturns its run identifier. The Dart adapter buffers these events, assigns the run identifier, and replays the buffer before awaiting completion; no defect was confirmed from the available evidence.T-Rex validation blocked
flutteranddart. The focused reproduction and the targeted ChatGPT adapter/client tests could not execute because neither executable is installed.Confidence Score: 5/5
The PR is safe to merge; no blocking failure remains.
No verified defects or unresolved review findings remain. The examined early-event completion path explicitly buffers and replays events that precede the native run identifier, so terminal delivery is handled by the implementation. Flutter-based execution could not run because the required toolchain is unavailable, but that did not establish a product defect.
What T-Rex did
Reviews (5): Last reviewed commit: "fix(chatgpt): preempt blocked event deli..." | Re-trigger Greptile