Skip to content

Clean up newly created task rows after schedule creation failure - #1102

Merged
sidneyswift merged 1 commit into
mainfrom
codex/task-creation-cleanup
Oct 22, 2026
Merged

sidneyswift merged 1 commit into
mainfrom
codex/task-creation-cleanup

Conversation

@sidneyswift

@sidneyswift sidneyswift commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

When schedule creation rejects or returns no usable ID, a newly inserted task row currently remains even though creation failed. Attempt to delete only that new row before rethrowing the original failure. A cleanup failure is logged without replacing the scheduling error.

This is the separate cleanup slice of original #291; the cron parser fix is already released in #1100 and unchanged. Preserve current error identity/text instead of the old patch's new prefix. Successful results, time zone forwarding, auth, ownership, plan/cadence and worker behavior remain unchanged. Existing isolated tests mock the newly imported database helper.

This is best-effort local cleanup, not a transaction with Trigger. A network rejection/missing response ID does not prove no remote schedule was created; no unknown schedule is located/deleted. Initial insert/plan failures and failures saving the returned schedule association retain existing behavior. No historical repair, migration, new worker/job, dependency, billing or model change.

Validation: baseline 249 tests/37 files; new red fixture four failed/five passed; all nine cleanup tests green. Broader tasks/MCP/plans/scheduler/contracts suite: 483 passed/61 files. Lint and changed formatting pass. Whole-project TypeScript retains the same 207 pre-existing diagnostics byte-for-byte. Independent review at the exact head: no actionable Spec or Standards findings. Fresh CI: 7,372 tests passed/15 skipped; 1,301 files passed/13 skipped; response-contract type check, lint, format, compatibility and Vercel preview all passed. No live database delete, provider schedule/job, customer action, paid operation or manual deployment was performed.

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
api Ready Ready Preview Oct 22, 2026 2:27am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: recoupable/api/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4c1e82a6-765d-48e8-a715-b8a020be943c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview — 67e7ff16 Deployed Oct 22, 2026 by vercel[bot]
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