Skip to content

chore(db): drop retired storage whose readers have shipped - #8933

Merged
waleedlatif1 merged 2 commits into
stagingfrom
chore/drop-retired-columns
Oct 12, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
chore/drop-retired-columns

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Left alone on purpose: project membership tables (#8590), legacy file-search index tables (#8014), embedding_search ACL/binary columns and knowledge_projection_dirty (still written by DB triggers).

Type of Change

  • Chore / maintenance

Testing

  • Verified every dropped/un-declared name has no references at HEAD, at v0.9.18 / v0.9.17, in the worker repo, or in DB triggers/functions
  • check:migrations, check:pending-drop-tables, check:schema-mock, check:comment-hygiene, check:test-patterns, block-registry check, bun run lint; drizzle-kit generate is a no-op
  • Type-check packages/db + packages/testing; chat route/deployment + data-drain tests (23 files, 167 tests)
  • New 0030 integration test covers retiring the writers after Tin is already dropped; fresh migrate/push provisioning in CI exercises 0409 + 0031

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Drops tables and an index whose last readers and writers were removed in
already-released versions, makes chat.include_tool_calls NOT NULL, and
un-declares six dead columns ahead of a next-release DROP COLUMN.
embedding_keyword_tin is dropped by script migration 0031 so it runs after
0030 retires the triggers that still write it on skipped-release upgrades.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 24 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical impact] The PR appears safe to merge; the previous chat-lock issue is fixed and no new actionable issues were found.

Summary

Removes retired storage, makes chat.include_tool_calls required with a default of false, and updates callers and tests.

  • Database migrations remove storage that no released code uses.
  • Database upgrades stop keyword writers before dropping Tin.
  • Chat deployments store tool-call settings as true or false.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[SQL migrations] --> B[0409 removes retired storage]
  B --> C[0030 retires keyword writers]
  C --> D[0031 drops keyword Tin]
Loading

Reviews (2) · Last reviewed commit: "fix(db): bound the chat lock in 0409 wit..." · Reviewed by Greptile

Comment thread packages/db/migrations/0409_drop_retired_storage.sql
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 12, 2026 7:52pm UTC

Request Review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 24 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 5313021 into staging Oct 12, 2026
37 of 38 checks passed
@waleedlatif1
waleedlatif1 deleted the chore/drop-retired-columns branch October 12, 2026 19:50

This branch was successfully deployed

1 active deployment
Preview — 1eecc59f Deployed Oct 12, 2026 by vercel[bot]
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