Skip to content

refactor: retire release acceptance API key leases - #254

Merged
HTExplicit merged 1 commit into
mainfrom
chore/remove-release-acceptance
Oct 7, 2026
Merged

HTExplicit merged 1 commit into
mainfrom
chore/remove-release-acceptance

Conversation

@HTExplicit

Copy link
Copy Markdown
Owner

Remove the retired release-acceptance lease lifecycle from API key storage, queries, service/DTO interfaces, the administrator's internal-purpose badge, and the offline Codex context-contract CLI. All remaining keys use the normal list and mutation paths; the gateway's unrelated in-flight lease_id remains unchanged.

Migration 274 atomically validates that acceptance keys are soft-deleted with nonempty leases and ordinary keys carry no leases, removes acceptance-key hot/archive billing dedup claims and the keys with their cascading usage/billing rows, then drops the two dedicated indexes, constraint, and api_keys.purpose/lease_id. Ordinary keys, usage and dedup claims remain; ops diagnostics retain their original key references and content. Historical migration 239 and all other existing SQL remain unchanged. The authorized production inventory is 44 retired acceptance keys, 242 usage rows and 242 billing dedup claims; the migration scopes deletion by the validated key IDs rather than hardcoding environment counts.

Deployment depends on completing host-tool stage 2 first: the production deployment tool must no longer read the lease columns before this image is deployed. This image carries the matching code and schema migration together. Once 274 runs, older images that read those columns cannot be deployed directly; preserve a failed deployment for forward repair rather than rolling back to an old image.

Validation:

  • Ent regeneration, Go formatting, and git diff --check passed.
  • go test -p=1 ./cmd/server -run '^$' -count=1 passed (compile/initialization; no tests selected).
  • go test -p=1 ./internal/repository ./internal/handler/dto -run '^(TestAPIKeyRepositoryListByUserIDSortByGroup|TestAPIKeyFromService_Maps.*)$' -count=1 passed.
  • The new PostgreSQL fixture verifies ordinary data and diagnostics preservation, acceptance usage/dedup removal, audit SET NULL behavior, idempotent rerun, and atomic refusal for active acceptance keys, missing leases, and ordinary keys carrying leases. It is selected in normal Downstream backend CI. Its local integration command compiled but explicitly skipped database execution on Windows without SUB2API_MIGRATION_TEST_DSN; no database pass is claimed.
  • Changed frontend script/locale TypeScript syntax passed; full Vue SFC/typecheck remains for normal CI because the existing local dependency links are incomplete.
  • Removed CLI shell selector passes Bash syntax. No real model requests, SSH actions, merge, release, or deployment were performed by this PR task.

HTExplicit added a commit that referenced this pull request Oct 7, 2026
The deployment path still carried retired acceptance, rollback, resource-request and plugin-era controls, while console typography needed to be brought up to date with the current upstream style. This integrates the remaining authorized takeover work after the reasoning repair in #252.

- Integrates #253, #254, #255 and #222 while retaining their commit ancestry. Removes stale release scaffolding and deployment template settings; preserves every existing migration SQL file.
- Production Deploy accepts only `release_tag` and `confirmation=DEPLOY`, sends `deploy <immutable-image>`, and retains standard OCI provenance and fixed SSH/environment controls. Both automation callers and historical-run deduplication match it.
- Migration 274 deletes only validated, soft-deleted release-acceptance keys and their usage/dedup rows, removes the two acceptance columns, and leaves ordinary keys and diagnostic logs. The matching application no longer reads those columns. Older images cannot be deployed after 274; failures require a forward fix.
- Uses upstream system fonts, sizes and readable semantic text colors without dropping table columns. Fixes the TLS empty-state color and whole-badge/word wrapping, and normalizes the audit helper's LF bytes without semantic changes.
- Removes the image-side skill-registry directory after the host mount and retired runtime configuration were removed.

Validation: reuse the component branches' directly affected tests and source-identical UI matrix; normal required checks run on this final integration tree. The only integration conflicts were the migration CI selector and retired documentation/notices; the resolved selector retains the new PostgreSQL migration fixture and live migration tests. All existing migration SQL is unchanged. Entry-point Bash syntax and diff checks pass.

The simplified host tool has completed a successful unchanged-image `.12` redeploy, preserving environment/resources and other containers. Host config retirement also passed with a new complete backup retained. UI localhost fake-data validation sampled 7,728 normal text/input/placeholder elements across 36 after states, with no sample below 4.5:1; account tables fit at 1280/1440/1920 in both languages/themes. Before screenshots block external fonts and show their fallback stack. No real model call or live upstream ID-less-item acceptance test was performed.
@HTExplicit
HTExplicit merged commit 4c9df57 into main Oct 7, 2026
18 checks passed
@HTExplicit
HTExplicit deleted the chore/remove-release-acceptance branch October 7, 2026 08:45
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