(janitor/dead-code): remove orphaned gastown rig/town table definitions - #6073
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dead-code): remove orphaned gastown rig/town table definitions#6073kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
Delete seven unused Durable Object SQLite table definitions from services/gastown/src/db/tables/: rig-agents, rig-bead-events, rig-beads, rig-mail, rig-molecules, rig-review-queue, and town-escalations. These are legacy Postgres-era table schemas superseded by the Town and Rig Durable Object sub-modules. None are imported by any source file, test, migration, config, or prompt, and their exported symbols and table name strings appear nowhere else in the repository or in the external Kilo-Org/kilocode consumer. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Deletion-only change removing seven orphaned gastown table definitions. Confirmed no imports, barrel re-exports, symbol references, or raw table-name references remain in source, tests, Durable Objects, wrangler/config, or migrations; remaining Files Reviewed (7 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
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 unused Durable Object SQLite table definitions in
services/gastown/src/db/tables/:rig-agents.table.tsrig-bead-events.table.tsrig-beads.table.tsrig-mail.table.tsrig-molecules.table.tsrig-review-queue.table.tstown-escalations.table.tsThese are legacy Postgres-era table schemas that were superseded by the Town and Rig Durable Object sub-modules (
dos/town/*). The modern Durable Objects that would have owned this data (Town.do.ts,Agent.do.ts,GastownUser.do.ts,GastownOrg.do.ts) use different, actively-imported tables (beads,agent_metadata,town_events,rig_agent_events,user_rigs,user_towns,org_towns, etc.) and never reference the deleted ones.Evidence of unreachability
Each deleted file's module path and every exported symbol/table-name string were searched repository-wide:
rg -l "rig-agents.table"(and the other six module basenames) → zero matches anywhere, including noexport *barrel re-export (there is nodb/tables/index.ts).RigMailRecord,rig_mail,createTableRigMail,getIndexesRigMail,RigAgentsRecord,rig_agents,RigBeadsRecord,RigMoleculesRecord,RigReviewQueueRecord,TownEscalationsRecord,town_escalations, …) → zero references outside their own files.rig_mail,rig_agents,rig_beads,rig_molecules,rig_review_queue,town_escalations) → zero references in any source, test, migration,.sql, README, or doc..test.tsfiles reference any of these modules or symbols.The handlers that share the rig/town domain (
rig-agents.handler.ts,rig-mail.handler.ts, etc.) are reachable fromgastown.worker.tsbut route to Durable Objects (getTownDOStub,getRigDOStub), not to these tables.Dynamic and configured entry points checked
wrangler/Cloudflare bindings, Durable Object migrations, queues, cron triggers, alarms, RPC, or workflows reference these files or their table names..sqlor migration files; tables are created explicitly per-DO viacreateTableXxx()calls, and none of the deletedcreateTable*/getIndexes*functions are called).exports/SDK/CLI contract exposes them (gastown is a private Worker service, not a published package).Kilo-Org/kilocodeconsumer was cloned and searched: no reference to any deleted identifier or table name.Contract and compatibility considerations
zodandutil/tablehelpers, and nothing imports the files, so no code is loaded at runtime.util/table.ts(getTableFromZodSchema,getCreateTableQueryFromTable) remains used by the actively-imported tables, so it is not orphaned by this change.Validation performed
pnpm exec tsgo --noEmitinservices/gastown— passes (before and after).oxlintonservices/gastown/src— 0 warnings / 0 errors (before and after).pnpm exec vitest runinservices/gastown— 21 files, 314 tests passed.git diff --check— clean.