Skip to content

CL-5769: Routines hardening — ownership, safe claims, failure backoff - #13

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-5769-routines-hardening-ownership-checks-safe-claims-failure
Aug 9, 2026
Merged

CL-5769: Routines hardening — ownership, safe claims, failure backoff#13
TheGreatAxios merged 2 commits into
mainfrom
cl-5769-routines-hardening-ownership-checks-safe-claims-failure

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Definition ownership enforced on routine and webhook-trigger create (404 when not in tenant).
  • Claims refuse deleted and dead-lettered rows; due list excludes dead-letters.
  • Launch failures: markFailedFire records schedule-failed, exponential backoff, dead-letter after 5 consecutive failures.
  • Shared launch+correlate helper — correlation failure after success fails loud (no silent orphans).
  • Operator recovery: re-enable / trigger edit clears failure counters and dead-letter.

Test plan

  • bun test packages/routines apps/hub/test/routine-scheduler.test.ts packages/webhook-triggers (81 pass)
  • tsc clean for routines, webhook-triggers, hub
  • Manual: create routine with foreign definitionId → 404; force launch failures → backoff then dead-letter

Closes CL-5769

Close CL-5769. Definition ownership is enforced on routine and webhook-
trigger create (404 when the definition is not in the request tenant).
Claim refuses deleted and dead-lettered rows. Launch failures no longer
restore nextFireAt immediately — markFailedFire records a schedule-failed
run, applies exponential backoff, and dead-letters after five consecutive
failures. Launch and correlation share one helper so a silent orphan is
impossible; correlation failure after a successful launch fails loud.
@TheGreatAxios
TheGreatAxios merged commit b494df2 into main Aug 9, 2026
2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-5769-routines-hardening-ownership-checks-safe-claims-failure branch August 9, 2026 07:09
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