Fix scheduled trigger execution - #402
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cron and webhook trigger-created agent work could be queued but never executed. The main symptom is scheduled jobs appearing not to fire, even when the trigger configuration is enabled.
Root cause
cron-evaluateevery 30 minutes, so normal minute-level cron expressions could be missed.last_fired_at = null, so a missed first execution could stay missed until the next exact cron minute.tasks.status = pending, butclaim_next_taskonly claimsdispatchedtasks.agent_idascreated_by, butcreated_byexpects a user id.team_runs.pendingtask-status queue mismatch.Changes
evaluate-cron-triggersto run every minute.created_atas the first-run catch-up baseline whenlast_fired_atis null.dispatched, with the workspace owner ascreated_by.team_runsand waking/webhook/team-run.pending, matching the existing team-run claim path.dispatchedin migration 083.dispatchedtasks.Deployment notes
After merge:
083_fix_cron_trigger_execution.sql.cron-evaluateandwebhook-trigger.triggerScheduler.tschanges are active.app.settings.supabase_urlapp.settings.service_role_keyTASK_RUNNER_URLWEBHOOK_SECRETVerification
npm run buildnpm run buildfromtask-runner/git diff --checkKnown unrelated issue
npm run lintstill fails on an existing landing-page lint error increwform-landing/src/App.tsx; this PR does not touch that file.