Skip to content

chore(coderd/database): remove three unused forkdb queries - #194

Merged
ibetitsmike merged 3 commits into
mainfrom
mike/plugins-followups-unused-queries
Nov 11, 2026
Merged

ibetitsmike merged 3 commits into
mainfrom
mike/plugins-followups-unused-queries

Conversation

@ibetitsmike

Copy link
Copy Markdown
Owner

Removes the three forkdb queries flagged in #167 as unused:

  • DeleteChatWakeupByID
  • UpdateChatWakeupRunStatus
  • DeleteExpiredPluginLinkCodes

Re-verified immediately before this branch (grep over the tree at d523eb1): none has a production caller. The regenerated sqlc output drops the query constants, methods and params; the RBAC wrapper (dbauthz/fork_forkdb.go), metrics wrapper (dbmetrics/fork_forkdb.go), gomock mock and the affected test cases are deleted with them. The diff is 182 deleted lines and zero insertions; sqlc was the fork-pinned build (mise.toml commit 337309bf).

Validation: go build ./coderd/... passes; the mock-based TestForkQuerier in dbauthz passes. The DB-backed forkdb tests could not run on this Mac's Homebrew Postgres (they fail identically on the base commit with relation "organizations" does not exist, a pre-existing local-environment issue, so nothing here regressed them); the CI forkdb job is the authoritative run for those, and the combined dev-workspace UAT exercises wake-ups end to end.

Part of #167.

Xum opened this PR on behalf of @ibetitsmike.

DeleteChatWakeupByID, UpdateChatWakeupRunStatus and
DeleteExpiredPluginLinkCodes have no production callers. Regenerate the
sqlc output and drop the RBAC, metrics, mock and test cases that only
existed for them. Part of #167.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T11:47:13.706180Z 15694d0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: faf99343e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/database/forkdb/plugins_test.go Resolved
TestChatWakeupRuns reached a delivered run through
UpdateChatWakeupRunStatus and counted runs after DeleteChatWakeupByID;
TestPluginLinkCodes counted rows to verify DeleteExpiredPluginLinkCodes.
Both queries have no production callers and are removed (#167), so insert
the delivered run directly and drop the purge-count assertion.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum requested this review on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 15694d0f1d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike merged commit c12b491 into main Nov 11, 2026
9 checks passed
@ibetitsmike
ibetitsmike deleted the mike/plugins-followups-unused-queries branch November 11, 2026 13:43
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum merged this PR on behalf of @ibetitsmike.

Merged as a squash of head 17c5a73c71 on main 0fc46ceeec, which produced c12b491606.

  • CI: fork-ci run 43029234668 passed on the exact head, which contains main 0fc46ceeec. The lead merged main into the branch with update-branch; this PR's changed lines match 15694d0f1d exactly.
  • Codex: clean receipt 6794967074 on 15694d0f1d, which has the same diff. 0 unresolved threads.
  • UAT: F1's f1-uat round passed (D). The server booted, a fresh DB migrated to v640 with dirty=false, and chat create, plugin list and fork settings all worked. Ops confirmed the cleanup.

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