Skip to content

test(cron): model a completed delivery in the once stream composition test - #208309

Merged
obviyus merged 1 commit into
mainfrom
red-cron-stream
Nov 29, 2026
Merged

obviyus merged 1 commit into
mainfrom
red-cron-stream

Conversation

@obviyus

@obviyus obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Scheduled CI run 46257208997 fails src/cron/service.stream-validation.test.ts › "composes a final batch and rotates source identity when a once trigger disables the stream": expected true to be false at the enabled check.

#208193 made a once trigger disarm only when the whole run completes successfully (completionStatus === "succeeded"), so a failed required delivery keeps the watcher armed. This test's job uses the default announce delivery, but its mocked agent run returns { status: "ok" } with no delivery outcome. The run's delivery status is therefore unknown, completion is not succeeded, and the watcher correctly stays armed.

Fix

Test-only. The mocked run now reports delivered: true, which models the completed run the test means. The subject (final batch composition, disable and source-identity rotation) is unchanged. No product code changes.

Why main went red

#208193's PR CI selected changed-file tests only. Its node lanes ran service.trigger-eval.test.ts and other cron tests, but never this file, which reaches timer-trigger.ts only through CronService. The scheduled full run was the first to execute it.

Evidence

… test

#208193 disarms once triggers only on a succeeded completion; the mocked run reported no delivery outcome for its default announce delivery.
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@obviyus
obviyus merged commit 4bd7eaf into main Nov 29, 2026
99 checks passed
@obviyus
obviyus deleted the red-cron-stream branch November 29, 2026 13:07
@obviyus

obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Landed. #208193 made a once trigger disarm only after a succeeded completion. This test's mocked run reported no delivery outcome for its default announce delivery, so the watcher correctly stayed armed. The mock now reports delivered: true. It was red on main (1 of 12 failed) and is green with the fix (12/12). CI was green and the local review had no findings.

tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 83b977a2-cda5-47cf-a092-b7b9110d7b84

(cherry picked from commit 39d230c)

Release adaptation: Apply the upstream #208309 test-only companion: a successful default announce in the once-stream composition must report delivered=true.

Companions: Included fixture fix-up from 4bd7eaf (#208309); broad UI/Doctor PR-number matches are unrelated.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
… test (openclaw#208309)

## What Problem This Solves

Scheduled CI run 46257208997 fails `src/cron/service.stream-validation.test.ts` › "composes a final batch and rotates source identity when a once trigger disables the stream": `expected true to be false` at the `enabled` check.

openclaw#208193 made a once trigger disarm only when the whole run completes successfully (`completionStatus === "succeeded"`), so a failed required delivery keeps the watcher armed. This test's job uses the default `announce` delivery, but its mocked agent run returns `{ status: "ok" }` with no delivery outcome. The run's delivery status is therefore `unknown`, completion is not `succeeded`, and the watcher correctly stays armed.

## Fix

Test-only. The mocked run now reports `delivered: true`, which models the completed run the test means. The subject (final batch composition, disable and source-identity rotation) is unchanged. No product code changes.

## Why main went red

openclaw#208193's PR CI selected changed-file tests only. Its node lanes ran `service.trigger-eval.test.ts` and other cron tests, but never this file, which reaches `timer-trigger.ts` only through `CronService`. The scheduled full run was the first to execute it.

## Evidence

- origin/main: this test fails (1 failed, 11 passed).
- With the fix: 12/12 pass.
- Parent of openclaw#208193: the original test passes (12/12), and the updated test also passes there.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant