Repository navigation
test(evals)+fix(app): align desktop-policy-restricted-mode with the simplified Library add flow - #4741
Conversation
Base UI keeps a closing Dialog mounted until its exit animation ends, so the Library add picker and the Add workspace MCP modal stayed visible for the 100 ms fade-out after Escape. Hide the overlay and popup with data-closed:hidden (entrance motion unchanged), matching the AlertDialog and command palette fix.
…e-delivered Since #4718 the desktop pushes its Den session twice per launch or reload (identity, then sync). Each PUT bumped the managed-policy generation, so any enforcement check in flight failed with 409 policy_identity_changed even though the account never changed; the restricted member's opencode-config write came back 409 instead of the policy's 403. Bump the generation only when the baseUrl, token, or orgId actually differ.
…sence The dropdown menu has no exit motion, yet its unmount is still a React commit away from the Escape key event; on Daytona the first notSee inspection landed 33 ms later while the menu was still mounted. Follow command-palette-search: wait for the menu popup to leave the DOM, then hold the strict absence window.
|
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 (24660 ms), confidentiality-review (26153 ms), spec-provenance-review (32345 ms), desktop-den-sync-review (22348 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 (3b896f5a8750c4101d4a4dbca8de4c5773616203). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
|
Passed · 3/3 tests · 4/4 assertions · 2 images Commit |
Root cause
Triage Cluster 6 / Brief G in
reports/e2e-red-2026-09-09/triage.md("Library add options changed; restricted-mode spec drifted") reporteddesktop-policy-restricted-modered at lines 93 (Addunder the MCPs filter) and 552 (text=Organization MCP) after #4645 simplified the Library add flow.That red was a runner/ref mismatch, not a spec drift on
dev: the "dev baseline" run executed the spec file from the runner's worktree (feat/api-quality-spectral@ea1e9546e, which mergeddevat 10:21 -0400) against a sandbox built fromdev@61b41901c.devhad already re-expressed the spec in05b9fe2b3(#4664, 08:47 -0700, commit "test(policy): align Library checks with current add controls"):Add workspace MCPsingle-kind button under the MCPs filter,Local MCPabsent from the picker andConnectionretained under restriction, noOrganization MCP. Line 93/552 with those texts only exist in the spec before #4664. No Library claim needed re-expressing; the product (libraryAddKindsForFilter,LibraryAddControl) matches the spec.Running the spec pinned to
origin/dev@c744e2d7b(runs 1–2,OPENWORK_EVAL_REFset, sandboxsource verified c744e2d7b…) showed the Library claims pass and exposed three other failures that block this spec ondev:press("Escape")→ immediatenotSee(...)on the Library add picker (library-add-choices, spec lines 310/839) and theAdd workspace MCPmodal (App nametextbox, line 102): the plainDialogkeeps its 100 msdata-closed:animate-out fade-out-0exit motion, so the popup is still visible onassertAbsent's first inspection. Same class as Cluster 7 / fix(app): close the restart prompt and command palette synchronously on dismiss #4724, which fixedalert-dialog.tsxandcommand.tsxand explicitly leftdialog.tsxout of scope (its "Noticed, not touched" Add engine doctor + guided OpenCode install #3). 3 of 4 dismissals lost the race across two runs.POST /workspace/:id/opencode-configby the restricted member returned 409policy_identity_changedinstead of the policy's 403 (line 1082, a policy-enforcement assertion). Since fix(desktop): recover credentials before engine readiness #4718 (1c455cfab, merged after fix(server): retry transient managed policy verification failures #4664's green proof) the desktop pushes the same Den session twice per launch/reload/resume (PUT /den-session/identitythenPUT /den-session); every push bumpedManagedDesktopPolicy.generation, so any enforcement check in flight failed with 409 although the account never changed.press("Escape")→ immediatenotSee(menuitem Account)on the account dropdown (line 276). The menu already hasanimate-none!; its unmount is still a React commit away from the CDP key event and the first inspection landed 33 ms later.What changed
apps/app/src/components/ui/dialog.tsx— dismissal hides the overlay and popup in the same frame (data-closed:hidden, exit motion removed, entrance motion unchanged), mirroring fix(app): close the restart prompt and command palette synchronously on dismiss #4724.apps/server/src/managed-desktop-policy.ts—setSessionbumps the generation only whenbaseUrl,token, ororgIdactually differ, so re-delivering the same identity no longer invalidates in-flight policy checks. Unit witness added tomanaged-desktop-policy.test.ts(fails without the fix:1 fail; passes with it:8 pass).evals/specs/desktop-policy-restricted-mode.e2e.test.ts— afterEscapeon the account menu, observe the popup leaving the DOM (probe.eventually, bounded) before the unchanged strictnotSee(..., { timeoutMs: 10_000 }), followingcommand-palette-search.e2e.test.ts:103-109. No policy-enforcement assertion was loosened; no sleeps added.Proof
pnpm evals:e2e desktop-policy-restricted-mode --daytonawithOPENWORK_EVAL_REF=3b896f5a8750c4101d4a4dbca8de4c5773616203(sandbox log:HEAD is now at 3b896f5a,source verified 3b896f5a8…):Steps 10/10, 7/7, 8/8; expectations 9 + 7 + 43 passed, 0 failed. Library witnesses observed: "Before the policy change the member can open the local workspace MCP add form", "The Library removes local MCP creation while retaining Connection as a separate picker choice" (×3), "Direct config and extension requests cannot bypass the restricted member's UI" (403/403/200). Vision judgments deferred (default
vision: defer). All 8 sandboxes deleted by the testkit.Earlier runs on this branch, same command:
c744e2d7b(dev) → 2 passed / 1 failed (line 839 race), then 1 passed / 2 failed (lines 102, 839);3086f1315(dialog fix only) → 1 passed / 2 failed (line 276 menu race; line 1082409 ≠ 403).Also:
pnpm --filter openwork-server test src/managed-desktop-policy.test.ts8 pass;pnpm --dir apps/app typecheckandpnpm --filter openwork-server typecheckexit 0.This branch is based on
c744e2d7band merges cleanly onto currentdev(which added a 4th rollback journey to this spec in #4725, not exercised here).Noticed, not touched
OPENWORK_EVAL_REFin the sandbox but runs the spec files from the local checkout; nothing warns when the two differ, andtest-run.jsonrecords the runner worktree'sgitSha(this run:c744e2d7bcorrectly only because the worktree matched). A warning whenOPENWORK_EVAL_REF≠ localHEAD(and recording the ref) would have made Brief G a non-issue.assertAbsentthrowing on the first inspection makes everypress → notSeeon any popup a race with one React commit, even without exit motion (item 3 above). fix(app): close the restart prompt and command palette synchronously on dismiss #4724 and this PR narrow the window component by component; a harness semantic of "becomes absent within a bound, then stays absent" would remove the class.press("Escape")followed directly byclick("Library")at spec line 821 (team journey) has the same latent race but is not asserted; it passed in all 4 runs.daytona-e2e.ymlnightly atc744e2d7bfailed in theProduct journeysjob before running any journey, so there is no nightly evidence for this spec on currentdev.