Skip to content

test(evals): make the pooled Daytona lane honour per-spec surface isolation - #4730

Merged
yomgui merged 7 commits into
devfrom
e2e/pooled-lane-harness
Sep 11, 2026
Merged

yomgui merged 7 commits into
devfrom
e2e/pooled-lane-harness

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member

Root cause

Triage reports/e2e-red-2026-09-09/triage.md (local folder /Users/guillaume/OpenWork Chat/reports/e2e-red-2026-09-09/), Cluster 3 — Pooled Daytona lane vs. per-spec assumptions and Cluster 4 — Spec assumes runner platform. Five harness defects, no product change:

  1. hosts/src/daytona.ts#spawnChrome used one fixed /tmp/daytona-chrome-<name> profile, so a second seed.web() in one spec (signup-workspace-intent, "mobile setup") relaunched Chromium against a locked profile and never exposed CDP (502). Only visible when both Chromes share a sandbox (pooled lane).
  2. env/src/place.ts DaytonaPlacementHost#provision handed the worker's prepared sandbox to every surface, so two-daytona-desktops got the same sandbox twice by construction.
  3. scim-okta-lifecycle flips sso_connection in the testkit database, which only a local Den exposes; preview-world launches worlds that refuse borrowed infrastructure and the pooled worker exports OPENWORK_EVAL_DAYTONA_{DEN,DESKTOP}_SANDBOX.
  4. artifact-code-browser's chmod: cannot access …/restricted was not a sandbox mix-up: since Streamline first launch and complete onboarding before desktop return #4608 (51c0ab92f) a public first launch provisions and selects an "OpenWork Chat" workspace, so createAndSelectWorkspace found a selected workspace and returned it without creating the requested folder (workspace() finished in 133 ms in the failing trace vs ~9 s when it really creates). Files were written into the bootstrap workspace and the chmod hit the requested, never-created path. Race-dependent, so it also explains the CI flake on this spec since Sep 8.
  5. command-palette-pin-rename chose Meta+K from the runner's process.platform and sent it to a Linux desktop.

What changed (evals only)

  • spawnChrome stamps profile + log per spawn (<name>-<stamp>-<port>), like spawnElectron; unit test added.
  • seed.desktop({ ownSandbox: true }) → ElectronSurfaceOptions.ownSandbox → DaytonaPlacementHost#provision provisions a fresh sandbox instead of the pooled slot. Only twoDaytonaDesktopsWorld uses it (desktop b); every other multi-desktop world keeps sharing the slot.
  • journey-catalog.mjs: scim-okta-lifecycle → placement: 'local'; the spec also declares placement: "local" in its needs so a Daytona run reports the missing prerequisite instead of a bare failure. preview-world deletes the four slot overrides from process.env around its world up/down calls and restores them.
  • createAndSelectWorkspace: when a workspace is already selected, create anyway unless its reported path equals the requested one (window.__openwork.slice("route").workspaces[].path; typed in browser-globals.d.ts).
  • command-palette-pin-rename: shortcut from place.kind, as streamed-markdown-answer already does.

Proof — all at 99a56b7e98f1f63418c2e0204512621202ac6e7c (OPENWORK_EVAL_REF exported, source verified in every log)

spec lane command result
command-palette-pin-rename Daytona, single-spec pnpm evals:e2e command-palette-pin-rename --daytona 1 passed / 0 failed / 0 skipped — placement: daytona (--daytona)
signup-workspace-intent Daytona, single-spec pnpm evals:e2e signup-workspace-intent --daytona 2 passed / 0 / 0
signup-workspace-intent, artifact-code-browser, two-daytona-desktops Daytona, pooled (OPENWORK_EVAL_MAX_WORKERS=1, one prepared den+desktop slot, files run sequentially on it) OPENWORK_EVAL_MAX_WORKERS=1 pnpm evals:e2e two-daytona-desktops artifact-code-browser signup-workspace-intent --daytona signup 2 passed, artifact-code-browser 1 passed (workspace() now 10 s = real creation; restricted-folder step green); two-daytona-desktops died in provisioning of sandbox b (Daytona API 502 during source checkout, no assertion reached)
two-daytona-desktops (+ command-palette-pin-rename) Daytona, pooled re-run OPENWORK_EVAL_MAX_WORKERS=1 pnpm evals:e2e two-daytona-desktops command-palette-pin-rename --daytona 2 passed / 0 / 0 — desktop a on the prepared slot, b on its own sandbox, both deleted
scim-okta-lifecycle local (--local, local MySQL/Redis) pnpm evals:e2e scim-okta-lifecycle --local 1 passed / 0 / 0 — placement: local (--local)
preview-world Daytona, single-spec with the pooled slot overrides present (OPENWORK_EVAL_DAYTONA_DESKTOP_SANDBOX/_DEN_SANDBOX exported as placeholders; the spec never provisions through them, the guard only checks presence), Daytona CLI pinned to CI's v0.204.0 pnpm evals:e2e preview-world --daytona 1 passed / 1 failed: test 1 ("preview worlds expose Den and real Electron…", the one red in the triage) passes — the "isolated infrastructure" guard no longer fires; test 2 ("retains an exact blank published release") fails on daytona sandbox list … -p 1 → unknown shorthand flag: 'p' with CLI v0.204.0 (CI pin) and v0.210.0 alike. That test and the -p flag were added by #4713 (1e6e54c16), merged after the last nightly; it is red on dev independently of this PR.

