Conversation
An outbound fetch never keeps a Durable Object in memory, even while the response body streams, and an object with no incoming request or event for 70-140 seconds is evicted. A chat turn survives because the open page holds a subscription. An autonomous investigation nobody is watching does not: running end to end locally, an unobserved pass went silent about two minutes in, with no error and no close-out, and sat until the 15-minute stale sweep marked it failed. Every alert-triggered investigation is unobserved. While a turn holds the slot, the object re-arms its alarm every 30 seconds; the alarm is the event that prevents eviction. When the alarm lands on an activation that holds the claim but is not running the turn — the object was evicted anyway, by a deploy — it releases the slot with a terminal event instead of waiting for the watchdog.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 6 of 6, draft: not yet verified end to end. Based on #903.
Why
A plain
fetch()never keeps a Durable Object in memory, even while the response body streams, and an object with no incoming request or event for 70–140 seconds is evicted (Cloudflare docs). A chat turn survives because the open page holds a subscription. An autonomous investigation that nobody is watching has nothing holding it. After #898 that is every alert-triggered investigation.Locally, an investigation started from the hub with its page never opened went silent 2m17s in, right after a batch of tool results. It raised no error, the two-minute stream idle timeout from #903 never fired, and there was no close-out. It sat until the 15-minute stale sweep marked it failed. A timer that never fires suggests the fiber itself was gone, which fits eviction.
What changes
Not verified
The confirming run did not complete. The first attempt was invalid because closing the Browser pane stopped the dev stack underneath the run. Two restarts then hung before planning, while the local Docker Postgres stopped answering queries. Before merging, run one unobserved investigation on a preview or locally and confirm it reaches
diagnosedorinconclusive, and confirm alarms fire underalchemy dev.Unit-tested against the real SQLite fake: the alarm is armed on
beginTurn, re-armed while the turn runs, not re-armed after it ends, and an orphaned slot is released on a fresh activation. Typechecks pass onapps/ai,apps/apiandapps/alerting.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.