Repository navigation
fix(cron): keep quiet trigger checks out of chat - #188594
Conversation
Preserve quiet trigger outcomes in internal event context so their terminal skipped events do not post false run-failure notices. Keep genuine unstarted notices, queue settlement, and completion webhooks intact.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR prevents successful trigger checks that skip their payload from posting an automation-failure notice or advancing conversation recency. Example: A due automation named Release readiness returns { fire: false } from its trigger.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a source-confirmed quiet-trigger regression with a focused change; no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe cron scheduler finalizes committed outcomes and passes terminal events through the Gateway to conversation notifications and completion webhooks. flowchart TD
A[Due queued automation] --> B[Trigger evaluation]
B --> C[Committed cron outcome]
C --> D[Terminal event and internal context]
D --> E[Gateway notification owner]
E --> F[Genuine failure conversation notice]
E --> G[Completion webhook]
Technical reviewBest possible solution: Preserve the producer's quiet-trigger fact in existing transient context and suppress only the false conversation notice. Do we have a high-confidence way to reproduce the issue? Current-main source traces fire:false through a skipped queued terminal event into the conversation writer, corroborated by the linked real-Gateway recency failure; no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete repair: the scheduler owns the quiet decision, the existing callback carries it, and the notification owner preserves silence without changing public events or terminal accounting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 31dd96f37ffa. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +68, Other +2. Total +72 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 30, 2026, 2:19 PM ET / 18:19 UTC. |
|
Merged via squash.
|
* fix(cron): keep quiet trigger checks out of chat Preserve quiet trigger outcomes in internal event context so their terminal skipped events do not post false run-failure notices. Keep genuine unstarted notices, queue settlement, and completion webhooks intact. * test(cron): assert job identity in alert fallback
* fix(cron): keep quiet trigger checks out of chat Preserve quiet trigger outcomes in internal event context so their terminal skipped events do not post false run-failure notices. Keep genuine unstarted notices, queue settlement, and completion webhooks intact. * test(cron): assert job identity in alert fallback (cherry picked from commit 5f15db7) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes an unwanted “Automation did not start” message and conversation-recency update when a queued automation checks its trigger and correctly decides there is nothing to run. This regressed with #188513 and surfaced in the Quiet Automation real-Gateway scenario on #188546.
User Impact
Quiet trigger checks continue updating their checked time without adding a chat message or moving the conversation. Genuine skipped and unstarted failures still notify the owner.
Why This Change Was Made
The scheduler already knows whether a successful trigger check intentionally skipped the payload. Carry that fact in the existing transient event context so the notification owner can preserve the quiet result. The terminal event still settles queued runs and records history; completion webhooks retain their existing behavior. No public event schema or persisted data changes.
Current head
Merged current
main(7f14e11f7f7ea5cd79005d2547327f150b0499eb) into the branch once, producing780849a5cb021ddd2d5ff4d4d7b27d1b9fd57380. The complete eight-file PR diff is byte-identical to the reviewed prior head; all seven existing owner/test inputs are unchanged on main. No additional production or test change was made.Main supplies the separately landed Stop-history fix (#188631), sidebar startup synchronization (#188603), phone composer layout fix (#188605), and measured test-line ceiling correction (#188620). The Logs renderer is independent of this fix; its separate repair is not a production dependency.
Exact-head review/preparation and the next
ci:fullrun are pending. The historical checks below are retained source proof, not a claim that the newly integrated head has passed CI.Retained evidence
Compared against
83064b3ae1155f0c6c96081c863e7db4bd4451f4using Node 26.12.1 and the default pinned Bun test runtime. Focused baseline proof retained the new tests while restoring only the four production files to the base.quietTriggercore-test-services-cronandcore-test-gateway-serverpassed, 6.82 s wall568006c75cf; 36.27 s, both real-Gateway shards passed83064b3ae1155f0c6c96081c863e7db4bd4451f4; 72.48 s wall including cold test-owned bundleThe prior branch CI 41108916997 failed the shared test-line ceiling plus Stop history, sidebar startup polling, phone composer layout, and Chromium 390px Logs wheel reachability. These failures are retained explicitly; the new head needs fresh CI. The earlier Subagents geometry failure passed one unchanged-assertion local diagnostic but was never classified as inherited from that pass.
Scheduled main 41098750962 independently fails the same quiet-trigger
updatedAtassertion at line 462. PR CI also exposed a stale exact-call expectation in the existing cron fallback test:enqueueCronNotificationalready carriesjobIdsince #188105. The correction asserts that identity explicitly without loosening the owner checks or changing production code.The local notification test covers the real notification dispatcher with persistence and network I/O mocked. The existing end-to-end test remains the proof of Gateway forwarding and conversation recency. No local run of the Quiet Automation browser scenario was performed. Its prior exact-head CI run is the retained end-to-end proof.
Production LOC across touched owners: 2,605 → 2,607 (+2). Test LOC in the originally touched test files: 1,194 → 1,262 (+68), plus five lines in the existing fallback assertion. The 73-line allocation covers the producer fact, quiet-versus-genuine-failure regression, and that existing job-identity contract.
Focused commands and guard disposition
node scripts/run-vitest.mjs src/gateway/server-cron-notifications.test.ts --maxWorkers=1 node scripts/run-vitest.mjs src/cron/service/ops.regression.test.ts --maxWorkers=1 OPENCLAW_E2E_SKIP_BUILD=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/cron/cron-delivery-outcomes.e2e.test.ts --maxWorkers=1 node scripts/run-tsgo-core-test-shards.mjs --ci-graphs-json '["core-test-services-cron","core-test-gateway-server"]' --concurrency 1The first normal commit attempt was refused with:
Forwarding the existing typed internal context in its existing slot removes that growth. No guard or line-cap baseline was bypassed.