Skip to content

fix: handle id mutation batches and task PR gates#272

Merged
zbeyens merged 4 commits into
mainfrom
codex/resend-allowfullscan-task-pr
May 26, 2026
Merged

fix: handle id mutation batches and task PR gates#272
zbeyens merged 4 commits into
mainfrom
codex/resend-allowfullscan-task-pr

Conversation

@zbeyens
Copy link
Copy Markdown
Member

@zbeyens zbeyens commented May 26, 2026

  • Auto release

🐛 Fixes the Resend scaffold _id update/delete allowFullScan failure, primary-id mutation batching, and task PR-body contract regressions.
🟢 95-100% confidence

Phase 🧪 Tests 🌐 Browser
Reproduced 🔴 _id IN (...) update/delete hit the full-scan guard; Codex review reproduced unbounded per-id fanout and legacy cursor resume risk; task PR-body regressions were reproduced against the accepted task body contract. ➖ N/A
Verified 🟢 Primary-id mutation tests cover sync update/delete caps, legacy cursor fallback, and async batches above mutationMaxRows; full repo check and local autoreview pass; unresolved review threads are empty. ➖ N/A

✅ Outcome

  • ORM update/delete filters on primary id arrays use bounded id lookups instead of requiring allowFullScan.
  • Sync _id inArray(...) update/delete rejects lists above mutationBatchSize before issuing point reads.
  • Async/paginated primary-id mutations read only the current bounded window and can continue beyond mutationMaxRows.
  • Non-kitcn legacy cursors fall back to query pagination so in-flight scheduled jobs can resume.
  • Task workflow requires task-style PR bodies, preserves the auto-release block, and forbids self-linking the current PR inside its own description.

⚠️ Caveat

  • No browser surface. This is ORM package behavior plus agent workflow contract text.

🏗️ Design

  • Chosen boundary: ORM mutation planning owns id lookup batching; task rule/template owns task PR body shape.
  • Why not quick patch: adding allowFullScan to generated Resend files would hide a bounded primary-id mutation behind a scan opt-in.
  • Why not broaden cursor parsing: only tagged kitcn primary-id cursors use the offset parser; other cursors stay on query pagination.

🧪 Verified

  • bunx vitest run packages/kitcn/src/orm/mutation-id-fast-path.vitest.ts
  • bunx tsc --noEmit --pretty false -p packages/kitcn/tsconfig.json
  • bun lint:fix
  • bun --cwd packages/kitcn build
  • bun check
  • .agents/skills/autoreview/scripts/autoreview --mode local
  • bash .agents/skills/resolve-pr-feedback/scripts/get-pr-comments 272 (review_threads: [])

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

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

Project Deployment Actions Updated (UTC)
better-convex Ready Ready Preview, Comment May 26, 2026 3:47pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

🦋 Changeset detected

Latest commit: 804721f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
kitcn Patch
@kitcn/resend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown

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

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: a2afee6437

ℹ️ 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 packages/kitcn/src/orm/update.ts Outdated
Comment thread packages/kitcn/src/orm/mutation-utils.ts
- cap sync primary-id mutation fanout by mutationBatchSize

- keep legacy scheduled cursors on query pagination

- cover async primary-id batches above mutationMaxRows
@zbeyens zbeyens merged commit d286077 into main May 26, 2026
7 checks passed
@zbeyens zbeyens deleted the codex/resend-allowfullscan-task-pr branch May 26, 2026 16:46
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