Skip to content

refactor: remove Image Studio, flatten account tools, drop fork-only dead symbols - #245

Merged
HTExplicit merged 3 commits into
mainfrom
refactor/remove-image-studio-and-flatten
Oct 5, 2026
Merged

HTExplicit merged 3 commits into
mainfrom
refactor/remove-image-studio-and-flatten

Conversation

@HTExplicit

@HTExplicit HTExplicit commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Problem

Image Studio has had no model source since the Cindy removal, so it cannot create a job. The account tools still run through the indirection built for the plugin host, which is gone. A scan against upstream v0.2.13 also found fork-only symbols and fields that nothing reads. The owner's rule is that a retired feature leaves nothing behind.

Change

Image Studio is deleted

  • Backend: service, runtime, repository, handler, the eight /api/v1/image-studio routes, GET/PUT /admin/settings/image-tools, wire providers. GATEWAY_IMAGE_STUDIO_ENABLED is no longer read.
  • Frontend: the feature folder, the user page and its route, the navigation entry, i18n keys, the admin settings panel, image_studio_enabled in public settings.
  • Live paths it touched (handler/openai_images.go, ops_error_logger.go, service/policy_context.go) are back in their upstream form.
  • Migration 270_drop_image_studio.sql drops the three Image Studio tables and the image_tools_config setting. It does not touch plugin installations: the follow-up PR removes the retired first-party plugin rows as a whole.

Account tools are flattened

  • The operation invoker, invocation and result types, native policy fixtures and the testextensions package are removed; folder, tag, bulk and import decisions are direct calls.
  • The service-level filter branch of bulk taxonomy is removed. The handler resolves filter targets and checks expected_match_count itself, so the service only ever received account IDs.
  • A request cancelled or timed out during validation no longer returns 503 ACCOUNT_TOOLS_UNAVAILABLE. Every other code, message and decision is unchanged.

Fork-only dead code

  • Symbols and fields with no reader are removed, each judged by the commit that introduced it.
  • Migration 271_drop_usage_billing_dedup_account_id.sql drops a column nothing reads. An older image fails billing writes without it, so a rollback needs ALTER TABLE usage_billing_dedup ADD COLUMN account_id BIGINT first; .downstream/native-domains.md has the procedure, including dropping the column again after returning to this version.
  • QuotaActivityStamp.Revision stays: the quota estimate compares the whole struct.
  • go.mod: github.com/pmezard/go-difflib is indirect again, as upstream has it.

Connection test

  • Reasoning-effort validation errors are plain sentences again (reasoning effort is not supported by the selected account model) instead of a formatted application-error string.

Not in this PR

  • production-deploy.yml, downstream-release.yml and deploy/ are identical to main. Their dead inputs and the GATEWAY_IMAGE_STUDIO_ENABLED lines are a separate task with the host deployer.

What an admin sees

  • System settings → Gateway → Codex settings: the "Image tools" panel is gone.
  • The Plugins page is unchanged here. The follow-up PR removes its retired first-party block as a whole.
  • /image-studio is a 404 instead of a redirect to the dashboard.
  • Previewed with mock data and approved by the owner before this PR.

Verification

  • go build ./... (default and GOOS=linux); go vet ./... with no tag, -tags unit, and -tags integration on repository; wire diff clean; gofmt; go mod tidy -diff clean for go.mod.
  • Migrations 270 and 271 applied on a throwaway PostgreSQL 18 from an empty database, with TestMigration270DropsImageStudio and TestMigration271DropsUsageBillingDedupAccountID.
  • Targeted tests for quota measurement and activity, account taxonomy (unit and integration), bulk taxonomy handler, connection-test reasoning, account import decisions.
  • vue-tsc, check:i18n, and the changed CI selector scripts.
  • Two review passes with independent lenses (deletion completeness, live paths kept, account-tools behaviour, migration 271, frontend and CI). 16 findings confirmed in the second pass, all fixed; one of them restored Revision after an unchanged test showed it is read.

Not run locally: golangci-lint (the local binary cannot read Go 1.27 export data), the full unit and integration suites, frontend eslint and full vitest, real model calls. CI runs the required ones.

🤖 Generated with Claude Code

Codex and others added 3 commits October 5, 2026 01:12
…dead symbols

Image Studio has had no model source since the Cindy removal, so it could
not create a job. It is deleted as a whole rather than kept behind a
switch nobody can turn on.

Image Studio
- backend service, runtime, repository and handler, the eight
  /api/v1/image-studio routes and GET/PUT /admin/settings/image-tools;
- frontend feature, user page, navigation entry, i18n keys and the admin
  settings panel;
- GATEWAY_IMAGE_STUDIO_ENABLED is no longer read;
- migration 270 drops the three Image Studio tables and the
  image_tools_config setting, and clears the retired codexrip.image-tools
  installation row the same way 264 cleared codex-runtime;
- the live paths it touched (images handler, ops error logger, policy
  context) are back in their upstream form.

Account tools
- the plugin-era indirection (operation invoker, invocation and result
  types, native policy fixtures, testextensions) is flattened into direct
  calls; folder, tag, bulk and import decisions are unchanged;
- the service-level filter branch of bulk taxonomy, never reached because
  the handler resolves filter targets itself, is removed.

Fork-only dead code
- symbols and fields with no reader are removed after a per-item check
  against the commit that introduced them;
- migration 271 drops usage_billing_dedup.account_id, which nothing reads.
  An older image needs the column added back before a rollback; the
  procedure is in .downstream/native-domains.md.

Connection test
- reasoning-effort validation errors are plain sentences again instead of
  a formatted application-error string.

The deploy workflow, the release workflow and deploy/ are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Migration 270 removes only what Image Studio itself stored: the
image_tools_config setting and the three image_studio_* tables. It no
longer reads the retirement receipt and no longer changes the
codexrip.image-tools installation, its bindings, its staged update or
its bootstrap record. The follow-up change deletes the retired
installation rows as a whole, so 270 has nothing to prepare for them.
270 has not been released.

- 270_drop_image_studio.sql: drop the receipt guard and every statement
  on the sub2api_plugin_* tables; keep the setting delete, the three
  table drops (children first) and the two timeouts.
- TestMigration270DropsImageStudio: drop the plugin fixtures, the
  receipt and the never-retired cases. A codexrip.image-tools
  installation present before the migration is unchanged after it: same
  row version, same value in every column.
- .downstream/native-domains.md: 270 does not stop startup and does not
  strip the installation; the startup retirement does not read or change
  codexrip.image-tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HTExplicit
HTExplicit merged commit 2417dea into main Oct 5, 2026
18 checks passed
@HTExplicit
HTExplicit deleted the refactor/remove-image-studio-and-flatten branch October 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant