Repository navigation
test(evals): create the declared workspace instead of adopting the first-launch default (closes the #4608 adoption trap for every world) - #4817
Conversation
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.
…ce 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.
…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.
… files of #4747 modified here
…e 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Warden review summary — ClearNative 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 (23226 ms), confidentiality-review (21778 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (d2497413278c68a7ad1e8f74188b023366098146). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Change verification — Daytona lane, head
|
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
Deploying openwork with
|
| Latest commit: |
5af76f9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://07e021a3.openwork.pages.dev |
| Branch Preview URL: | https://e2e-world-workspace-adoption.openwork.pages.dev |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (5af76f92c5d2ad4c4a715409198b83391cabac9d). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Resynced with
|
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (8ec4ade8ee9c6cb8c042042af1f6ef52a480cd91). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Follow-up: #4747's product commit removed from this branch — head
|
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.
Harness follow-up to #4747 / #4798 (their "Noticed, not touched" default-workspace items) and to the pooled-lane finding in #4730. Closes the #4608 default-workspace adoption trap for every
seed.workspace()caller instead of one call site at a time.Stacked on
origin/e2e/workspace-permission-reload(#4747) via a merge commit; none of its files are modified here. See "Rebase order" for why.Root cause
Since #4608 (
51c0ab92f) a public first launch provisions and selects an "OpenWork Chat" workspace under the dev profile'sopenwork-dev-data/home. That profile lives inside the repo checkout on both lanes (/workspace/.openwork-daytona/...on Daytona,evals/results/.surfaces/<pid>/...locally), so OpenCode's config walk merges the repo's.opencode/opencode.json("permission": "allow") after the workspace file.createAndSelectWorkspace(app, { path })returned whatever workspace was already selected unless the caller passedcreate: true, soseed.workspace(app, seed.tmpPath(...))silently ran the spec in that in-repo default folder. Every workspace-levelpermission/policya world wrote was shadowed; the claims held only because the repo config happened to allow the same things (#4747 root cause, #4798 root cause (a), #4730 defect 4).What changed (evals only, 3 files)
evals/packages/behaviors/src/desktop-boot.ts— when a workspace is already selected,createAndSelectWorkspacenow reads itspathfrom the product's route slice and creates the requested folder unless the selected workspace already sits there.create: truekeeps forcing creation. This is commit61f108942from test(evals): make the pooled Daytona lane honour per-spec surface isolation #4730 lifted ontodevso it can land on its own (that PR is approved but conflicting); identical content, so whichever of the two lands second sees an empty hunk.evals/packages/cdp/src/browser-globals.d.ts— typespathon the route slice's workspaces (already published byuse-workspace-route-state.ts).evals/packages/env/src/seed.ts— theSeed.workspacecontract states the semantics.Nothing in
evals/worlds/**orevals/specs/**changes: the 68 call sites below start doing what their briefs declare without a per-site flag, andchat.ts/desktop.tsstay untouched so #4798 and #4747 do not conflict.Why the harness default rather than flipping call sites
seed.workspace()calls adopt; 64 of those declare a tmp path. Adding{ create: true }to each is a 64-line noisy diff that conflicts with fix(app): apply per-session bash 'ask' permission and withdraw orphaned permission requests after Stop #4798 (splitPaneQuestions) and fix(server): make workspace permission changes reach the engine's effective permissions (composer-run-mode) #4747 (emptySession), and the next world author falls into the same trap.seed.desktop({ den, as, workspacePath })andapp()indesktop-app.ts(/tmp/openwork-<as>-<ts>) route through the same function and were equally exposed; only the behavior-layer fix covers them.workspaceIdForPath(resolve(folderPath)), existing entry replaced), the server reportsresolve()d paths (no realpath, so/tmp/...compares equal on macOS), and creating a workspace at an existing folder writes no files (ensureOpencodeConfigis a read).Enumeration (
seed.workspace(inevals/worlds/**andevals/specs/**ate925c7c99)74 calls: 6 already pass
create: true(browser-panel ×2, models-analytics, session-shellworkspaceNewTask, chatworkspaceEngineUpgradesecond workspace, cross-workspace-split-view spec); 68 adopted.Declared tmp path, adopted the default (64) — now create their declared folder:
chat.tsemptyChat216,paletteSessionActions223,splitPaneQuestions239 (→delegatedQuestionHandoff,permissionStopRecovery,restartUpdateTaskWorld,newSplitPrimary,sessionSubmitErrorIsolation),focusContinuity478,attachmentUpload609,renderCycle706,streamedToolHistory780,streamedMarkdown872,clampHtml1055,queuedDrainAway1194,queuedSequential1294,crossWorkspace1397/1402,markdownArtifact1426,mermaidChat1439,safeEdit1495,sessionErrorCard1522,snapshotFailure1648,longHistory1680,taskActivity1712,unfinishedTools1720,computerMentions1771,visualization1835,workspaceEngineUpgrade1876 (primary),skillLifecycle1900spec.worldaliasesfirst-run.tsappSmokeWorld76,workspaceWorld173 (→sessionWorld,parentChildPermissionWorld,scopedPermissionRefreshWorld, …),unconfiguredNotificationWorld410,backgroundUpdateWorld1203,revokedUpdateWorld1310workspaceWorldconsumerlibrary.tsconnectStateProvenance234,preseededConnect295,connectorBranding359,libraryConnectorDiscovery416,librarySessionRestore440,libraryAdvancedRefresh460,libraryAuthoringRoutes487,libraryMcpConnectError544,localManagedMcp593,connectionActionMcpApp1036,skillCreatedMcpApp1106,mcpAppInlineHost1214,remoteMcpApps1390session-shell.tsoneWorkspace580,sidebarOverflow593,sidebarExpansion601,sidebarWorkspaceTitles640,pinnedSessions1351,archiveActiveSessions1448,archiveSessions1823,externalSessionVisibility1987,crossWorkspaceSessions2303,settingsRuntime2326,activeSessionStorm2536,workspaceOrder2573desktop.tsemptySession6 (alreadycreate: truein #4747, merged here)desktop-policies.ts97,dashboard-launch-input.ts153,saved-apps.ts115,chat-stream-continuity.ts84,session-switch-latency.ts160,infra.ts49/50,specs/new-task-draft-return.e2e.test.ts8Explicitly declare the repo workspace (4) — stay explicit, now get exactly that folder:
library.tslibraryConfigReadBudget509,librarySignedInStability561,libraryStateTabs580 (repoRoot),first-run.tsskillsLocalWorld357 (app.workspaceRoot). None has a spec consumer today. Note for whoever revives them:repoRootinlibrary.tscarries a trailing slash, so it never string-equals the server'sresolve()d path; creation is idempotent, but if that repo-root workspace were already selected the "created workspace selected" wait would time out loudly rather than adopt.Rebase order
e2e/workspace-permission-reload) first — this PR is stacked on it. Without itsdesktop-runtime-bootfix, a workspace that exists only in the server registry makes thelocation.reload()insideconfigureProvider(used by everysplitPaneQuestionsworld) restart the embedded server and engine; observed on004c2e73e(this fix on plaindev):session-error-technical-detailstest 2 andparent-child-permission-approvaltest 4 got past their send gates in the correct workspace and then found no session rows in the sidebar (Could not locate {"text":"Independent task B"}/"Delegated question parent"). Same runs on the stacked head are green (see Proof).61f108942(becomes empty). fix(app): apply per-session bash 'ask' permission and withdraw orphaned permission requests after Stop #4798 rebases cleanly (no shared files); itscreateWorkspaceopt-in insplitPaneQuestionsbecomes redundant and can go in a follow-up.Proof
Lane: Daytona (
--daytona,placement: daytona, fresh sandboxes per surface,OPENWORK_EVAL_REFexported andsource verifiedin every log; all sandboxes deleted). Command shape:OPENWORK_EVAL_REF=<sha> pnpm evals:e2e <spec> --daytona. Spec files reached by the foursplitPaneQuestionsworlds Z4 named plus the plain-desktop worlds they share files with.At the PR head
d24974132:background-desktop-updatebackgroundUpdateWorld,revokedUpdateWorld(plainseed.desktop()+ tmp path — the trap's main shape) andrestartUpdateTaskWorld(splitPaneQuestions) all run in their declared/tmp/openwork-*workspace.parent-child-permission-approvalscopedPermissionRefreshWorld→workspaceWorld, plain desktop) passed. Test 2 (permissionStopRecovery) now gets past spec line 137 —bashasks for permission because the world'spermission: { bash: "ask" }finally reaches the engine — and fails at line 150 (native interruption cleanup removes the pending permission), the product gap #4798 fixes (its root cause (b)). Test 3 fails at line 75 (runningTreatmentVisible: false), the pre-existing Cluster 2 shimmer regression. Test 4 (delegatedQuestionHandoff) runs through sidebar navigation, reload and delegation in the created workspace and fails at line 354 (Child checklistbutton still visible after Stop + follow-up), the product gap #4786 fixes.session-error-technical-detailssessionErrorCard) passed. Test 2 (sessionSubmitErrorIsolation) fails atthe selected task can send … runEnabled:false— identical to the cleanorigin/devcontrol ate925c7c99(Cluster 1).new-split-session004c2e73e, first commit)expected 212 to be close to 213at line 135 — identical failure on the cleanorigin/devcontrol ate925c7c99. Not re-run at the head; nothing in this PR touches sidebar geometry.Controls on a clean
origin/devworktree ate925c7c99(OPENWORK_EVAL_REF=e925c7c99, Daytona):new-split-session0/1 (same assertion),session-error-technical-details1/2 (samerunEnabled:falsegate),parent-child-permission-approval1/4 — test 1 passed; test 3 fails at line 75 (Cluster 2, same as head); test 4 fails at line 354 (Child checkliststill visible, same as head, #4786); test 2 fails at line 137 (Timed out after 45000ms seeing text=printf OTHER_PERMISSION_WITNESS— bash ran without asking because the world'sbash: asknever reached the engine), whereas on this PR head the same test passes line 137 and reaches line 150. That line-137 → line-150 shift is the trap closing.Diagnostic (not committed, run at
193b8f1a0): a throwaway spec onnewSplitPrimarydumped the route slice after the world — three workspaces present (…/openwork-dev-data/home/OpenWork Chat,/tmp/openwork-admin-<ts>fromapp(), and the declared/tmp/openwork-new-split-session-<ts>selected, its two seeded sessions listed) — and showed the seeded title still rendering asNew session - <iso>right afterseed.session({ title })returned. That race caused one-offCould not locate {"text":"<seeded title>"}failures insession-error-technical-detailstest 2 (004c2e73e),parent-child-permission-approvaltest 4 (004c2e73e) andbackground-desktop-updatetest 3 (193b8f1a0); the second commit settles it in the arrangement and none of the head runs hit it.Verdict: Passed for the claim of this PR (worlds run in the workspace their brief declares, proven by the workspace-policy step of
parent-child-permission-approvaltest 2 turning from "silently allowed" into "asks", and bybackground-desktop-update3/3 and the passing tests above). Remaining red tests are pre-existing product gaps with open fixes (#4786, #4798, Cluster 1, Cluster 2) or the pre-existingnew-split-sessiongeometry assertion, each matched by adevcontrol or cited PR above.Unit/typecheck:
pnpm --dir evals exec tsc -p . --noEmit→ 399 errors before and after, none in the touched files.Publication: the nine head-matching test runs are rendered in one PR comment via the legacy per-run publisher (
--publish --test-run <dir> --dry-run, one section per test, traces and step verdicts included). The review-app report could not be uploaded from this machine:OPENWORK_REVIEW_BLOB_TOKENexists only as a GitHub Actions secret, and the InfisicalBLOB_READ_WRITE_TOKENis a public-store token the review app rejects (Cannot use private access on a public store). Someone with the private-store token can publish the same runs withOPENWORK_REVIEW_URL=<repo var> BLOB_READ_WRITE_TOKEN=<private> pnpm evals:e2e --publish --pr 4817 --all; the test-run directories are named in that comment.Noticed, not touched
new-split-sessionis red ondevindependently of this change:AssertionError: other conversations use the plus space: expected 212 to be close to 213at spec line 135, identical on a cleanorigin/devworktree ate925c7c99(pnpm evals:e2e new-split-session --daytona,OPENWORK_EVAL_REF=e925c7c99, 0 passed / 1 failed) and on this branch. Sidebar row geometry — Cluster 8 / fix(app): keep sidebar rows anchored during Show more and restore title overflow state #4737 territory.parent-child-permission-approvaltest 3 (runningTreatmentVisible: false) is the pre-existing Cluster 2 shimmer regression (e2e/delegated-task-shimmer), unrelated to workspace arrangement.session-error-technical-detailstest 2 ondevfails earlier than here (the selected task can send ... runEnabled:false, Cluster 1); on this head it passes that gate, so this PR is also the first green run of that test since Sep 9 that I know of.source resolve gate,source checkout gate) during the first round, re-run rather than diagnosed.pnpm --dir evals typecheckreports 399 pre-existing errors, none in the three touched files (same count before and after).