Verdict for this PR's five defects: Passed for (1), (2), (4), (5) and for the scim-okta-lifecycle half of (3); the preview-world half is Incomplete only because of the unrelated #4713 -p regression in its second test.

Unit checks: node --test runner/*.test.ts packages/*/test/*.test.ts bin/*.test.mjs scripts/*.test.mjs → 296/297 (the one failure is packages/labs/test/mock-google.test.ts, pre-existing and unrelated). pnpm --dir evals typecheck reports no errors in touched files (the tree has pre-existing errors from unbuilt deps).

Noticed, not touched

  • preview-world test 2 uses daytona sandbox list -p <page>, which the Daytona CLI (v0.204.0 pinned in CI, v0.210.0 locally) rejects — regression from feat(preview): launch blank published desktop releases #4713, will fail the next nightly.
  • With Daytona CLI v0.210.0 the same spec's update-preview.py remote step fails (daytona exec … python3 -c non-zero); passes with v0.204.0. CLI-version sensitivity in .opencode/skills/preview-my-work/scripts/update-preview.py.
  • provisionDesktopSandbox only deletes release-owned sandboxes when a gate fails after creation; a source sandbox whose checkout gate 502s is left running (I deleted openwork-connector-b-20260910-021502-… by hand).
  • pnpm --dir evals test is red on dev before this PR: lint:layers (39 specs-use-testkit-only violations), spec-channel-ratchet (stale/increased baselines) and spec-boundary-ratchet (opencode-v2-provider-hot-inject.test.ts).
  • Evidence test-run.json records the runner worktree's gitSha rather than OPENWORK_EVAL_REF (already listed in the triage).

A second seed.web() in one spec relaunched Chromium against the same
/tmp/daytona-chrome-<name> profile, hit the profile lock and never exposed
CDP (HTTP 502 in signup-workspace-intent). Stamp the profile and log per
spawn like spawnElectron already does.
DaytonaPlacementHost handed the worker's prepared sandbox to every surface,
so two-daytona-desktops received the same sandbox twice by construction.
Add seed.desktop({ ownSandbox: true }) so a journey about two sandboxes
provisions the second one instead of borrowing the pooled slot; every
other multi-desktop world keeps sharing the slot.
…off pooled slots

scim-okta-lifecycle flips sso_connection in the testkit database, which only
a local Den exposes: register it with placement local and declare the need
so a Daytona run reports the missing prerequisite instead of failing.
preview-world launches its own worlds, which refuse borrowed
infrastructure; hide the pooled worker's slot overrides from them and
restore the environment afterwards.
… selected one

Since #4608 a public first launch provisions and selects an 'OpenWork Chat'
workspace, so createAndSelectWorkspace saw a selected workspace and returned
it without creating the requested folder (workspace() finished in 133 ms in
the pooled lane). artifact-code-browser then wrote files into that
workspace and chmod failed on the requested path. Create when the selected
workspace is not at the requested folder.
command-palette-pin-rename picked Meta+K from the runner's platform and sent
it to a Linux Daytona desktop, where the palette never opened. Choose from
place.kind like streamed-markdown-answer does.
@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 9:13pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 9:13pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 9:13pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 9:13pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit a9b667bc11fbbd28227587b37e8d8769063ab3ec · selected evidence

Open review report

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (104858 ms), confidentiality-review (130044 ms), spec-provenance-review (200523 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 3
  • Distinct heads in retained window: 3
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 3/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 10, 2026

@diff-warden diff-warden 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (99a56b7e98f1f63418c2e0204512621202ac6e7c). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9b667b
Status: ✅  Deploy successful!
Preview URL: https://8b3fb9cc.openwork.pages.dev
Branch Preview URL: https://e2e-pooled-lane-harness.openwork.pages.dev

View logs

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Resync with dev — merge commit 2bee390a9734aad3c5c2024afbe36fdfa8237aac

origin/dev (e4c5c3e3d) merged into e2e/pooled-lane-harness as a merge commit (no rebase, no force-push). PR is MERGEABLE again.

Conflict resolved

  • evals/packages/env/src/place.ts — DaytonaPlacementHost#provision: kept dev's new surface: "desktop" | "web" parameter (web sandbox provisioning from test(evals): declare web-first worlds and provision resources lazily #4762) and this PR's !options?.ownSandbox opt-out of the pooled slot. Both call sites ("desktop" from spawnElectron, "web" from spawnWeb) unchanged from dev.

Proof at the merge sha

  • Unit: node --test packages/env/test/*.test.ts packages/hosts/test/*.test.ts packages/testkit/test/*.test.ts runner/*.test.ts scripts/*.test.mjs bin/*.test.mjs → 206 passed / 0 failed / 0 skipped. pnpm --dir evals typecheck: no errors in files touched by this PR (399 pre-existing errors on dev in unbuilt sibling packages + packages/env/test/litellm.test.ts, packages/testkit/test/testkit.test.ts, neither touched here).
  • Daytona: OPENWORK_EVAL_REF=2bee390a9734aad3c5c2024afbe36fdfa8237aac pnpm evals:e2e command-palette-pin-rename --daytona
    • placement: daytona (--daytona) · [openwork/testkit] ==> source verified 2bee390a9734aad3c5c2024afbe36fdfa8237aac
    • 1 passed / 0 failed / 0 skipped (verdict: passed); sandbox openwork-connector-command-palette-pin-rename-20260910-161543-… deleted by the harness.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 10, 2026

@diff-warden diff-warden 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (2bee390a9734aad3c5c2024afbe36fdfa8237aac). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@diff-warden diff-warden 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (a9b667bc11fbbd28227587b37e8d8769063ab3ec). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Resynced with origin/dev — merge commit a9b667bc11fbbd28227587b37e8d8769063ab3ec

git merge origin/dev (at 9a60a4b59) into e2e/pooled-lane-harness; no rebase, no amend, no force-push. Signed (G).

Conflict resolved

  • evals/packages/cdp/src/browser-globals.d.ts — the slice("route").workspaces element type: both sides declare the same field set (id, name?, path?, displayName?, displayNameResolved?, loading?, error?) in different order; kept dev's ordering. Nothing dropped from either side. (evals/scripts/journey-catalog.mjs auto-merged.)

Proof at a9b667bc1

  • node --test packages/cdp/test/*.test.ts packages/testkit/test/*.test.ts (evals) → 53 pass / 0 fail.
  • Daytona OPENWORK_EVAL_REF=a9b667bc11fbbd28227587b37e8d8769063ab3ec pnpm evals:e2e command-palette-pin-rename --daytona → 1 passed / 0 failed / 0 skipped, placement: daytona, sandbox printed source verified a9b667bc1…; run sandbox deleted.

yomgui added a commit that referenced this pull request Sep 11, 2026
…rst-launch default (closes the #4608 adoption trap for every world) (#4817)

* test(evals): create the empty-session workspace at its declared tmp path

The emptySession world declared /tmp/openwork-empty-session-<ts> but
seed.workspace() adopted the existing first-launch default workspace
instead ("OpenWork Chat" under the dev profile home). On Daytona that
profile lives inside the repo checkout, so the engine merged
/workspace/.opencode/opencode.json ("permission": "allow") over the
workspace's own catch-all and composer-run-mode never saw the workspace
MCP rule take effect.

* test(evals): name the server error when a run-mode read is not 200

* fix(app): reuse the running OpenWork server when the selected workspace is server-owned

Workspaces created from the app live only in the server registry, so a
renderer reload reaches startServerWithoutDesktopWorkspace and restarted
the embedded server (and its engine) although it was healthy and already
serving that workspace. Reuse it when it is ready with the preferred
remote-access mode; only restart when nothing usable is running.

* test(evals): create the declared workspace when first launch already selected one

Since #4608 a public first launch provisions and selects an 'OpenWork Chat'
workspace inside the dev profile, which sits inside the repo checkout on both
lanes. createAndSelectWorkspace saw that selection and returned it without
creating the folder the world declared, so 68 seed.workspace() call sites ran
in a workspace whose ancestor .opencode/opencode.json ('permission: allow')
shadowed every workspace-level policy they wrote. Create when the selected
workspace is not at the requested folder; create:true keeps forcing creation.

Lifts commit 61f1089 from #4730 onto dev so it can land on its own; the
Seed.workspace contract now states the semantics.

* test(evals): make seed.session({ title }) wait until the app lists the title

seed.sessions() already renames through renameSessionAndWait and verifies the
titles are listed; seed.session() fired session.rename and returned. Running
worlds in their declared (freshly created) workspace made that gap visible:
specs clicked a sidebar row by its seeded title while the list still showed
the placeholder, so the arrangement now settles the title before handing back.
@yomgui
yomgui merged commit 9830671 into dev Sep 11, 2026
29 checks passed
yomgui added a commit that referenced this pull request Sep 11, 2026
Resolves evals/packages/testkit/src/spec/runtime.ts: both sides made the same
change to seed.session() (wait through renameSessionAndWait like sessions()) and
differed only in the comment; dev's landed wording is kept, so the merged file is
identical to dev and its per-spec surface isolation, declared-workspace creation
and lazy provisioning (#4730, #4817, #4762) are untouched.

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — a9b667bc Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — a9b667bc Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — a9b667bc Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — a9b667bc Deployed Sep 10, 2026 by vercel[bot]
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.

1 participant