Skip to content

chore(deletion): purge the thread agent reply counts table before it exists - #10025

Open
brow wants to merge 1 commit into
mainfrom
deletion-accept-agent-reply-counts
Open

brow wants to merge 1 commit into
mainfrom
deletion-accept-agent-reply-counts

Conversation

@brow

@brow brow commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

#9427 adds a community-scoped table, thread_agent_reply_counts. Since #10074, community deletion skips a community_id table that no list names, so a release without the table no longer blocks deletion. It also leaves that table's rows behind.

This PR lists the table in PENDING_SCOPED_TABLES in crates/buzz-db/src/store/deletion.rs. A release with this entry, deployed before #9427's migration, deletes the table's rows when it is present. That covers a rollback from #9427 to this release after #9427 has written reply counts: deleting a community still clears them. The table has no foreign key, so purge order does not matter. Nothing else changes: the table does not exist yet and nothing writes to it.

When #9427 is rebased onto this, it moves the table from PENDING_SCOPED_TABLES to EXPECTED_SCOPED_TABLES and PURGE_SCOPED_TABLES.

Same shape as #9871 for the search tables.

Regressions

None expected. Deletion only gains a delete-if-present entry for a table that no current migration creates.

Validation

The existing table-driven tests for pending tables cover the new entry.

@brow

brow commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 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-30T17:09:59.638072Z a95ab38 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: a95ab38dc5

ℹ️ 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".

@bostonaholic
bostonaholic marked this pull request as ready for review November 30, 2026 17:26
@brow
brow force-pushed the deletion-accept-agent-reply-counts branch from a95ab38 to 5b0ec3d Compare November 30, 2026 17:34
@brow
brow deployed to codex-review November 30, 2026 17:34 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 86511a98c2369f30767450ca426e74846221c9c7...d0e0463d9f56469fb42a820ac19c30a793cb8cbe
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete issues found. The added pending-table entry uses existing community-scoped purge, schema validation, and logical absence verification paths.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source and test inspection; no builds or tests were executed. The future table definition is absent from this PR.

Generated by Codex Security Review |
Requested by: @brow |
Workflow run

@kazemek21 kazemek21 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.

LGTM — Kyle reviewed this PR and the Nexus review-tracker notes.

@brow
brow force-pushed the deletion-accept-agent-reply-counts branch from 5b0ec3d to 896ba1b Compare December 1, 2026 22:59
@brow brow changed the title chore(deletion): accept the thread agent reply counts table before it exists chore(deletion): purge the thread agent reply counts table before it exists Dec 1, 2026
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Dec 1, 2026
@brow
brow force-pushed the deletion-accept-agent-reply-counts branch from 896ba1b to fa35352 Compare December 1, 2026 22:59
@brow
brow force-pushed the deletion-accept-agent-reply-counts branch from fa35352 to 07222da Compare December 1, 2026 22:59
@brow
brow deployed to codex-review December 1, 2026 22:59 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Dec 1, 2026
…exists

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
@brow
brow force-pushed the deletion-accept-agent-reply-counts branch from 07222da to d0e0463 Compare December 2, 2026 02:14
@brow
brow deployed to codex-review December 2, 2026 02:15 — with GitHub Actions Active
@github-actions github-actions Bot added codex-security-review-current The posted Codex security review matches its recorded range. and removed codex-security-review-current The posted Codex security review matches its recorded range. labels Dec 2, 2026

This branch was successfully deployed

1 active deployment
codex-review — d0e0463d Deployed Dec 2, 2026 by brow via Run Codex Security Review #19143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants