Repository navigation
feat(den): add the cloud runtime provider contract and move the sandbox bootstrap out of the Daytona module - #4444
Conversation
Deploying openwork with
|
| Latest commit: |
58f2312
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://db2dc114.openwork.pages.dev |
| Branch Preview URL: | https://feature-cloud-runtime-contra.openwork.pages.dev |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (83d4c49ff3534edf93ea7ed807d38c143149278e). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
|
@OmarMcAdam Please review this cloud-runtime stack before merging. The PR explicitly reports incomplete live Cloud lifecycle journey proof; confirm the bootstrap move and runtime coverage. Related PRs are #4445 and #4446. Holding for your review under the current merge instructions. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (fd28ff971816f35c42ccf0288d4e318736042c6e). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
fd28ff9 to
4a24ba4
Compare
…ox bootstrap out of the Daytona module Introduce @openwork-ee/cloud-runtime, the provider-neutral contract every OpenWork Cloud sandbox host implements: capability descriptor, normalized sandbox state and error taxonomy, opaque provider references, exec with logs, endpoint with expiry, and storage attachment. The package also owns the OpenWork bootstrap and checkpoint shell script as a renderer over an explicit config, an in-memory fake provider, and a runner-agnostic conformance suite that any provider must pass before Den can select it. The Daytona provisioner now renders its start, flush, checkpoint-probe, and restore-marker commands through the package. The rendered scripts are byte-identical to the previous inline templates; no runtime behavior changes. The Den API image copies the new workspace package so its production build can verify the default export targets.
4a24ba4 to
58f2312
Compare
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (58f23127b28dca50ab4457d2f9837ded28237e7a). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Test evidence — first-cloud-task-provisions-once-over-mcp-preserves-access-boundaries-and-runs-w — ✅ passedSHA 58f2312 · engine v1 ✅ passed · 6 expectations passed · 0 failed · 0 pending
verdict passed · 0 user observations · 0 probes · steps 0/0 ℹ️ ASSERTION — 1. Paid access is checked before provisioningA valid write token in an organization without Web access was denied; zero worker rows and zero provider creates.
ℹ️ ASSERTION — 2. Only a valid write-scoped create can allocate a workspaceRead-only create, invalid input, read, and send allocated no workers and made no provider creates.
ℹ️ ASSERTION — 3. Concurrent first requests share one provisioning attemptSix MCP create calls returned retryable provisioning with no submitted session; one worker row and one Daytona HTTP create were observed, before any browser endpoint was called.
ℹ️ ASSERTION — 4. Retry runs the first task without browser setup, and the browser reuses its workspaceThe real provisioner observed healthy HTTP, persisted ready state, and the MCP retry created one native session with the original prompt. A subsequent browser request reused that ready workspace without another sandbox.
ℹ️ ASSERTION — 5. Members get distinct workspacesA second member's first call created a different worker and sandbox without creating a session on the first member's runtime.
ℹ️ ASSERTION — 6. Lapsed paid access blocks new work even with an existing workspaceAfter the seeded subscription was canceled, the same token was denied and session, worker, and sandbox counts remained unchanged.
Test run created 2026-09-06T00:04:07.436Z · Source: |
Current verification — September 5
Verification verdict: Passed for the hermetic runtime regression. Exact head:
58f23127b28dca50ab4457d2f9837ded28237e7a. The stack is based ondev@d9f7e12ad. This section supersedes the historical verification below..github/changes anywhere in the stack; existing repository CI and review rules are unchanged.pnpm evals:pr specs/remote-session-first-use.test.tsindependently on this exact head: 1 passed, 0 failed, 0 skipped. The matching test-evidence comment has been updated, rather than reusing the previous head’s result. The three layers have 6, 10 and 11 passing assertion artifacts respectively.pnpm --filter @openwork-ee/den-db testagainst isolated MySQL passes 31/31 with zero skips, including seeded backfill, unchanged rollback rows and full migration replay.Keep the original human-review hold and merge order #4444 → #4445 → #4446. Retarget and refresh each child after its parent lands. No merge or deployment is included in this update.
Stack
dev)endpointKind: feat(den): store Cloud instances in a provider-neutral table and tell clients how endpoints behave #4446 (base feat(den): run Cloud instances through the runtime contract with Daytona as an adapter #4445)Merge bottom-up; each layer carries its own checks. After #4444 merges, retarget #4445 to
dev; after #4445 merges, retarget #4446 todev.Summary
@openwork-ee/cloud-runtime, the provider-neutral contract every OpenWork Cloud sandbox host implements: capability descriptor, normalized instance states, error taxonomy (RuntimeProviderErrorcodes instead of message matching), opaque provider references, exec with logs/exit codes, endpoint with expiry, storage attachment.workers/daytona.tsinto a renderer over an explicit config (renderOpenWorkBootstrapCommand,renderCheckpointFlushCommand, probe/marker commands). The Daytona provisioner now renders through it; the rendered scripts are byte-identical todev(sha256 compared for the start and flush commands).sandboxProviderConformanceCases) that any future host must pass before Den can select it.Why
Scope
ee/packages/cloud-runtime(contract, bootstrap renderer, testing utilities).ee/apps/den-api/src/workers/daytona.tsdelegates script rendering to the package.packaging/docker/Dockerfile.dencopies the new package; lockfile importer added.Out of scope
Testing
Ran
ee/packages/cloud-runtime:pnpm typecheck,bun test src(renderer + conformance against the fake, incl. a stable-endpoint variant)ee/apps/den-api:pnpm exec tsc -p tsconfig.json --noEmit;bun test --conditions development test/daytona-provisioning.test.ts test/daytona-checkpoint-command.test.ts test/cloud-lifecycle.test.ts test/cloud-runtime-access.test.ts test/cloud-instance-route.test.ts test/worker-runtime-signed-preview.test.ts test/cloud-failure.test.ts;pnpm testbuildOpenWorkStartCommand/checkpointFlushCommandoutput for a fixed env before and after;cmpidentical.Result
testscript 24/24; rendered scripts identical.CI status
Manual verification
bun --conditions development -ea script that importsee/apps/den-api/src/workers/daytona.tswithDAYTONA_*env set and printsbuildOpenWorkStartCommand(...); compare withdev.pnpm --filter @openwork-ee/cloud-runtime testandbuild; confirmdist/{contract,bootstrap,testing}exist.pnpm --filter @openwork-ee/den-api run build:workspace-dependenciesthen the export check inscripts/build.mjsreports no missing production exports for the new package.Evidence
evals/specsjourney drives the Cloud instance lifecycle (every spec runs Den with the stub provisioner), so there is no exact-head testkit tape to attach. Behaviour preservation rests on the byte-identical rendered scripts and the unit suites above. No Daytona API call changes in this PR.Risk
Rollback
daytona.tsreturns to its inline templates. No data or config changes.