Repository navigation
fix(app)/test: list the injected bench provider model in the composer picker - #4738
Conversation
…e first-launch default Since 51c0ab9 (#4608) a fresh desktop boots into its default "OpenWork Chat" workspace, so createAndSelectWorkspace(app, { path }) no longer passes through /welcome and adopts that workspace instead of the bench folder carrying the witness provider in opencode.json. The engine then never sees bench-witness and "Bench Model listed in picker" can only pass by racing the persisted active-workspace id. Ask for the folder explicitly with create: true.
…or is observable The completion milestone reads the sidebar row's per-session loading indicator, which only renders at desktop width. On a runner whose window manager tiles new windows (observed: Amethyst squeezed the eval Electron to a 195x1029 viewport) the sidebar never mounts and the first send never counts as complete. Emulate the 1280x900 viewport the benchmark is meant to measure, as the other layout-sensitive specs already do.
…ion creation Since b4ed5f4 (#4577) the sidebar New task control opens the workspace's empty composer immediately and the session is created by the first send, so no ses_ id can appear in the route on click and the old "new session route" wait could never resolve. Readiness is now the empty New task route with no session surface and a prompt-ready composer; the send that follows must land in a session no earlier turn used, which keeps the distinct-session claim.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 (12887 ms), confidentiality-review (9332 ms), spec-provenance-review (66410 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 (c31785b0d00fc90a8638815a33e01e75640b827c). 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 |
…-status flip on reload (#4797) * fix(app): seed a created session's snapshot so its composer can send immediately A freshly created session had no cached snapshot, so deriveSessionRenderModel reported "switching" while the first snapshot round trip ran and the composer disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside it was silently dropped with the draft intact. Seed the snapshot cache from the create response (stale, so the real fetch still runs as a background refresh). * fix(app): let a send that settled with a server failure recover instead of wedging A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but the hold it created could never end: the acceptance check treated absence as no evidence, Stop refused while the admission was unknown, and the failure body was dropped, so the person saw a paused composer with no explanation. - Keep the settled response body on PromptAdmissionUnknownError and show it as the session error card right away; the hold still prevents any resend. - readPromptAdmission: after the exact-message GET misses, list the idle conversation; when native lists it without the message the POST is settled and did not admit, so the drain receives admission_rejected and halts like any definite failure (explicit retry only, never an automatic resend). - On release the pending row is removed and the submitted composer is kept as an unsent message to restore; on confirmed acceptance the stale failure card is cleared. * test(evals): read an empty Lexical composer as an empty draft Lexical keeps one empty paragraph in an empty editor, which innerText reports as "\n". readComposerState now drops that trailing line break so draftText matches what the person sees; user.see("composer", { text }) already trimmed. * test(evals): open the fresh conversation through the sidebar's New session button The sidebar button was renamed from "New task" to "New session" in #4491 (Sep 5) and the "new" scenario added in #4631 (Sep 8) still targeted the old label, so it could never find the button. Same user action, current label. * test(evals): open sidebar New session as the empty composer in workspace-engine-upgrade Since #4577 the sidebar New session controls open the workspace's empty New task composer at once and the session is created by the first send, so waiting for a ses_ route on click never resolves. Re-express the three sidebar steps: the click lands on the empty New task route without a session surface and a prompt-ready composer; the send must land in a session no earlier turn used (same claim shape as bench-openwork-app-v1 in #4738). Palette steps still create their session up front. * fix(app): send the New task prompt under v2 chat routing The empty New task composer creates its session on submit and hands the prompt over through a scoped auto-send mark. The mark was keyed with the workspace's default endpoint URL (always /opencode), while the session surface under OpenCode v2 routing owns the session as /opencode2, so the lookup missed and the prompt silently vanished: the person landed on an empty new session. Key the mark with the endpoint that created the session (createRouteSessionWithEndpoint), which is the URL the surface will own it under. * test(app): reproduce the snapshot owner flip after a v2 session reload The surface mounts under the v1 URL before chat routing resolves; the owned read 404s, parks for its retry, and the routing flip changes the owner while it is in flight. The read rejects with 'Session snapshot owner changed' and the (workspace, session) query never refetches, so the transcript stays empty. * fix(app): re-read a session snapshot when its owning endpoint changes The snapshot query is keyed on (workspace, session) with retry off on the desktop loopback path. When chat routing resolves to /opencode2 after boot (or the draft scope resolves once identity verifies) while the owned read is in flight, the read rejects with 'Session snapshot owner changed' and nothing refetched, leaving the error card over an empty transcript. Cancel the doomed read and refetch under the new owner; a bare invalidate would only join the in-flight promise because the first load has no data yet.
… the composer recovers (attachment-upload-loading-state) (#4811) * fix(app): seed a created session's snapshot so its composer can send immediately A freshly created session had no cached snapshot, so deriveSessionRenderModel reported "switching" while the first snapshot round trip ran and the composer disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside it was silently dropped with the draft intact. Seed the snapshot cache from the create response (stale, so the real fetch still runs as a background refresh). * fix(app): let a send that settled with a server failure recover instead of wedging A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but the hold it created could never end: the acceptance check treated absence as no evidence, Stop refused while the admission was unknown, and the failure body was dropped, so the person saw a paused composer with no explanation. - Keep the settled response body on PromptAdmissionUnknownError and show it as the session error card right away; the hold still prevents any resend. - readPromptAdmission: after the exact-message GET misses, list the idle conversation; when native lists it without the message the POST is settled and did not admit, so the drain receives admission_rejected and halts like any definite failure (explicit retry only, never an automatic resend). - On release the pending row is removed and the submitted composer is kept as an unsent message to restore; on confirmed acceptance the stale failure card is cleared. * test(evals): read an empty Lexical composer as an empty draft Lexical keeps one empty paragraph in an empty editor, which innerText reports as "\n". readComposerState now drops that trailing line break so draftText matches what the person sees; user.see("composer", { text }) already trimmed. * test(evals): open the fresh conversation through the sidebar's New session button The sidebar button was renamed from "New task" to "New session" in #4491 (Sep 5) and the "new" scenario added in #4631 (Sep 8) still targeted the old label, so it could never find the button. Same user action, current label. * test(evals): open sidebar New session as the empty composer in workspace-engine-upgrade Since #4577 the sidebar New session controls open the workspace's empty New task composer at once and the session is created by the first send, so waiting for a ses_ route on click never resolves. Re-express the three sidebar steps: the click lands on the empty New task route without a session surface and a prompt-ready composer; the send must land in a session no earlier turn used (same claim shape as bench-openwork-app-v1 in #4738). Palette steps still create their session up front. * fix(app): send the New task prompt under v2 chat routing The empty New task composer creates its session on submit and hands the prompt over through a scoped auto-send mark. The mark was keyed with the workspace's default endpoint URL (always /opencode), while the session surface under OpenCode v2 routing owns the session as /opencode2, so the lookup missed and the prompt silently vanished: the person landed on an empty new session. Key the mark with the endpoint that created the session (createRouteSessionWithEndpoint), which is the URL the surface will own it under. * test(app): reproduce the snapshot owner flip after a v2 session reload The surface mounts under the v1 URL before chat routing resolves; the owned read 404s, parks for its retry, and the routing flip changes the owner while it is in flight. The read rejects with 'Session snapshot owner changed' and the (workspace, session) query never refetches, so the transcript stays empty. * fix(app): re-read a session snapshot when its owning endpoint changes The snapshot query is keyed on (workspace, session) with retry off on the desktop loopback path. When chat routing resolves to /opencode2 after boot (or the draft scope resolves once identity verifies) while the owned read is in flight, the read rejects with 'Session snapshot owner changed' and nothing refetched, leaving the error card over an empty transcript. Cancel the doomed read and refetch under the new owner; a bare invalidate would only join the in-flight promise because the first load has no data yet.
Triage:
reports/e2e-red-2026-09-09/triage.md§Cluster 10 —bench-openwork-app-v1: "Bench Model listed in picker" never true within 120 s.Root cause (harness, not product; the triage hypotheses are refuted)
The composer picker and the engine are fine: with the bench folder active,
GET /providerlistsbench-witness(sourceconfig, 1 model) in <1 s, and neitherfd2868d03(#4626) nor a model-list cap is involved. The spec was simply looking at the wrong workspace.51c0ab92f(Streamline first launch and complete onboarding before desktop return #4608, Sep 8). A fresh desktop now bootstraps a default "OpenWork Chat" workspace (…/openwork-dev-data/home/OpenWork Chat) instead of landing on/welcome.createAndSelectWorkspace(app, { path })only honourspathon the/welcomebranch or withcreate: true; otherwise it adopts whatever workspace is active. The bench never setcreate, so itsopencode.json(which carries the witness provider) sat in a folder the engine never loaded. Confirmed on a live instance: the app's only workspace was "OpenWork Chat",/providerconnected: ["opencode"], picker = Zen models only. The occasional pass was a race on the persisted active-workspace id.complete: that milestone reads the sidebar row's loading indicator, and on this Mac the tiling window manager (Amethyst) squeezed the eval Electron to a 195×1029 viewport, so the sidebar never mounted. Screenshot-verified.b4ed5f47c(fix(app): open workspace New task without waiting for the engine #4577, Sep 6). Sidebar New task opens the empty composer immediately and the session is created on submit, so the spec's wait for ases_id in the route on click can never resolve.What changed (spec only, one commit each)
e1c4bf325—createAndSelectWorkspace(app, { path: workspaceAPath, create: true }).170dede1c—setViewport(app, { width: 1280, height: 900, deviceScaleFactor: 1 })right after the desktop is interactive (same pattern asresponsive-session-layout,sidebar-title-overflow-fade, the session-shell world).c31785b0d—createNewSessionnow waits for the empty New task route with no session surface and a prompt-ready composer; the send that follows must land in a session no earlier turn used (tracked inpriorSessionIds), which preserves the "distinct new session per New task" claim. Evidence prose updated to say so. No assertion loosened, no waits added.Proof
OPENWORK_EVAL_REF=c31785b0d00fc90a8638815a33e01e75640b827c pnpm evals:e2e bench-openwork-app-v1 --daytonaatc31785b0d:Same command at the previous commit (
170dede1c+ working tree ofc31785b0d) also passed (1/0/0). Before the fixes,origin/dev@c744e2d7bfailed 2 different ways across 5 runs (picker timeout, thencompletenever true).Honesty note on the placement line: this spec imports raw
desktop()from@openwork/hosts(catalog placementmanual). Single-spec--daytonasetsOPENWORK_EVAL_DAYTONA=1but neverOPENWORK_EVAL_DAYTONA_SANDBOX, soresolveHost()spawns Electron on the runner — the printedplacement: daytonais the runner's selection, not where the app ran. No Daytona sandbox was created by any run here. The triage's red runs were the same arrangement.Noticed, not touched
createAndSelectWorkspacesilently ignorespathfor every caller that omitscreatesince Streamline first launch and complete onboarding before desktop return #4608 (seed.desktop(),seed.workspace(), several specs) — they all run in "OpenWork Chat" now. Harmless for most, but a trap for any spec that writes files into its workspace path. Worth a loud check or a path comparison inevals/packages/behaviors/src/desktop-boot.ts.evals/bin/evals.mjsreportsplacement: daytonafor raw-desktop()specs that actually run locally; the single-spec--daytonalane never provisions a desktop sandbox for them.bench-openwork-app-v1writes results to$OPENWORK_BENCH_RESULTS_DIR/ tmp only; it ismanualplacement and never runs in the nightly.