Repository navigation
docs(plans): require host-independent Durable Object adapters with opt-in effect-cf and plain Workers hosts - #66
Closed
systemfsoftware-bot wants to merge 4 commits into
Closed
systemfsoftware-bot wants to merge 4 commits into
systemfsoftware-bot wants to merge 4 commits into
Conversation
…t-in effect-cf and plain Workers hosts
…ice, not planning itself
… Object adapters Adds the Planning Contract, ten implementation units in dependency order, the verification contract and definition of done to the composable Cloudflare hosts plan, resolved against the installed effect-cf, Alchemy, Effect and workers-types sources. The deferred-to-planning questions are resolved or carried to Open Questions, and the deployed wake probe remains the gate on the wake-transport choice.
Contributor
Author
|
Superseded by #67. This plan adds a second Durable Object adapter that rebuilds effect-cf's runtime, stub cache and trace context next to it. The new plan makes the change inside effect-cf instead: a host-neutral instance core, a hosted mount form, and a delegated alarm slot. The agent package then keeps one substrate and works under Alchemy and plain Workers alike. |
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.
Adds a plan for restructuring
@systemfsoftware/agent-platform-cloudflareso its Durable Object logic does not depend on one host. It holds the requirements and, as of the latest commit, the implementation plan.The Thread, scheduling, subscription and memory objects become host-independent services over plain
DurableObjectStateandEnv. Each host is an opt-in adapter: one for effect-cf, one for plain Cloudflare Workers, which also covers classes that an Alchemy bridge constructs. Neither adapter is the default, and effect-cf drops to at most an optional peer.Requirements the plan sets:
Implementation plan
The plan was resolved against the installed sources of effect-cf 0.59.0, Alchemy 2.0.0-beta.87, Effect 4.1.5 and
@cloudflare/workers-types. Its ten units, in dependency order:Findings that shaped it:
makeCallbackregistration, which can only be called while the instance is being constructed. The plain adapter's host-slot mode hands its next due time to that callback and never writes the slot itself.layerInHostwithhandleRpc, avoids effect-cf's class wrapper. It still needs effect-cf's alarm multiplexer, so the Problem Frame now says so.Every proposed test and check names the failure it catches and is held for admission. Open design questions are listed at the end of the plan.
Cross-call wake delivery is a provisional baseline. Local workerd with
nodejs_compatshowed no AsyncLocalStorage error when a fiber parked on aDeferredorLatchwas resumed by a later call, whether the parking call was still open or had returned. The resumed fibers read storage, readgetStore()and called anAsyncLocalStorage.bindfunction, and all succeeded.vitest run --project workerd test/progress-wait.test.tsalso passed 3/3. However, local workerd also runs a case that failed in deployment without error, so the plan requires a deployed probe (R18) before a wake transport is committed. That probe also measures held-wait billed duration and hibernation.Rejected alternatives:
ThreadObject.make. Both hosts are outer wrappers that create the runtime, so a host cannot be an inner Layer.No code changes.