fix(cron): explicit cron wakes bypass heartbeat quiet-hours gate (#105413)#105830
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 4:06 PM ET / 20:06 UTC. Summary PR surface: Source +6, Tests +32. Total +38 across 2 files. Reproducibility: no. high-confidence live reproduction was supplied for this updated head. The source path and added regression scenario make the quiet-hours branch reproducible by inspection, but they do not prove an after-fix gateway cron payload reaches a real agent turn. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Provide redacted real gateway evidence that a main-session Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was supplied for this updated head. The source path and added regression scenario make the quiet-hours branch reproducible by inspection, but they do not prove an after-fix gateway cron payload reaches a real agent turn. Is this the best way to solve the issue? Yes, provisionally: carrying the resolved wake source through heartbeat resolution, quiet-hours gating, preflight, and event logging is narrower and less drift-prone than a separate cron-only bypass. Real runtime proof is still needed before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1626a1696c60. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +6, Tests +32. Total +38 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
Co-authored-by: jindongfu <[email protected]>
7efab2b to
4652c6d
Compare
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
Fixes #105413
What Problem This Solves
Main-session cron jobs execute through the heartbeat runner. Before this change, that transport also inherited
heartbeat.activeHours, so an explicit cron wake outside the heartbeat window returnedquiet-hoursbefore reading the queued cron payload. The job was silently skipped even though heartbeat scheduling policy does not own cron execution.Why This Change Was Made
The rewrite normalizes the wake source once, before heartbeat override resolution and policy gates. Explicit and reason-inferred cron wakes then use the same source for heartbeat configuration, active-hours admission, preflight prompt selection, and persisted outcome metadata.
Ordinary scheduled heartbeats still obey active hours. Cron still uses the existing tagged-event prompt, delivery, busy-lane, and event-consumption paths; only the heartbeat scheduling-window gate is bypassed.
This replaces the original patch on current main. It preserves @SymbolStar's diagnosis and contributor credit while integrating the newer targeted-notification gate and replacing a weak
not quiet-hoursassertion with a full queued-event execution test.User Impact
Recurring or one-shot
sessionTarget: main/payload.kind: systemEventjobs now run their actual payload outside heartbeat active hours. Inside and outside the window, the model receives the cron-event prompt instead of a generic heartbeat poll.Evidence
ran;cron-event;check:changed: production/test types, lint, format, boundaries, import cycles, database-first guard, and related checks passed.Co-authored-by credit is preserved for jindongfu. AI-assisted maintainer rewrite; I reviewed the active-hours gate, wake-source inference, preflight prompt selection, main-session cron caller, event consumption, and sibling wake paths.