Skip to content

test: cover recovery after forced Durable Object eviction#1820

Merged
mattzcarey merged 9 commits into
mainfrom
feat/eviction-api-test-poc
Jul 17, 2026
Merged

test: cover recovery after forced Durable Object eviction#1820
mattzcarey merged 9 commits into
mainfrom
feat/eviction-api-test-poc

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Test-only coverage for recovery after a running Durable Object is explicitly evicted with evictDurableObject() / evictAllDurableObjects().

  • verifies volatile instance state is dropped while SQLite and Durable Object storage are retained
  • covers Agent state, schedules and fibers; Session active-leaf reconstruction; MCP startup/session restoration; AIChat history, streams and WebSockets; Codemode durable replay; Workspace; Think startup/recovery; and Voice history
  • keeps a live AIChat WebSocket usable across forced eviction and separately covers { webSockets: "close" }
  • adds no runtime code or changeset

Scope

This proves selected reconstruction paths after forced eviction. It does not prove natural idle hibernation, timer absence, hibernation eligibility, or duration-billing suspension.

Related to #1956; does not fix it. The test helper bypasses the eligibility gate, so a passive workerd/vitest-pool API is still needed to detect timer-pinned actors without waking or forcibly evicting them.

Verification

  • pnpm run build
  • pnpm run check
  • CI=true pnpm exec nx affected -t test --base=origin/main --parallel=3

@changeset-bot

changeset-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 321b953

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

Comment thread packages/agents/src/tests/experimental/memory/session/provider.test.ts Outdated
@pkg-pr-new

pkg-pr-new Bot commented Jun 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

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

@cloudflare/ai-chat

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

@cloudflare/codemode

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

create-think

npm i https://pkg.pr.new/create-think@1820

hono-agents

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

@cloudflare/shell

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

@cloudflare/think

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

@cloudflare/voice

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

@cloudflare/worker-bundler

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

commit: 321b953

@mattzcarey
mattzcarey force-pushed the feat/eviction-api-test-poc branch from 23b545e to 321b953 Compare July 17, 2026 11:34
@mattzcarey mattzcarey changed the title POC, testing with the eviction API test: cover recovery after forced Durable Object eviction Jul 17, 2026
@mattzcarey
mattzcarey marked this pull request as ready for review July 17, 2026 11:35

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@mattzcarey
mattzcarey merged commit e906760 into main Jul 17, 2026
8 checks passed
@mattzcarey
mattzcarey deleted the feat/eviction-api-test-poc branch July 17, 2026 13:02
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.

2 participants