Skip to content

fix(cron): keep quiet trigger checks out of chat - #188594

Merged
steipete merged 3 commits into
mainfrom
solid2/w-quiet-notice-repair-1030
Oct 30, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-quiet-notice-repair-1030

Conversation

@steipete

@steipete steipete commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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, producing 780849a5cb021ddd2d5ff4d4d7b27d1b9fd57380. 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:full run 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 83064b3ae1155f0c6c96081c863e7db4bd4451f4 using 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.

Check Result
Baseline notification regression Failed as expected: quiet trigger wrote one conversation result instead of zero; genuine unstarted skip/error cases passed
Baseline queued-trigger regression Failed as expected: terminal event context lacked quietTrigger
Full notification test file 26 passed; 52.39 s Vitest / 59.01 s wall
Full cron regression test file 11 passed; 24.72 s Vitest / 30.20 s wall
Relevant type graphs core-test-services-cron and core-test-gateway-server passed, 6.82 s wall
Targeted format and lint Passed; one wrapping correction applied
Test-line ratchet Passed initially; allocation updated to +73 LF for the five-line existing job-identity assertion correction
Independent review Managed Codex review through P2: scoped-clean; no actionable findings on the final code and allocation
Real-Gateway Quiet Automation scenario Passed in CI 41103370964 on 568006c75cf; 36.27 s, both real-Gateway shards passed
Existing fallback assertion on baseline Both exact CI failures reproduced on 83064b3ae1155f0c6c96081c863e7db4bd4451f4; 72.48 s wall including cold test-owned bundle
Corrected fallback assertion Full six-case file passed; 64.76 s Vitest / 74.06 s wall

The 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 updatedAt assertion at line 462. PR CI also exposed a stale exact-call expectation in the existing cron fallback test: enqueueCronNotification already carries jobId since #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 1

The first normal commit attempt was refused with:

Line-cap ratchet rejects new violations or growth:
  src/gateway/server-cron.ts: 986 -> 987 counted lines (cap 700). Extract a coherent sibling module; never trim coverage or disable max-lines.
[line-cap-ratchet] FAILED (exit 1)
[pre-commit] line-cap growth ratchet failed (pnpm check:line-cap-ratchet). Fix: move new code or tests to a sibling file.
[pre-commit] Freshness checks failed. Apply the reported fix, restage and retry.
[pre-commit] FAILED (exit 1)

Forwarding the existing typed internal context in its existing slot removes that growth. No guard or line-cap baseline was bypassed.

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.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T20:54:38.060901Z 780849a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Oct 30, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@steipete
steipete enabled auto-merge (squash) October 30, 2026 18:14
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The queued run posts “Automation did not start” and moves its conversation.
  • After: The check remains quiet while terminal settlement, check freshness, and existing completion-webhook behavior remain intact.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch has no identified defect and useful regression coverage, but the supplied evidence does not satisfy the required real-behavior proof gate.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A successful condition check announces that the automation failed to start and makes an unchanged conversation look active.
Reason: The maintainer-authored direction restores documented intentional silence while retaining notices for genuine failures and existing completion delivery.

Regression provenance

Regression provenance — verified: source commit 32bff6b57b79 by Peter Steinberger; canonical PR #188513 (blame-to-merge-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
Reviewed head: 568006c75cfb39a321aeadebca4a7637a62354be

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide an inspectable after-fix Gateway trace showing a due fire:false check preserves conversation messages and recency while advancing Checked; redact credentials, IPs, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Unstarted-run conversation notices keeps the original intent (32bff6b: Make accepted runs that genuinely cannot start visible in their owning conversation through the canonical result writer.)
  • Quiet queued terminal events keeps the original intent (64400ff: Keep terminal accounting and recovery worker-owned while publishing committed results; queued quiet checks still need terminal settlement.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 32bff6b adds src/gateway/server-cron-notifications.ts:583 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 32bff6b57b79; files: src/gateway/server-cron-notifications.ts)
  • Ayaan Zaidi: Raw commit 8100c60 adds src/gateway/server-cron-notifications.ts:110 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8100c6008860; files: src/gateway/server-cron-notifications.ts)

PR surface

Source +2, Tests +68, Other +2. Total +72 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 10 8 +2
Tests 2 69 1 +68
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 7 81 9 +72

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +10/-8 lines; tests +69/-1 lines The small production change reuses existing owners; regression growth covers producer context, intentional silence, genuine failures, and retained webhooks.

Labels

Label changes:

  • add P2: False failure notices and conversation-recency changes affect queued condition checks, while payload execution and durable settlement remain functional.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: False failure notices and conversation-recency changes affect queued condition checks, while payload execution and durable settlement remain functional.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 30, 2026, 2:19 PM ET / 18:19 UTC.

@steipete
steipete disabled auto-merge October 30, 2026 18:40
@steipete
steipete merged commit 5f15db7 into main Oct 30, 2026
131 of 134 checks passed
@steipete
steipete deleted the solid2/w-quiet-notice-repair-1030 branch October 30, 2026 21:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
* 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
tideclaw-bot pushed a commit that referenced this pull request Nov 5, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Keep ordinary native-locale CI selection on the next PR run. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant