Repository navigation
refactor(codex): remove ticket and route-qualification harvesting - #229
Merged
Merged
Conversation
Removes the in-process Codex ticket module and everything that existed only for it: harvest-proxy route acquisition/verification, routing cookies and connection leases, the fail-closed scheduler and request gates, the manual and batch harvest/stop actions, the harvest proxy settings and their UI. Kept and moved to neutral files with identical behaviour: the native Codex runtime host (now configured by request_zstd only; retired keys in the stored config are dropped on load), client identity/profile and recovery dispatch, the credential-owner identity hash, logical-turn staging, the response model-declaration guard and the outbound wire observation. Codex quality runs no longer need a route: create binds a model and reasoning effort, sends use the account's ordinary forwarding path, and renew-route is gone. Pre-rebuild ledgers stay readable. Code only: no migration; dormant ticket data is purged in a follow-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e retried Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
HTExplicit
added a commit
that referenced
this pull request
Oct 3, 2026
Removes the pieces the Codex ticket removal (#229-#231) left behind and restores the upstream or pre-ticket form in each place. Deleted: the response model-declaration guard (upstream behaviour: reply delivered, usage log records upstream_model_mismatch); the codex-quality-runs diagnostics; the Codex outbound fingerprint panel with its per-request wire observation and profile selection; plugin-owner job metadata decoding; the retired-key, retired-extra and retired-job tolerance. Replaced: the native Codex runtime host by one plain settings row {request_zstd} and direct calls into codexruntime/profile and codexruntime/recovery. Restored: x-codex-turn-state handling to the fork's contract from before the routing commits; Responses-Lite default instructions to upstream. Migration 264 carries the compression value over from the recorded config hash, drops sub2api_plugin_state and sub2api_plugin_leases, removes the retired codex-runtime installation's stored configuration and package, and writes the fingerprint mode explicitly for OAuth accounts that had none. A differing upstream model is now shown in the single account test and makes the quality verdict suspect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
The fork carried its own Codex "ticket" subsystem: a background module that sent probe requests through a separate harvest proxy to obtain short-lived (120 s) per-account, per-model route qualifications. It also ran a fail-closed scheduler gate and a per-request gate that blocked OAuth accounts without a live qualification for gpt-6-astra / gpt-6-sol / gpt-6-luna / gpt-5.6-sol. Our own quality data shows answer quality follows the account, not how the request is routed. The owner decided to remove the subsystem completely. Upstream has no equivalent.
Change
Removed:
codexruntime/tickets) and its routing host: probes, cookie handling, connection leases, proxy trust, demand tracking and the renew loop;codex_ticket_harvest,codex_ticket_stopandextension_operation;codex_turn_ticketson account DTOs, the ticket status events in account tests, and the fix(tickets): preserve account state during inactive credential refresh #190 credential context. Token refresh is upstream behaviour again;Kept, moved into neutral files with unchanged behaviour:
codexruntime/core, its config is now{request_zstd}, and the/settings/codex-runtimeendpoint and receipts are unchanged. Retired keys in the stored config or in a PUT are dropped instead of rejected, so the server still boots.Codex quality runs no longer need a route. Create binds
modelandreasoning_effort, validated against the account mapping and the group's effort policy, and sends go over the account's ordinary forwarding path.renew-routeis gone, and runs recorded before the rebuild stay readable but read-only.UI as approved in the local preview: the page is renamed 「Codex 运行设置」 and keeps only the compression toggle; the fingerprint panel keeps identity, UA, profile, observed request and reference. Old job rows of the retired kinds still list with their names and say they cannot be retried.
Code only: no migration. The dormant rows, settings, extra keys and the 244/245 triggers are purged in a follow-up release. On first boot the native runtime records a new normalized config hash, which bumps
runtime_generationonce. The encrypted config source is not rewritten.Verification
go build ./...;go veton the changed packages;TestValidateConfigDropsRetiredSettingsTestModuleServesTransportPlanFromItsConfigurationTestNativeCodexStoredRetiredSettingsStillBootTestCodexCredentialOwnerIdentityIsStableTestAccountTestService_OpenAIOAuthGuardsDeclaredModelvue-tsc --noEmit,check:i18nand the specs of touched components;Not run: race suites locally (no cgo), real model calls.
🤖 Generated with Claude Code