Skip to content

fix(app)/test: list the injected bench provider model in the composer picker - #4738

Merged
yomgui merged 3 commits into
devfrom
e2e/bench-model-picker
Sep 11, 2026
Merged

yomgui merged 3 commits into
devfrom
e2e/bench-model-picker

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member

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 /provider lists bench-witness (source config, 1 model) in <1 s, and neither fd2868d03 (#4626) nor a model-list cap is involved. The spec was simply looking at the wrong workspace.

  1. First bad commit: 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 honours path on the /welcome branch or with create: true; otherwise it adopts whatever workspace is active. The bench never set create, so its opencode.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", /provider connected: ["opencode"], picker = Zen models only. The occasional pass was a race on the persisted active-workspace id.
  2. Runner environment. Once the picker step passed, the first send never counted as 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.
  3. Intentional product change: 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 a ses_ 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 as responsive-session-layout, sidebar-title-overflow-fade, the session-shell world).
  • c31785b0d — createNewSession now 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 in priorSessionIds), 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 --daytona at c31785b0d:

selection: engine=legacy surface=legacy case=all; placement: daytona (--daytona)
 ✓ |e2e| specs/bench-openwork-app-v1.e2e.test.ts (1 test) 41185ms
{"command":"evals:e2e","lane":"e2e","daytona":true,"placement":"daytona",…,"passed":1,"failed":0,"skipped":0,"skips":[],"verdict":"passed"}

Same command at the previous commit (170dede1c + working tree of c31785b0d) also passed (1/0/0). Before the fixes, origin/dev @ c744e2d7b failed 2 different ways across 5 runs (picker timeout, then complete never true).

Honesty note on the placement line: this spec imports raw desktop() from @openwork/hosts (catalog placement manual). Single-spec --daytona sets OPENWORK_EVAL_DAYTONA=1 but never OPENWORK_EVAL_DAYTONA_SANDBOX, so resolveHost() spawns Electron on the runner — the printed placement: daytona is 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

  • createAndSelectWorkspace silently ignores path for every caller that omits create since 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 in evals/packages/behaviors/src/desktop-boot.ts.
  • evals/bin/evals.mjs reports placement: daytona for raw-desktop() specs that actually run locally; the single-spec --daytona lane never provisions a desktop sandbox for them.
  • bench-openwork-app-v1 writes results to $OPENWORK_BENCH_RESULTS_DIR / tmp only; it is manual placement and never runs in the nightly.

…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.
@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 3:10am UTC
openwork-den Ready Ready Preview Sep 10, 2026 3:10am UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 3:10am UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 3:10am UTC

@github-actions

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 (12887 ms), confidentiality-review (9332 ms), spec-provenance-review (66410 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • 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: 1/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 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 (c31785b0d00fc90a8638815a33e01e75640b827c). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 3/3 tests · 4/4 assertions · 2 images

Commit c31785b0d00fc90a8638815a33e01e75640b827c · selected evidence

Open review report

@yomgui
yomgui merged commit 176968d into dev Sep 11, 2026
27 checks passed
yomgui added a commit that referenced this pull request Sep 11, 2026
…-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.
yomgui added a commit that referenced this pull request Sep 11, 2026
… 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.

This branch was successfully deployed

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