docs(tasks): add trigger_lookup_failed to the Task schema - #284
docs(tasks): add trigger_lookup_failed to the Task schema#284sweetmantech wants to merge 1 commit into
Conversation
…ad as a dead schedule chat#1918
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
Contract for the
GET /api/tasksenrichment row of chat#1918. Docs lead; the api PR follows.The problem this contract fixes
enrichTaskshas four paths that all return{ recent_runs: [], upcoming: [], timezone: null }:trigger_schedule_idConsumers cannot tell #2 and #3 from #4. Observed live 2026-07-29: two tasks reported
upcoming: []whileGET api.trigger.dev/api/v1/schedules/{id}showed both schedules active with a correct cron andnextRun. The false negative was read as "this schedule is dead" and led to a duplicate task being created — a double-email risk.What changes
trigger_lookup_failedboolean on theTaskschema. True only when the Trigger lookup errored, so the enrichment fields are known to be unreliable. False when the lookup succeeded (including a legitimately empty result) or when there is no schedule id to look up.upcoming's description now states the three reasons it can be empty and points at the flag.Additive and non-breaking: existing consumers that ignore the field behave exactly as before.
Edit method
releases.jsondoes not round-trip byte-identically throughjson.load/json.dumps(verified), so this is an anchored text edit at the property boundary. Re-validated: the file parses andtrigger_lookup_failedis present onTask.properties.Merge order
This PR first, then the api implementation.
🤖 Generated with Claude Code
Summary by cubic
Add
trigger_lookup_failedto theTaskschema and clarify whenupcomingcan be empty forGET /api/tasks. This lets clients distinguish Trigger.dev lookup errors from legitimate no-run states (chat#1918).New Features
trigger_lookup_failed: true when Trigger.dev lookup errored; false when it succeeded or there’s notrigger_schedule_id.upcomingdescription to list the empty cases and referencetrigger_lookup_failed.Migration
upcomingas “dead” only whentrigger_lookup_failedis false.Written for commit 40d00f2. Summary will update on new commits.