(janitor/dead-code): remove orphaned gastown rig/town-escalation tables - #6467
Closed
kilo-code-bot[bot] wants to merge 1 commit into
Closed
kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
Delete seven Durable Object SQLite table definitions in services/gastown that are no longer imported, created, or queried anywhere: - rig-agents.table.ts - rig-beads.table.ts - rig-bead-events.table.ts - rig-mail.table.ts - rig-molecules.table.ts - rig-review-queue.table.ts - town-escalations.table.ts These are leftovers from the rig→town refactor. The active schema (beads, agent-metadata, escalation-metadata, convoy-metadata, town-events, agent-nudges, etc.) lives in Town.do.ts and its town/ sub-modules; the deleted tables were never wired into any createTable*() migration call and their exported symbols/table names have no references.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryDeletion-only PR removing seven unused gastown Files Reviewed (7 files)
Verification Notes
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
auto-merge was automatically disabled
September 22, 2026 15:51
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was deleted
Seven orphaned Durable Object SQLite table definitions in
services/gastown/src/db/tables/:rig-agents.table.tsrig-beads.table.tsrig-bead-events.table.tsrig-mail.table.tsrig-molecules.table.tsrig-review-queue.table.tstown-escalations.table.tsThese are leftovers from the rig→town refactor. The active schema (
beads,agent-metadata,escalation-metadata,convoy-metadata,bead-dependencies,town-events,agent-nudges,org-towns,user-towns,user-rigs,rig-agent-events) is imported and instantiated inTown.do.ts,Agent.do.ts,GastownUser.do.ts,GastownOrg.do.tsand thedos/town/*sub-modules. The deleted tables are not part of that graph.Evidence of unreachability
import/export ... fromreference to any of the seven.tablemodules anywhere in the repository (checkedapps/,packages/,services/,dev/,scripts/,tools/).rig_agents,rig_beads,rig_bead_events,rig_mail,rig_molecules,rig_review_queue,town_escalations, their*Recordzod schemas,createTable*/getIndexes*helpers) outside the deleted files themselves — including test files and.sql/migration/seed content.createTable*()helpers are never called from any DO migration path. The live tables are wired viacreateTableBeads(),createTableAgentMetadata(),createTableTownEvents(),createTableRigAgentEvents(),createTableUserRigs(),createTableUserTowns(); none of the deleted tables' creators are invoked.BeadEventType/EscalationSeveritynames: the live definitions inbead-events.table.tsandescalation-metadata.table.tsare self-contained and unaffected.Kilo-Org/kilocode).Dynamic and configured entry points checked
services/gastown/wrangler.jsonc/wrangler.test.jsonc: no Durable Object binding, migration, queue, cron, RPC, or workflow references these tables.drizzle.config.*or SQL migration files exist inservices/gastown; the DO SQLite schema is created at runtime viacreateTable*only.index.tsunderdb/tables/, and noimport * as/glob/dynamic-import of the tables directory.gastown.worker.tsroutes andhandlers/*reference only the live DO stubs and live tables;town-escalations.handler.tsoperates onescalation_metadata, nottown_escalations.Contract and compatibility considerations
packages/*in this monorepo are"private": true; these files are not published exports.createTable*never called), so no persisted data, migration, rollback, or rollout dependency is affected. Deleting the type-only definitions has no runtime effect.Validation performed
pnpm --filter cloudflare-gastown exec tsgo --noEmit— passes (baseline and after deletion).pnpm --filter cloudflare-gastown test— 22 files / 323 tests pass.pnpm -w exec oxlint --config .oxlintrc.json services/gastown/src— 0 warnings, 0 errors.