Skip to content

test(agents): the running-flag reset test's interval can't come due again while it reads - #3439

Closed
mattzcarey wants to merge 1 commit into
mainfrom
slim/std-tests-40
Closed

mattzcarey wants to merge 1 commit into
mainfrom
slim/std-tests-40

Conversation

@mattzcarey

Copy link
Copy Markdown
Member

schedule.test.ts "scheduleEvery › should reset running flag to 0 after interval execution completes" now uses a 60 s interval instead of 1 s. Tests only, no changeset.

It failed at retry: 0 on #3406's CI (run 45969452796, "expected 1 to be 0"). The test backdates a 1 s interval, drives its alarm with runDurableObjectAlarm, and then reads the row's running flag. With a 1 s interval, the real alarm armed for the next run can fire on a slow runner between the driven run and the read. The read then sees that next run in progress. This is the alarm trap: a schedule due again during the test is a second drive. With 60 s, the next run can't come due while the test reads, and it still checks the reset after the run it drove, with the same assertions.

3/3 locally; CI runs the suite.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e9b566e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@3439

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@3439

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@3439

hono-agents

npm i https://pkg.pr.new/hono-agents@3439

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@3439

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@3439

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@3439

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@3439

commit: e9b566e

@agent-think

agent-think Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (b6862ac8 → e9b566e9, workflow run)

@mattzcarey

Copy link
Copy Markdown
Member Author

Closed under the drain rule (not next); the branch slim/std-tests-40 stays. It comes back when the open count is down.

@mattzcarey mattzcarey closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant