Skip to content

chore(db): drop auto-triage tickets table - #8152

Merged
pandemicsyn merged 1 commit into
chore/remove-autotriage-codefrom
chore/drop-autotriage-tables
Oct 19, 2026
Merged

pandemicsyn merged 1 commit into
chore/remove-autotriage-codefrom
chore/drop-autotriage-tables

Conversation

@pandemicsyn

@pandemicsyn pandemicsyn commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #8151. Drops the legacy Auto Triage database object now that no code reads it.

  • Drops auto_triage_tickets (table, indexes, constraints).
  • Removes the now-unneeded auto_triage_tickets cleanup from account anonymization.
  • Generated migration: packages/db/src/migrations/0290_common_squirrel_girl.sql.

Verification

  • pnpm drizzle generate
  • pnpm drizzle:verify-bootstrap — applied the full migration chain against a fresh database.
  • pnpm --filter @kilocode/db test -- schema.test.ts --runInBand (7 tests)
  • pnpm --filter @kilocode/db typecheck
  • pnpm --filter @kilocode/db lint
  • pnpm format:changed and git diff --check

Visual Changes

N/A

Reviewer Notes

agent_configs.agent_type still permits the values auto_triage and auto_fix. Removing them from the check constraint requires deleting existing rows of those types first, and the generated migration cannot safely order that cleanup with the constraint change. This is intentionally deferred.

Inert leftovers that can be cleaned manually if desired:

  • Rows in agent_configs with agent_type = 'auto_triage'.
  • Auto Triage bot users (kilocode_users.id LIKE 'bot-auto-triage-%') and their organization memberships.

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Verified the auto-triage table drop, its removal from user anonymization, and the generated snapshot/journal; no source references to auto_triage_tickets remain and the snapshot diff contains only that table's removal.

Files Reviewed (5 files)
  • packages/db/src/migrations/0290_common_squirrel_girl.sql
  • packages/db/src/migrations/meta/0290_snapshot.json
  • packages/db/src/migrations/meta/_journal.json
  • packages/db/src/schema.ts
  • apps/web/src/lib/user/index.ts

Verification notes: repo-wide search shows no remaining application, service, or test references to auto_triage_tickets outside historical migrations, and auto_fix_tickets (the only prior FK holder) was already dropped in 0288. The new snapshot is byte-identical to 0289 apart from deleting the public.auto_triage_tickets entry, and the journal entry (idx 290) follows sequentially. DROP TABLE ... CASCADE matches the repo's existing drop-migration pattern and is harmless here since only the table's self-referencing FK existed.


Reviewed by deepseek-v4.1-flash-1017 · Input: 49.6K · Output: 4.6K · Cached: 624K

Review guidance: REVIEW.md from base branch chore/remove-autotriage-code

@pandemicsyn
pandemicsyn added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 0a72abd Oct 19, 2026
86 checks passed
@pandemicsyn
pandemicsyn deleted the chore/drop-autotriage-tables branch October 19, 2026 20:54
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