Repository navigation
chore(codex): purge dormant ticket data (migration 263) - #230
Merged
Merged
Conversation
Release 1 removed every reader of the retired Codex ticket feature. This forward migration removes what it left in the database: the 244/245 triggers, functions and tables; the two ticket settings; the ticket keys and the codex-runtime projection in accounts.extra; the tickets, routing-demand and proxy-trust state; route bundles, cookie clocks, the seen index and stored validation results; routing leases; and job rows of the retired kinds. Quality-run, validation and send-once ledgers stay; live wire observations lose only their raw cookies member. Account writes drop the retired extra keys, so importing an older export cannot bring them back. The projection helpers and the retired job-kind labels go with the data. 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
#229 removed every reader of the retired Codex ticket feature but left its data in place on purpose (code-only release, so rollback stayed trivial). That data is still in the database:
accounts.extra;Change
Forward migration
263_purge_retired_codex_ticket_data.sql. It runs in one transaction withlock_timeout10 s, is idempotent, and is a no-op on a fresh database. Each choice cites file:line evidence from the pre-removal code in its header.Drops the triggers and functions from 244/245 first, then the three
openai_codex_ticket_*tables.Deletes the two settings the feature stored:
openai_codex_ticket_enabledandopenai_codex_ticket_harvest_proxy_url.Removes from
accounts.extra:codex_turn_ticket:*andcodex_ticket_runtime:*keys, andcodex_harvest_proxy_url;codexrip.codex-runtimeentry ofplugin_account_projections; the map itself goes only once it is empty.Accounts without these keys are not written.
Plugin state:
tickets,routing-demandandproxy-trustnamespaces;codex-routing-private, deletesbundle.*,clock.*,seen.*andvalidation-result.*;quality-run.*,validation.*andspent.*;wire.*observations lose only their rawcookiesmember.Deletes the
routing-accountand plugin-eraticketsleases, and the job rows ofcodex_ticket_harvest,codex_ticket_stopandextension_operation. Their items go with them through the existing foreign key.Code that only existed for this data is removed: the projection strip/preserve helpers and the three retired job-kind labels. Account writes now drop the retired extra keys, so importing an export taken before the purge cannot bring them back.
Rollback: the release-1 image (
v0.2.11-codexrip.6) stays compatible. It reads none of the purged objects, and its migration runner skips the extra 263 ledger row. Images from before #229 lose the ticket feature state, which the owner accepted.Verification
TestMigration263PurgesRetiredCodexTicketData(integration) on a disposable PostgreSQL 18.1:go build ./...,go veton the changed packages,vue-tsc --noEmit, the AccountTaskDrawer spec;Not run: real model calls.
🤖 Generated with Claude Code