Skip to content

chore(auto-routing): drop auto-decider D1 tables - #7542

Merged
iscekic merged 1 commit into
mainfrom
igor/auto-routing-drop-auto-decider-tables
Oct 15, 2026
Merged

iscekic merged 1 commit into
mainfrom
igor/auto-routing-drop-auto-decider-tables

Conversation

@iscekic

@iscekic iscekic commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

bot: Drop the D1 tables and columns that the auto-decider sync used. This PR is stacked on #7541.

Why a separate PR

Change

  • Migration 0017 drops config_auto_decider_models, config_auto_decider_exclusions and the auto-decider cost columns on benchmark_config.

Verification

  • Migration test: applied migrations 0001–0016 to a fresh SQLite database, seeded config and profile rows, then applied 0017. The rows survive.

@kilo-code-bot

kilo-code-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Re-verified the stacked 0017 D1 migration that drops the auto-decider tables and cost columns; the DDL is valid and no application code at HEAD still reads the removed tables or columns.

Files Reviewed (3 files)
  • services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql
  • services/auto-routing-benchmark/migrations/meta/0017_snapshot.json (generated)
  • services/auto-routing-benchmark/migrations/meta/_journal.json (generated)

Notes (no findings):

  • Repo-wide search (services/, apps/, packages/, excluding migrations/) finds no remaining code, test, script, or config references to config_auto_decider_models, config_auto_decider_exclusions, auto_decider_min_cost_usd, or auto_decider_max_cost_usd; src/db-schema.ts no longer defines them.
  • ALTER TABLE ... DROP COLUMN is structurally safe: the two cost columns are plain columns and benchmark_config's only index (benchmark_config_router_unique) covers router; the dropped tables carry no inbound foreign keys, views, or triggers.
  • Snapshot prevId (4190aa72-…) matches the 0016 snapshot id, and the journal entry (idx: 17, tag: 0017_serious_lila_cheney) is contiguous with a monotonic when.
  • Deploy ordering (merge refactor(auto-routing): remove auto-decider candidate sync #7541 first, which stops the reads) is documented in the PR body and matches the predeploy migration model, so this is an intentional, addressed risk rather than a finding.
Previous Review Summaries (2 snapshots, latest commit 1ea6795)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1ea6795)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Re-reviewed the stacked 0017 D1 migration that drops the auto-decider tables and cost columns; the DDL is valid for current schema and no application code at HEAD still reads the removed tables or columns.

Files Reviewed (3 files)
  • services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql
  • services/auto-routing-benchmark/migrations/meta/0017_snapshot.json
  • services/auto-routing-benchmark/migrations/meta/_journal.json

Notes (no findings):

  • Repo-wide search (services/, apps/, packages/, excluding migrations/) finds no remaining code, test, script, or config references to config_auto_decider_models, config_auto_decider_exclusions, auto_decider_min_cost_usd, or auto_decider_max_cost_usd; src/db-schema.ts no longer defines them.
  • ALTER TABLE ... DROP COLUMN is structurally safe: the two cost columns are plain columns, and benchmark_config's only index (benchmark_config_router_unique) covers router, not them; the dropped tables carry no inbound foreign keys, views, or triggers.
  • Snapshot prevId (4190aa72-…) matches the 0016 snapshot id, and the journal entry (idx: 17, tag: 0017_serious_lila_cheney) is contiguous.
  • Deploy ordering (merge refactor(auto-routing): remove auto-decider candidate sync #7541 first, which stops the reads) is documented in the PR body and matches the predeploy migration model.

Previous review (commit 3b00a91)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the stacked 0017 D1 migration that drops the auto-decider tables and columns; the DDL is valid for the current schema and no application code at HEAD still reads the removed tables or columns.

Files Reviewed (3 files)
  • services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql
  • services/auto-routing-benchmark/migrations/meta/0017_snapshot.json
  • services/auto-routing-benchmark/migrations/meta/_journal.json

Notes (no findings):

  • The dropped auto_decider_min_cost_usd / auto_decider_max_cost_usd columns are plain NOT NULL columns with defaults and are not part of any index, view, trigger, or foreign key, so ALTER TABLE ... DROP COLUMN is structurally safe.
  • config_auto_decider_models / config_auto_decider_exclusions are not referenced by any remaining src code, foreign key, view, or trigger at HEAD.
  • Snapshot prevId (4190aa72-…) matches the 0016 snapshot id, and the journal entry (idx: 17, tag: 0017_serious_lila_cheney) is contiguous, so the generated metadata is internally consistent.
  • The PR correctly defers the destructive drop behind refactor(auto-routing): remove auto-decider candidate sync #7541 and documents the deploy-first ordering; this matches the predeploy migration model in services/auto-routing-benchmark/package.json.

Reviewed by deepseek-v4.1-flash · Input: 43.8K · Output: 4.5K · Cached: 352K

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic added this pull request to stack #7532 October 14, 2026 17:25
@iscekic
iscekic force-pushed the igor/auto-routing-drop-auto-decider-tables branch from 5c5c8dd to 1ea6795 Compare October 14, 2026 22:07
Base automatically changed from igor/auto-routing-remove-auto-decider to main October 14, 2026 22:31
@iscekic
iscekic force-pushed the igor/auto-routing-drop-auto-decider-tables branch from 1ea6795 to be228a7 Compare October 14, 2026 22:31
@iscekic
iscekic merged commit 04608c1 into main Oct 15, 2026
28 checks passed
@iscekic
iscekic deleted the igor/auto-routing-drop-auto-decider-tables branch October 15, 2026 00:09
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.

2 participants