Repository navigation
fix(cloud-agent-next): collect outcome health on the legacy 3-minute cron - #6953
Merged
Merged
Conversation
…cron Cloudflare kept firing the previous `*/3` trigger after the deploy changed it to `*/5`, and the handler's exact-string match meant the collector silently stopped running while it logged an unrecognized cron. Accept both expressions. The window already floors `scheduledTime` to 5-minute buckets, so an extra tick only repeats a bucket, which the dashboard dedupes by `windowStart`.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe change adds a Files Reviewed (2 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
approved these changes
Sep 29, 2026
This was referenced Sep 30, 2026
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
After #6906 deployed, Cloudflare kept firing the previous
*/3trigger while the newscheduled()handler matched only*/5. Every tick loggedCloud Agent scheduled handler received an unrecognized cronand ran no collection, so noagent_execution/agent_openrows were emitted and the pre-existing nestedcloud_agent_outcome_aggregatestream stopped (~13:34Z).Evidence from production: every scheduled invocation from 13:45Z through 14:06Z carries
Event.Cron = "*/3 * * * *", with no invocation at the*/5-only slots; the Cloudflare dashboard and thewrangler deploylog both show*/5, and re-adding the trigger in the dashboard did not change the firing schedule.Fix
Accept both expressions in
scheduled(). The outcome window already floorscontroller.scheduledTimeto 5-minute buckets, so an extra tick only re-emits a bucket, which the dashboard dedupes bywindowStart.This makes a stale trigger unable to silently disable collection. It does not resolve the underlying trigger/scheduler mismatch, which still needs Cloudflare-side reconciliation.
Checks
src/server.test.ts: 105 passedpnpm run lint: 0 warnings, 0 errorspnpm run format:check: cleanpnpm run typecheck(tsgo): clean