⚛️ Atomically publish Workspace effects - #415
Conversation
PR #415: ⚛️ Atomically publish Workspace effects26 files, +3081 / -116 Scope🔴 PR has 3197 lines changed. Split into focused PRs. 🟡 3197 lines changed. PRs under 400 receive more thorough review. 🟡 26 files changed. Are all changes related? 🟡 Changes span 7 directories. 🟡 PR mixes config and source changes. Structural🟡 Interface declarations with no consumers: WorkspaceCoordinationApi.
Oxlint structural signals:
Slop✅ Slop indicators look low. Static AnalysisOxlint: 18 diagnostics across 6 files (8 rules) no-unused-private-class-members (4): packages/durable-streams/guard.ts, packages/workflow/src/deno/connections.ts CorrectnessFILE: packages/durable-streams/guard.ts FILE: packages/durable-streams/effect.ts FILE: packages/durable-streams/effect.ts FILE: packages/workflow/src/deno/workspace/filesystem.ts FILE: packages/workflow/src/deno/workspace/effect.ts FILE: packages/workflow/tests/workspace-effect-transaction.test.ts No extraneous code patterns detected. |
Why
Issue #365 requires one live Workspace expansion to publish its filesystem mutation, immutable root, current-root pointer, and durable Yield through one caller-owned WorkflowRun transaction. This is slice 6 only and does not close #365.
Exact base: aa47442
What changes
Before:
Workspace roots, transaction fences, durable coordination, and explicit journal routing existed as separate private foundations. No Deno provider coordinator joined them into one atomic live Workspace effect.
After:
The Deno adapter binds an authorized Workspace proof effect to its exact WorkflowRun database and guarded journal identity. A successful mutation, retained root, current pointer, filtered Yield, and commit become visible together. Known domain failures retain the prior root and commit one failed Yield. Infrastructure failures and cancellation roll back the outer transaction and publish nothing.
How it works
Infrastructure failure activates the existing durable fail-stop boundary and preserves the first failure identity. Cancellation is never serialized as a durable failed Result.
Review guide
Start with: packages/workflow/src/deno/workspace/effect.ts and packages/workflow/tests/workspace-effect-transaction.test.ts
Then review:
Look carefully at:
What must stay true
How to verify it
Scope
Included
Intentionally unchanged
New abstractions
The infrastructure-failure continuation extends live durable coordination so a provider can activate the existing fail-stop state without runtime-specific knowledge in durable-streams.
Opaque publication identity proves the selected guarded journal without exposing stream capabilities.
createWorkspaceProofEffect is an adapter-private proof seam and is not the public filesystem effect.
Each new abstraction has multiple concrete uses or a clear justification.
No speculative functionality is included.
Risks and limitations
Scope confirmation