Skip to content

fix(sessions): repick unavailable models with explicit session scope - #4979

Merged
yomgui merged 24 commits into
devfrom
feat/model-unavailable-repick-scope
Sep 17, 2026
Merged

yomgui merged 24 commits into
devfrom
feat/model-unavailable-repick-scope

Conversation

@yomgui

@yomgui yomgui commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Re-pick an unavailable model for this session or a confirmed set of all matching idle, unarchived sessions in the workspace, from the composer UI or headlessly through session.set_model / session.rebind_model. Choices persist locally for the next send; stale headless sends fail before writing a prompt. Bulk changes require the exact confirmed preview IDs, and single-session repair remains usable when bulk inventory is unavailable.

This does not automatically re-bind sessions in cloud-provider-sync, change global defaults, send prompts, or immediately rewrite engine bindings. It does not restore an unavailable original binding or lock the engine against another actor. The migration root cause remains open: durable old-to-new model identity/provenance mapping and automatic migration remain separate follow-up work.

Context

Originally stacked on #4955; now based on dev after its squash merge. The merge preserves #5014/#5063 archive verification and transport behavior plus the regenerated SDK. Headless means no navigation or focus change; model selection still requires the existing renderer host.

Review-driven repairs bound model mutations using the mailbox request age, require authoritative engine-idle verification and final local checks, enforce same-unavailable-model bulk scope, and remove misleading undo claims. Existing server-wide collaborator/owner authority is preserved; this does not introduce per-session creator ownership. English count-aware strings use the existing locale fallback policy.

The integration also preserves legacy empty sync result/ownership shapes, retains nonempty removal work for retry, and exports built affordance JavaScript to packaged Node runtimes. Archive regression fixtures now provide their unrelated model-catalog context; archive production behavior is unchanged. Design: P1/P2 compact state and title-only dialog, P5 shared controls, C7 structured model/provider options, P10 screenshots. Explicit bulk confirmation follows the requested scope-safety contract.

Screenshots

All four images are from the isolated testkit Electron v1 run at c21fc368b2f2072f50772993bc658bdd51c63c47, using synthetic sessions, normal UI controls and fresh reloads. No capture of the operator's running app. These reference images explain assertion-backed behavior; they do not decide pass/fail.

Session composer — before replacement: unavailable model, preserved draft, disabled send.
Session composer — unavailable model before replacement

Re-pick dialog — default “This session only” scope, with the matching-session alternative visible.
Re-pick dialog — this session scope

Re-pick dialog — explicit all-affected scope previews the two matching unarchived sessions before saving.
Re-pick dialog — all affected sessions scope and preview

Session composer — after this-session confirmation and reload: replacement selected, draft preserved, no prompt sent.
Session composer — replacement persisted after reload

Verification — local

Final head: c21fc368b2f2072f50772993bc658bdd51c63c47. Inspect all 40 testkit records and 82 passed assertions.

  • Root/app, evals and server typechecks: exit 0. pnpm exec node scripts/i18n-audit.mjs --ci: exit 0.
  • App units: 56 passed. Server units/integration: 144 passed.
  • session-model-repick.test.ts: 26 passed; removal-sync: 7; aliases: 1.
  • Archive deadline, archive transport, archive mailbox and real server-route authorization specs: 1 passed each.
  • Isolated Electron repick and pinned-archive journeys: 1 passed each. Repick separately confirms the one-session choice and a two-session bulk change.
  • Human-grade review (agent-assisted): scope, safety, authorization, return path, i18n, revert-fails and archive preservation reviewed.
  • Revert-fails control removes the archived exclusion and makes the scope assertion fail; restored before final proof.

All final-head commands and assertion details are in the evidence comment. Zero failures/skips in these runs. Toolchain: mise pnpm 11.4.0, Bun 1.4.0, Node 24.20.0. Local lane explicitly allowed. Assertion evidence uses the documented PR-comment fallback: private review upload was unavailable because the available token targets a public Blob store. Only the reviewed synthetic screenshots above were uploaded publicly via upload-photo.

Exercise the real replacement option and default single-session scope without sending or persisting a selection before confirmation. Preserve the draft and inspect isolated engine sessions and transcripts.

Runtime proof is incomplete at 2efe900: the bulk preview shows zero matches instead of target and peer because the workspace uses /tmp while engine directories use /private/tmp. Keep the failing assertion and directory evidence; do not canonicalize the fixture to bypass the defect. Post-confirmation local override persistence remains unverified.

Exact local E2E: OPENWORK_EVAL_ELECTRON_RESOURCES_PREPARED=1 pnpm evals:e2e session-model-repick --local --engine v1 --surface electron (mise PATH). Result: 0 passed, 1 failed, 0 skipped. Full static checks also report out-of-scope diagnostics: 1 eval type error, 52 layer violations, 4 browser diagnostics.

Signed-off-by: Guillaume Loret <[email protected]>
Wait for the auto-opened repick dialog rather than racing its appearance with an obsolete model-name button lookup. Capture both real scope options through testkit after clean reloads, with unchanged-state assertions before confirmation.

Local Electron v1 with Bun 1.4.0, Node 24.20.0 and pnpm 11.4.0: 1 passed, 0 failed, 0 skipped. Runtime proof covers scope preview, local next-send overrides across reload, unchanged engine sessions/transcripts/defaults, and excluded sentinels. Screenshots are supplemental and visually inspected; automated vision was unavailable without an Infisical login.

Full static checks still report out-of-scope diagnostics: 1 eval type error, 52 layer violations, and 4 browser-check diagnostics. No production or lockfile edits.

Signed-off-by: Guillaume Loret <[email protected]>
@vercel

vercel Bot commented Sep 14, 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 16, 2026 11:22pm UTC
3 Skipped Deployments
Project Deployment Actions Updated
openwork-den Ignored Ignored Preview Sep 16, 2026 11:22pm UTC
openwork-diagnostics Ignored Ignored Preview Sep 16, 2026 11:22pm UTC
openwork-landing Ignored Ignored Preview Sep 16, 2026 11:22pm UTC

@yomgui

yomgui commented Sep 14, 2026 •

Copy link
Copy Markdown
Member Author

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

Commit c21fc368b2f2072f50772993bc658bdd51c63c47 · selected evidence

Open review report

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3b75449
Status:🚫  Build failed.

View logs

@yomgui

yomgui commented Sep 16, 2026 •

Copy link
Copy Markdown
Member Author

Final-head local verification

Head: c21fc368b2f2072f50772993bc658bdd51c63c47. Base: dev; conflicts resolved by merge, no rewritten history.

Passed: 40/40 testkit tests; 82/82 recorded assertions. Zero skipped tests.

Commands (all exit 0 on this head):

pnpm --filter @openwork/types build
pnpm typecheck
pnpm evals:typecheck
pnpm --filter openwork-server typecheck
pnpm exec node scripts/i18n-audit.mjs --ci
pnpm --dir apps/app exec bun test --isolate tests/composer-model-controls.test.ts tests/session-model-catalog.test.tsx tests/model-picker-modal.test.ts tests/control-focus-bound-composer.test.tsx
pnpm --dir apps/server exec bun test --isolate src/opencode-plugins/openwork-extensions-preview.test.ts src/opencode-plugins/openwork-provider-adapters.test.ts src/cloud-provider-sync.e2e.test.ts
pnpm evals:pr specs/session-model-repick.test.ts
pnpm evals:pr specs/session-model-removal-sync.test.ts
pnpm evals:pr specs/session-model-aliases.test.ts
pnpm evals:pr specs/session-archive-deadline.test.ts
pnpm evals:pr specs/session-archive-transport.test.ts
pnpm evals:pr specs/session-archive-mailbox.test.ts
pnpm evals:pr specs/agent-ui-context-via-server.test.ts
pnpm evals:e2e session-model-repick --local --engine v1 --surface electron
pnpm evals:e2e session-archive-pinned --local

App units: 56 passed; server units/integration: 144 passed. mise pnpm 11.4.0 / Bun 1.4.0 / Node 24.20.0. Local lane expressly allowed for this mission. Pinned-archive uses the existing legacy world contract, executed locally (not skipped).

Private review upload failed because the available Blob token targets a public store. No private report was uploaded publicly. This is the documented assertion-section comment fallback; original receipts remain in the isolated worktree. Reviewed synthetic screenshots are hosted via upload-photo and embedded in the PR body. Reference screenshots carry no visual pass/fail claim.

Review repairs and controls

  • Mutations share a four-second budget that includes mailbox queue age, fail closed on unreadable authoritative engine activity, and recheck local pending/working/held/selection state immediately before saving.
  • Bulk requires the exact confirmed session set and the same unavailable provider/model. Single repair does not depend on successful bulk inventory. No engine binding is written by repick.
  • Real server-route proof rejects unauthenticated/viewer rebind requests and admits collaborator/owner relay under existing server-wide authority.
  • Revert-fails: temporarily removing the archived exclusion, building types, then running pnpm evals:pr specs/session-model-repick.test.ts -t "repick previews effective bindings" exited 1 because session_archived entered the scope. The filter was restored before this commit; all final-head tests pass. The 21 deselected tests in that deliberate control were not counted as passed.
  • The archive harness dependency failure reproduced at clean base c502b87 (6 passed/20 failed, missing DesktopConfigProvider). Only unrelated model-provider fixture mocks were repaired; final archive deadline/transport/mailbox and pinned Electron specs now pass.
  • The older packaged Node source-TS import failure was reproduced with Node --preserve-symlinks and fixed by exporting built affordance JS to Node while retaining source exports for development/Bun/browser.

Original final-head records and assertions

Retained checkout: /Users/guillaume/Dev/openwork-model-repick-2. Source assertions: https://github.com/different-ai/openwork/tree/c21fc368b2f2072f50772993bc658bdd51c63c47/evals/specs

pinned idle sessions archive from the sidebar and mailbox without a focused session; held preflight fails promptly without a late PATCH and recovers

Outcome: passed. Created: 2026-09-16T23:24:09.518Z.
Receipt: evals/results/test-runs/2026-09-16T23-24-09-517Z-pinned-idle-sessions-archive-from-the-sidebar-and-mailbox-without-a-focused-sess/test-run.json.

  • Pinned archive completes without a focused conversation
    • passed: Pinned archive completes without a focused conversation — Owning-engine archive persisted, sidebar row disappeared, unrelated sessions stayed idle/unarchived, no abort or dialog, route and surface list stayed sessionless.
  • Pinned cross-workspace archive completes through the real mailbox
    • passed: Pinned cross-workspace archive completes through the real mailbox — HTTP 200; elapsed 574.3227499999994 ms; persisted archive, no unrelated mutation, no navigation or dialog.
  • Unpin then archive also succeeds
    • passed: Unpin then archive also succeeds — Candidate changed pinned:true to pinned:false, then archived through the UI with no focused conversation; unrelated sessions were preserved.
  • Held preflight fails through the requesting channel before five seconds
    • passed: Held preflight fails through the requesting channel before five seconds — HTTP 200; elapsed 3604.1250839999993 ms; verification_failed; zero additional PATCHes or session mutations, pin retained.
  • No late PATCH and no restart needed for mailbox recovery
    • passed: No late PATCH and no restart needed for mailbox recovery — Released preflight stayed inert for two seconds. A new request on the same app/mailbox completed in 484.4899580000056 ms with exactly one successful PATCH; unrelated sessions and route unchanged.

unavailable composer repick defaults to this session, previews all, and saves only confirmed local scope without sending

Outcome: passed. Created: 2026-09-16T23:23:10.360Z.
Receipt: evals/results/test-runs/2026-09-16T23-23-10-359Z-unavailable-composer-repick-defaults-to-this-session-previews-all-and-saves-only/test-run.json.

  • Isolated engine session identities are readable
    • passed: Isolated engine session identities are readable — {"workspacePath":"/tmp/openwork-repick-current-1789601011654","otherWorkspacePath":"/tmp/openwork-repick-other-1789601009562","sessions":[{"sessionId":"ses_f5377a62bffejRMU1m0sxZ8KJ9","directory":"/private/tmp/openwork-repick-current-1789601011654"},{"sessionId":"ses_f53779f4cffeg3Q3PpAsgrtwA8","directory":"/private/tmp/openwork-repick-current-1789601011654"},{"sessionId":"ses_f53779868ffeK00gT5ZohGFB8w","directory":"/private/tmp/openwork-repick-current-1789601011654"},{"sessionId":"ses_f5377915cffejwkHEOmr4aLMcX","directory":"/private/tmp/openwork-repick-current-1789601011654"},{"sessionId":"ses_f5377ae5affekAPr3JeEMeV7nk","directory":"/private/tmp/openwork-repick-other-1789601009562"}]}
  • Choosing a real replacement option does not send or persist it
    • passed: Choosing a real replacement option does not send or persist it — The real Models combobox displayed the clicked option and This session only was the sole checked scope. Every local override, default, engine session and transcript stayed unchanged, and the target draft remained intact before confirmation.
  • Single-session repick is explicit and device-local
    • passed: Single-session repick is explicit and device-local — The real composer preview listed only two matching unarchived sessions. Confirming the default scope changed only the target override; the draft, engine sessions, transcripts and defaults remained unchanged after reload.
  • All-scope repick excludes archived, unrelated-model and other-workspace sessions
    • passed: All-scope repick excludes archived, unrelated-model and other-workspace sessions — Explicit all-scope confirmation changed both matching sessions (target and peer) in one UI action. Every engine session and transcript stayed identical; archived, unrelated-model and other-workspace local overrides and defaults were preserved, with no prompt sent.
  • Supplementary screenshot: unavailable composer repick defaults to this session, previews all, and saves only confirmed local scope without sending artifact 2; 0 visual judgments.
  • Supplementary screenshot: unavailable composer repick defaults to this session, previews all, and saves only confirmed local scope without sending artifact 4; 0 visual judgments.
  • Supplementary screenshot: unavailable composer repick defaults to this session, previews all, and saves only confirmed local scope without sending artifact 5; 0 visual judgments.
  • Supplementary screenshot: unavailable composer repick defaults to this session, previews all, and saves only confirmed local scope without sending artifact 6; 0 visual judgments.

the in-app agent reads renderer context through openwork-server and gets an explicit result without a window

Outcome: passed. Created: 2026-09-16T23:23:03.004Z.
Receipt: evals/results/test-runs/2026-09-16T23-23-03-003Z-the-in-app-agent-reads-renderer-context-through-openwork-server-and-gets-an-expl/test-run.json.

  • Without a polling OpenWork window, the agent receives the server's explicit no-window result and still completes its turn
    • passed: Without a polling OpenWork window, the agent receives the server's explicit no-window result and still completes its turn — openwork_context returned context=null and ui.error="No OpenWork window is connected to this server. Open the OpenWork app or its web tab and try again."; the model's reply was "MOCK OK".
  • A renderer window's split layout crosses openwork-server into the agent tool result and the model's follow-up request
    • passed: A renderer window's split layout crosses openwork-server into the agent tool result and the model's follow-up request — The fake window handled one context request; the transcript and provider tool result both contained secondarySessionId=ses_right, and the turn replied "MOCK OK".
  • Viewer tokens cannot control the UI, claim pending requests, or forge replies
    • passed: Viewer tokens cannot control the UI, claim pending requests, or forge replies — Unauthenticated calls returned 401, viewer control requests returned 403, viewer poll and forged replies returned 403, invalid kinds returned 400, collaborator and owner rebind_model requests were admitted unchanged while unauthenticated/viewer rebind requests were rejected, collaborator replies survived the relay, a second poll was empty, and duplicate replies returned 404.

mailbox registration expires after a poll gap, independently of pin or engine work; a fresh poll restores it

Outcome: passed. Created: 2026-09-16T23:23:01.729Z.
Receipt: evals/results/test-runs/2026-09-16T23-23-01-728Z-mailbox-registration-expires-after-a-poll-gap-independently-of-pin-or-engine-wor/test-run.json.

  • Registration is recent-poll liveness, not OS window existence
    • passed: Registration is recent-poll liveness, not OS window existence — 5s receipt timeout; late reply rejected; connected through 20,000ms, false at 20,001ms; session.read rejected before enqueue; fresh pending poll restores successful request/reply without engine or pin state.

finite archive and permission IPC preserve scoped requests, cancellation, no retries and external trust boundaries

Outcome: passed. Created: 2026-09-16T23:22:40.273Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-40-272Z-finite-archive-and-permission-ipc-preserve-scoped-requests-cancellation-no-retri/test-run.json.

  • Archive and permission transport retain safety and external networking policy

    • passed: Archive and permission transport retain safety and external networking policy — node --test --test-concurrency=1 apps/desktop/electron/finite-http-fetch.test.mjs apps/desktop/electron/no-bare-external-fetch.test.mjs
      Exit 0
      ✔ finite loopback GET and PATCH preserve authentication, directory, body and HTTP error without retries (14.128292ms)
      ✔ main permission replies preserve once/always/reject bodies and HTTP failures without replay (9.6945ms)
      ✔ main cancellation admission matches only permission reply POSTs and the existing read/archive/Stop allowlist (1.782708ms)
      ✔ main permission cancellation closes the upstream POST during held headers without retry (2.276709ms)
      ✔ main permission cancellation closes the upstream POST during held body without retry (2.453084ms)
      ✔ remote, lookalike loopback, and HTTPS retain the exact Chromium fetch and its trust policy (0.328917ms)
      ✔ loopback redirects are rejected even when the caller asks to follow (1.495125ms)
      ✔ cancellation includes held body consumption and preserves the caller reason (1.076458ms)
      ✔ desktop electron source does not use unmarked bare fetch (18.095875ms)
      ℹ tests 9
      ℹ suites 0
      ℹ pass 9
      ℹ fail 0
      ℹ cancelled 0
      ℹ skipped 0
      ℹ todo 0
      ℹ duration_ms 121.078
  • Archive and permission transport retain safety and external networking policy

    • passed: Archive and permission transport retain safety and external networking policy — bun test --isolate tests/opencode-archive-transport.test.ts tests/opencode-stream-timeout.test.ts
      Exit 0
      bun test v1.4.0 (34cbb9a40)

50 pass
0 fail
255 expect() calls
Ran 50 tests across 2 files. [20.07s]

archive deadlines settle stalled reads and uncertain writes, preserve caller cancellation, and retain pin and working-session contracts

Outcome: passed. Created: 2026-09-16T23:22:12.966Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-12-965Z-archive-deadlines-settle-stalled-reads-and-uncertain-writes-preserve-caller-canc/test-run.json.

  • Bounded preflight never sends a late PATCH; uncertain PATCH is not reported as cancellation; holds and busy state recover; caller signals and pin state survive
    • passed: Bounded preflight never sends a late PATCH; uncertain PATCH is not reported as cancellation; holds and busy state recover; caller signals and pin state survive — bun test --isolate tests/session-archive-agent-contract.test.tsx tests/opencode-stream-timeout.test.ts tests/opencode-session-native.test.ts tests/session-management-store.test.ts
      Exit: 0
      bun test v1.4.0 (34cbb9a40)

tests/session-management-store.test.ts:
[zustand persist middleware] Unable to update item 'openwork.react.sessionManagement', the given storage is currently unavailable.
[zustand persist middleware] Unable to update item 'openwork.react.sessionManagement', the given storage is currently unavailable.
[zustand persist middleware] Unable to update item 'openwork.react.sessionManagement', the given storage is currently unavailable.
[zustand persist middleware] Unable to update item 'openwork.react.sessionManagement', the given storage is currently unavailable.

126 pass
0 fail
946 expect() calls
Ran 126 tests across 4 files. [26.08s]

session model aliases preserve workspace scope, canonical bindings, and safe read projections

Outcome: passed. Created: 2026-09-16T23:22:11.442Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-11-441Z-session-model-aliases-preserve-workspace-scope-canonical-bindings-and-safe-read-/test-run.json.

  • Catalog discovery is workspace-scoped and read-only
    • passed: Catalog discovery is workspace-scoped and read-only — The non-caller workspace returned its three connected models and fallback name; disconnected models, caller catalog reads, writes, and missing-workspace fallback were absent.
  • Named model resolution binds creation and first prompt consistently
    • passed: Named model resolution binds creation and first prompt consistently — Exact HTTP payloads contained opaque canonical ids and requested effort, not picker labels; the result included both human names and no other workspace was touched.
  • Named model resolution binds creation and first prompt consistently
    • passed: Named model resolution binds creation and first prompt consistently — Exact HTTP payloads contained opaque canonical ids and requested effort, not picker labels; the result included both human names and no other workspace was touched.
  • Qualified override and inherited batch model stay independent
    • passed: Qualified override and inherited batch model stay independent — Two sessions used different canonical providers and models on both writes; the override did not inherit high effort or send literal default, and returned variant null with alternate provider labels.
  • Reject ambiguous alias atomically across the batch
    • passed: Reject ambiguous alias atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject ambiguous displayName atomically across the batch
    • passed: Reject ambiguous displayName atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject missing name atomically across the batch
    • passed: Reject missing name atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject removed opaque id atomically across the batch
    • passed: Reject removed opaque id atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject disconnected provider atomically across the batch
    • passed: Reject disconnected provider atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject selector without model atomically across the batch
    • passed: Reject selector without model atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject id without provider atomically across the batch
    • passed: Reject id without provider atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject mixed selectors atomically across the batch
    • passed: Reject mixed selectors atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Reject alias with ids atomically across the batch
    • passed: Reject alias with ids atomically across the batch — The public tool returned an actionable failure; the valid first item also produced zero creates, prompts, UI reloads, or session mutations.
  • Discovery is not permanent authorization for a removed model
    • passed: Discovery is not permanent authorization for a removed model — A previously listed opaque id was removed before creation; creation reread the catalog and rejected it with zero writes instead of using cached discovery.
  • Fail closed for missing host
    • passed: Fail closed for missing host — The caller workspace differed from the exact host query workspace; raw connected models were not consulted and no session, prompt or navigation occurred.
  • Fail closed for malformed envelope
    • passed: Fail closed for malformed envelope — The caller workspace differed from the exact host query workspace; raw connected models were not consulted and no session, prompt or navigation occurred.
  • Fail closed for wrong affordance
    • passed: Fail closed for wrong affordance — The caller workspace differed from the exact host query workspace; raw connected models were not consulted and no session, prompt or navigation occurred.
  • Fail closed for mismatched workspace
    • passed: Fail closed for mismatched workspace — The caller workspace differed from the exact host query workspace; raw connected models were not consulted and no session, prompt or navigation occurred.
  • Fail closed for unavailable projection
    • passed: Fail closed for unavailable projection — The caller workspace differed from the exact host query workspace; raw connected models were not consulted and no session, prompt or navigation occurred.
  • Fail closed for policy denial
    • passed: Fail closed for policy denial — The caller workspace differed from the exact host query workspace; raw connected models were not consulted and no session, prompt or navigation occurred.
  • Decorations never replace binding ids
    • passed: Decorations never replace binding ids — Returned bindings and available list projections selected by ids, retained effort and returned canonical labels without an available field in the binding.
  • Read labels decorate rather than migrate persisted model bindings
    • passed: Read labels decorate rather than migrate persisted model bindings — Normal and summary reads returned current labels; removed ids and effort survived verbatim without substitute labels, unbound stayed null, and no model record or other workspace was written.
  • Catalog failure is not an invented model or authorization to create
    • passed: Catalog failure is not an invented model or authorization to create — Session metadata remained readable with ids and effort only; discovery failed explicitly and named creation failed before all writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Latest assistant error is allowlisted and never sticky after success
    • passed: Latest assistant error is allowlisted and never sticky after success — An error-only latest assistant surfaced a safe code/message despite an older readable success; raw provider detail and unknown names never escaped in either read mode, and later success cleared lastError without writes.
  • Windowed reads do not claim errors outside loaded history
    • passed: Windowed reads do not claim errors outside loaded history — A one-message tail omitted the earlier error, a two-message tail exposed it, and a from-start read inspected full history despite returning only the first readable message; no raw detail or writes escaped.
  • Renderer inventory labels are scoped decorations, not model migration
    • passed: Renderer inventory labels are scoped decorations, not model migration — Identical opaque ids received different workspace labels; scoping excluded other sessions, missing catalogs preserved ids, stale bindings stayed stale, and input records did not mutate.

removal delta ignores additions, names and unrelated identities

Outcome: passed. Created: 2026-09-16T23:22:09.974Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-974Z-removal-delta-ignores-additions-names-and-unrelated-identities/test-run.json.

  • Removal deltas distinguish retired identities from catalog edits
    • passed: Removal deltas distinguish retired identities from catalog edits — Adding a model or renaming an existing model produced no removals. Removing old produced exactly its provider/model identity and original labels, excluding the retained keep model.

provider/model removal impact is local, informational and retryable: path

Outcome: passed. Created: 2026-09-16T23:22:09.951Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-951Z-provider-model-removal-impact-is-local-informational-and-retryable-path/test-run.json.

  • Cloud removal emits scoped unarchived affected sessions, not a migration
    • passed: Cloud removal emits scoped unarchived affected sessions, not a migration — A real sync pass removed one model and one provider against in-memory config witnesses; only engine GETs occurred, restored archive=0 was included, archived/other-model records were excluded, workspace sets were separate and no bindings changed.

provider/model removal impact is local, informational and retryable: canonical_alias

Outcome: passed. Created: 2026-09-16T23:22:09.930Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-930Z-provider-model-removal-impact-is-local-informational-and-retryable-canonical-ali/test-run.json.

  • Cloud removal emits scoped unarchived affected sessions, not a migration
    • passed: Cloud removal emits scoped unarchived affected sessions, not a migration — A real sync pass removed one model and one provider against in-memory config witnesses; only engine GETs occurred, restored archive=0 was included, archived/other-model records were excluded, workspace sets were separate and no bindings changed.

provider/model removal impact is local, informational and retryable: restart

Outcome: passed. Created: 2026-09-16T23:22:09.909Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-909Z-provider-model-removal-impact-is-local-informational-and-retryable-restart/test-run.json.

  • Cloud removal emits scoped unarchived affected sessions, not a migration
    • passed: Cloud removal emits scoped unarchived affected sessions, not a migration — A real sync pass removed one model and one provider against in-memory config witnesses; only engine GETs occurred, restored archive=0 was included, archived/other-model records were excluded, workspace sets were separate and no bindings changed.

provider/model removal impact is local, informational and retryable: inventory

Outcome: passed. Created: 2026-09-16T23:22:09.883Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-883Z-provider-model-removal-impact-is-local-informational-and-retryable-inventory/test-run.json.

  • Cloud removal emits scoped unarchived affected sessions, not a migration
    • passed: Cloud removal emits scoped unarchived affected sessions, not a migration — A real sync pass removed one model and one provider against in-memory config witnesses; only engine GETs occurred, restored archive=0 was included, archived/other-model records were excluded, workspace sets were separate and no bindings changed.

provider/model removal impact is local, informational and retryable: after_config

Outcome: passed. Created: 2026-09-16T23:22:09.857Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-857Z-provider-model-removal-impact-is-local-informational-and-retryable-after-config/test-run.json.

  • Cloud removal emits scoped unarchived affected sessions, not a migration
    • passed: Cloud removal emits scoped unarchived affected sessions, not a migration — A real sync pass removed one model and one provider against in-memory config witnesses; only engine GETs occurred, restored archive=0 was included, archived/other-model records were excluded, workspace sets were separate and no bindings changed.

provider/model removal impact is local, informational and retryable: none

Outcome: passed. Created: 2026-09-16T23:22:09.812Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-09-812Z-provider-model-removal-impact-is-local-informational-and-retryable-none/test-run.json.

  • Cloud removal emits scoped unarchived affected sessions, not a migration
    • passed: Cloud removal emits scoped unarchived affected sessions, not a migration — A real sync pass removed one model and one provider against in-memory config witnesses; only engine GETs occurred, restored archive=0 was included, archived/other-model records were excluded, workspace sets were separate and no bindings changed.

suggested replacements prefer the same provider family then available workspace default, never silently picking another model

Outcome: passed. Created: 2026-09-16T23:22:08.348Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-348Z-suggested-replacements-prefer-the-same-provider-family-then-available-workspace-/test-run.json.

  • Replacement suggestions preserve provider preference and availability
    • passed: Replacement suggestions preserve provider preference and availability — Same-provider and same-family candidates outranked the workspace default; an available default was used only without a family match. An unavailable default or empty catalog returned null rather than an unrelated model, and schema parsing preserved the replacement id.

same-id effort changes and bulk selections publish model/variant atomically

Outcome: passed. Created: 2026-09-16T23:22:08.329Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-329Z-same-id-effort-changes-and-bulk-selections-publish-model-variant-atomically/test-run.json.

  • Same-id effort edits and bulk repicks publish atomically
    • passed: Same-id effort edits and bulk repicks publish atomically — Explicit effort edits changed high to low and then null; an omitted effort preserved the same choice. Bulk repick emitted exactly one store update containing both target model/variant pairs and no engine writes.

canonical workspace aliases allow single and bulk repick but never admit neighboring directories

Outcome: passed. Created: 2026-09-16T23:22:08.311Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-311Z-canonical-workspace-aliases-allow-single-and-bulk-repick-but-never-admit-neighbo/test-run.json.

  • Repick ownership is exact against the engine's canonical workspace directory
    • passed: Repick ownership is exact against the engine's canonical workspace directory — A different registered path produced a two-session preview and successful single/bulk local saves; archives, another workspace, nested paths and prefix neighbors were excluded. Missing canonical ownership failed closed.

effective picker selection and slash commands honor engine binding, local repick and effort

Outcome: passed. Created: 2026-09-16T23:22:08.291Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-291Z-effective-picker-selection-and-slash-commands-honor-engine-binding-local-repick-/test-run.json.

  • Picker precedence and slash commands preserve selected model and effort
    • passed: Picker precedence and slash commands preserve selected model and effort — Engine binding won over the default until local repick; the observed command HTTP payload carried replacement ids and low effort. Missing bindings used the fallback, and null effort produced explicit default rather than retaining old effort.

queue catalog checks use renderer identity, not a remote runtime's colliding workspace id

Outcome: passed. Created: 2026-09-16T23:22:08.274Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-274Z-queue-catalog-checks-use-renderer-identity-not-a-remote-runtime-s-colliding-work/test-run.json.

  • Queued model preflight uses renderer workspace identity
    • passed: Queued model preflight uses renderer workspace identity — The query used rem_fixture and returned the replacement; missing renderer identity made no query, and a response bearing the colliding runtime workspace id was rejected.

confirmed pending choices survive ordinary selections beyond the old 200-entry cap

Outcome: passed. Created: 2026-09-16T23:22:08.248Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-248Z-confirmed-pending-choices-survive-ordinary-selections-beyond-the-old-200-entry-c/test-run.json.

  • Pending choices survive ordinary selection churn
    • passed: Pending choices survive ordinary selection churn — After 250 additional selections, every confirmed choice retained its object identity and persisted model/variant; no engine writes occurred.

status waits recheck local holds and selections before single and bulk persistence

Outcome: passed. Created: 2026-09-16T23:22:08.231Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-231Z-status-waits-recheck-local-holds-and-selections-before-single-and-bulk-persisten/test-run.json.

  • Status waits cannot overwrite local state changes
    • passed: Status waits cannot overwrite local state changes — While the final authoritative read waited, a hold, newer target choice or newly matching bulk peer appeared. Each handler rejected without additional persistence and preserved the newer choice; no engine writes occurred.

authoritative idle and omitted-idle maps permit local-only single and bulk repicks

Outcome: passed. Created: 2026-09-16T23:22:08.212Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-212Z-authoritative-idle-and-omitted-idle-maps-permit-local-only-single-and-bulk-repic/test-run.json.

  • Exact 200 valid idle maps allow local-only persistence
    • passed: Exact 200 valid idle maps allow local-only persistence — Explicit idle and omitted-idle maps allowed both handlers with one atomic local write each; unrelated engine activity did not veto the target. Status was the final awaited read, and no engine record changed.

unreadable and malformed authoritative statuses cannot authorize any local model save

Outcome: passed. Created: 2026-09-16T23:22:08.192Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-192Z-unreadable-and-malformed-authoritative-statuses-cannot-authorize-any-local-model/test-run.json.

  • Status verification fails closed
    • passed: Status verification fails closed — Transport rejection, missing response/data, partial HTTP success, errors, and malformed maps (including unrelated entries) all prevented single and atomic bulk saves without engine mutations.

authoritative busy and retry states reject repicks even when local activity is empty

Outcome: passed. Created: 2026-09-16T23:22:08.174Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-174Z-authoritative-busy-and-retry-states-reject-repicks-even-when-local-activity-is-e/test-run.json.

  • Authoritative engine activity vetoes stale-cache repicks
    • passed: Authoritative engine activity vetoes stale-cache repicks — Busy and retry engine responses rejected single/bulk previews and confirmations with empty local activity. Idle peers, local persistence and engine records were untouched; only the target workspace's status was read.

activity starting during the final read prevents single and atomic bulk repicks

Outcome: passed. Created: 2026-09-16T23:22:08.157Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-157Z-activity-starting-during-the-final-read-prevents-single-and-atomic-bulk-repicks/test-run.json.

  • Final-read activity prevents any repick persistence
    • passed: Final-read activity prevents any repick persistence — Local activity began inside the final authoritative status read. Single and bulk repicks both refused; idle bulk peers, local storage and engine state remained untouched.

repick uses one absolute budget and checks elapsed time even before timers run

Outcome: passed. Created: 2026-09-16T23:22:08.141Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-141Z-repick-uses-one-absolute-budget-and-checks-elapsed-time-even-before-timers-run/test-run.json.

  • Repick checks the absolute deadline after awaited reads
    • passed: Repick checks the absolute deadline after awaited reads — Three individually short reads consumed 4.5 seconds of the injected monotonic clock without firing a timer; both single and bulk repicks rejected with no persistence or engine writes.

direct repick handlers retain their four-second bound and abandoned reads never save later

Outcome: passed. Created: 2026-09-16T23:22:08.122Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-122Z-direct-repick-handlers-retain-their-four-second-bound-and-abandoned-reads-never-/test-run.json.

  • Repick deadlines prevent post-timeout local mutations
    • passed: Repick deadlines prevent post-timeout local mutations — Single and bulk catalog, directory, target and authoritative status reads all rejected at four seconds before the five-second mailbox; releasing every abandoned read afterward produced no local or engine writes.

queued repicks keep a monotonic remaining budget across wall-clock rollback

Outcome: passed. Created: 2026-09-16T23:22:08.104Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-104Z-queued-repicks-keep-a-monotonic-remaining-budget-across-wall-clock-rollback/test-run.json.

  • Queued remaining time stays monotonic after handler entry
    • passed: Queued remaining time stays monotonic after handler entry — With 100ms remaining and timers unfired, the final read at 100ms rejected despite a one-minute wall-clock rollback; the 99ms control saved successfully for both handlers. No engine writes occurred.

near-expiry queued repicks time out on the remaining budget and late reads cannot save

Outcome: passed. Created: 2026-09-16T23:22:08.086Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-086Z-near-expiry-queued-repicks-time-out-on-the-remaining-budget-and-late-reads-canno/test-run.json.

  • Near-expiry queued repicks have only their remaining 100ms
    • passed: Near-expiry queued repicks have only their remaining 100ms — All single/bulk catalog, directory, target and authoritative status reads stayed pending at 99ms and rejected at 100ms. Releasing abandoned reads after the mailbox deadline caused no local persistence or engine writes.

invalid and future internal timestamps fail closed for single and bulk repicks

Outcome: passed. Created: 2026-09-16T23:22:08.069Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-069Z-invalid-and-future-internal-timestamps-fail-closed-for-single-and-bulk-repicks/test-run.json.

  • Invalid timestamps never grant a fresh model mutation budget
    • passed: Invalid timestamps never grant a fresh model mutation budget — Non-finite, non-positive, fractional and future timestamps rejected before reads in both handlers with zero local or engine writes.

exhausted queued repicks reject before reads even when args claim a fresh timestamp

Outcome: passed. Created: 2026-09-16T23:22:08.051Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-051Z-exhausted-queued-repicks-reject-before-reads-even-when-args-claim-a-fresh-timest/test-run.json.

  • Queued request age is charged before model handlers read or mutate
    • passed: Queued request age is charged before model handlers read or mutate — At exactly 4s, after mailbox expiry and after a long queue, single and bulk repicks rejected before all reads. Fresh timestamps in user args could not reset the deadline; local and engine state remained unchanged.

catalog waits cannot race an archive, hold or newer local selection into a repick

Outcome: passed. Created: 2026-09-16T23:22:08.033Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-033Z-catalog-waits-cannot-race-an-archive-hold-or-newer-local-selection-into-a-repick/test-run.json.

  • Repick waits cannot overwrite archive state or a newer local choice
    • passed: Repick waits cannot overwrite archive state or a newer local choice — Each suspended catalog lookup was raced with an archive, hold or newer repick; all rejected without an additional save, the newer high-effort choice survived, and no engine writes occurred.

exact workspace repick bypasses unrelated offline inventories and rejects foreign targets

Outcome: passed. Created: 2026-09-16T23:22:08.014Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-08-014Z-exact-workspace-repick-bypasses-unrelated-offline-inventories-and-rejects-foreig/test-run.json.

  • Exact workspace repick isolates unavailable and foreign workspaces
    • passed: Exact workspace repick isolates unavailable and foreign workspaces — The scoped repick saved locally while the other inventory was offline and read only its target session; attempting a foreign target rejected without another storage write.

healthy fresh sessions preserve model-free sending, never substituting defaults for stale bindings

Outcome: passed. Created: 2026-09-16T23:22:07.984Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-984Z-healthy-fresh-sessions-preserve-model-free-sending-never-substituting-defaults-f/test-run.json.

  • Fresh sessions retain model-free sending without rescuing stale bindings
    • passed: Fresh sessions retain model-free sending without rescuing stale bindings — The fresh session received one accepted prompt with no model or variant fields; the stale bound session returned model_unavailable and added no prompt write.

bulk matching uses exact provider and model ids, not labels

Outcome: passed. Created: 2026-09-16T23:22:07.965Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-965Z-bulk-matching-uses-exact-provider-and-model-ids-not-labels/test-run.json.

  • Other providers' matching model ids do not widen or block the confirmed scope
    • passed: Other providers' matching model ids do not widen or block the confirmed scope — An available model with the same id and label but another provider did not block replacement of the removed source; its session and all engine records stayed untouched.

bulk repick rejects a source restored to the current catalog after preview

Outcome: passed. Created: 2026-09-16T23:22:07.945Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-945Z-bulk-repick-rejects-a-source-restored-to-the-current-catalog-after-preview/test-run.json.

  • Bulk repick is limited to an unavailable exact source model
    • passed: Bulk repick is limited to an unavailable exact source model — Restoring the source's provider/model ids under a different label after preview blocked both fresh preview and confirmed mutation; no local or engine writes occurred.

bulk mutations fail closed without confirmation while dry-runs remain read-only

Outcome: passed. Created: 2026-09-16T23:22:07.923Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-923Z-bulk-mutations-fail-closed-without-confirmation-while-dry-runs-remain-read-only/test-run.json.

  • Bulk writes require the exact confirmed preview set
    • passed: Bulk writes require the exact confirmed preview set — Missing confirmation rejected in both the action and facade; empty, duplicate and extra ids rejected without persistence. Dry-run required no confirmation, and the confirmed set saved regardless of order.

invalid targets, changed previews and unavailable replacements cannot partially save

Outcome: passed. Created: 2026-09-16T23:22:07.903Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-903Z-invalid-targets-changed-previews-and-unavailable-replacements-cannot-partially-s/test-run.json.

  • Invalid repicks cannot partially save
    • passed: Invalid repicks cannot partially save — Archived targets, unavailable replacements, missing workspaces and changed preview sets all rejected; neither local storage nor engine writes occurred.

headless stale sends write zero prompts; an explicit repick applies canonical ids and variant on next send

Outcome: passed. Created: 2026-09-16T23:22:07.835Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-835Z-headless-stale-sends-write-zero-prompts-an-explicit-repick-applies-canonical-ids/test-run.json.

  • Stale headless send is rejected before prompt writes
    • passed: Stale headless send is rejected before prompt writes — The real facade rejected missing model, host, catalog and mismatched identities with model_unavailable; only the two explicit sends after local repick wrote canonical model/effort payloads and returned accepted:true.

repick previews effective bindings, saves only confirmed scope, and preserves engine/default identities

Outcome: passed. Created: 2026-09-16T23:22:07.797Z.
Receipt: evals/results/test-runs/2026-09-16T23-22-07-796Z-repick-previews-effective-bindings-saves-only-confirmed-scope-and-preserves-engi/test-run.json.

  • This-session and opt-in all-session scope use effective local-first bindings
    • passed: This-session and opt-in all-session scope use effective local-first bindings — Dry-run wrote nothing; one and three choices persisted atomically with variants. Archives, other workspace, unrelated override, engine records and defaults were unchanged.

What this does: explicit this-session or confirmed matching-unarchived-session local repick, UI/headless, with stale-send preflight.
What this does not do: automatic cloud-provider-sync rebinding, engine-wide locking, unavailable-binding undo, or durable migration identity mapping.

@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 16, 2026 21:06 Inactive
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 3. 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 (336760 ms), confidentiality-review (407857 ms), spec-provenance-review (636473 ms), desktop-den-sync-review (691867 ms), design-spec-review (1027354 ms).

Blockers

  • None.

Advisories

  • T24-TBG · low · design-spec-review
  • 9FJ-E57 · low · design-spec-review · apps/app/src/react-app/domains/session/control/session-model-actions.ts:65
  • 9S4-S52 · medium · design-spec-review · apps/app/src/react-app/domains/session/surface/session-model-store.ts:83

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 4 observed
  • Observed resolved/unresolved transitions in retained snapshots: 4 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 4
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 3/20 run attempts retained; truncated: false
  • Transition snapshot: 4/4 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 16, 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 (f13c71903fe7a4c38d05099c83fefb171245e29b). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui

yomgui commented Sep 16, 2026 •

Copy link
Copy Markdown
Member Author

Human-grade review (agent-assisted)

Verdict: Passed for c21fc368b2f2072f50772993bc658bdd51c63c47 within the boundaries below. No remaining attributable must-fix found. A separate read-only reviewer challenged the implementation, requested repairs, re-reviewed those repairs, and confirmed the final dev integration. This is an agent-assisted review, not a claim that a person approved or authorized merging.

Final-head evidence: 40 testkit tests, 82 recorded assertions. App/server units: 200 passed. Root/app, evals, server typechecks and i18n audit: exit 0. All claimed tests ran locally with zero failures/skips. The PR body has four final-head isolated Electron screenshots covering unavailable state, both scope choices and the confirmed result after reload.

Review area Verdict Reason and evidence
Diff versus claims Passed The UI and session.set_model / session.rebind_model persist a device-local next-send choice. Repick itself writes no engine binding, global default or prompt. Sync reports removal impact; it does not automatically rebind. Stale headless sends reject before prompt writes. Action implementation.
Running-session and timeout safety Passed, snapshot boundary Both mutations require a successful, valid authoritative engine status read, then recheck local running/waiting/pending/held/selection state before saving. Engine-busy with empty renderer cache is tested. Mailbox creation time travels as internal metadata, not user args; queue age counts against a four-second budget, invalid/future/expired requests fail closed, and late reads cannot resume a save after expiry. This is not an engine-wide lock against another actor starting after the snapshot, nor a guarantee that the reply arrives before a transport timeout. No in-flight engine model is changed.
Bulk scope, confirmation and return path Passed Exact canonical workspace; exact source provider/model, required to be unavailable; effective local override takes precedence; archived timestamps greater than zero excluded while restored zero is included. Real bulk apply requires the exact confirmed preview IDs and rejects changed matches. Single repair no longer depends on bulk inventory succeeding. Close cancels before applying; afterward another available model can replace the choice. Genuine restoration of an unavailable original binding is not supported, and misleading undo promises were removed. Schemas and matcher, dialog.
Headless authorization Passed under existing authority Missing/invalid authentication is rejected; viewers cannot request mutations, claim pending requests or forge replies. Collaborator and owner bearer scopes can invoke rebind on sessions in workspaces exposed by that server/renderer. This is server-wide collaborator/owner authority, not per-session creator ownership. Confirmed IDs are a scope-race check, not credentials. The real server-route spec asserts unauthenticated/viewer rebind rejection and collaborator/owner admission/unchanged relay; renderer tests separately assert workspace and model boundaries. Real-route proof.
i18n and presentation Passed with translation limitation New UI strings use t; count-aware _one/_other keys replace literal session(s). Nine non-English locales still use the repository's documented English fallback—these translations are not claimed complete. The i18n audit passes. Title-only dialog, structured provider option and visible scope controls address the reviewed design findings. Fallback contract.
Tests, revert-fails and archive preservation Passed Model repick: 26 cases; removal sync: 7; aliases: 1; real authorization, archive deadline, archive/permission transport and archive mailbox: 1 each; repick and pinned-archive Electron journeys: 1 each. Archive production semantics from #5014/#5063 remain intact; the latest merge also retains #5070 permission coverage. Details below.

Defects found and repaired during this review

  • Delayed asynchronous reads could previously save after a headless timeout. The deadline now includes mailbox queue age and is checked after reads and immediately before persistence.
  • Renderer caches alone could miss a session running in the engine. Authoritative status verification is now mandatory and fails closed when unreadable or malformed.
  • A failed/pending bulk inventory could disable a valid single-session repair. Single validation is now independent, with explicit error handling and no stale bulk confirmation.
  • Headless bulk mutation lacked a required confirmed preview set and could target a still-available source. Both constraints are now enforced.
  • “Repick to undo” overstated the return path. Descriptions now distinguish choosing another available model from restoring an unavailable binding.

Warden follow-up incorporated

Warden correctly identified that the earlier composer journey previewed two matches but did not actually save two in one bulk action. The final journey now independently proves single-session persistence, resets the synthetic local fixture, clicks All 2 → Save for 2 sessions, and asserts both overrides change while sentinels, engine records, defaults and the draft remain unchanged. The separate reviewer checked this follow-up and found no must-fix. The close action is now explicitly Close; pre-confirmation detail is a compact state/reversibility label rather than explanatory paragraphs. The final-head run passes.

Revert-fails control

Before committing the review repair, the archived exclusion in matchingOpenworkModelSessions was deliberately removed, types were rebuilt, and this command ran:

pnpm --filter @openwork/types build
pnpm evals:pr specs/session-model-repick.test.ts -t "repick previews effective bindings"

It exited 1: the scope contained session_archived, violating the exact expected set (1 failed; 21 deselected, not counted as passes). The exclusion was restored before the final commits. The final-head scope suite passes all 26 cases, including workspace/model/archived exclusions, confirmed-set changes, unavailable replacements, deadlines and working-state races.

Archive evidence on this exact head

  • pnpm evals:pr specs/session-archive-deadline.test.ts — Passed; retained original coverage floor, zero failures/skips, including stalled reads, uncertain writes, caller cancellation, holds, pin and working-session contracts.
  • pnpm evals:pr specs/session-archive-transport.test.ts — Passed; finite archive/permission IPC, scoped requests, cancellation, no retries and external trust boundaries.
  • pnpm evals:pr specs/session-archive-mailbox.test.ts — Passed; renderer mailbox operation and internal timestamp forwarding.
  • pnpm evals:e2e session-archive-pinned --local — Passed; real sidebar and cross-workspace mailbox archive without a focused session, held preflight failure before five seconds, no late PATCH, then recovery without restart.

The archive test harness's missing DesktopConfigProvider dependency was independently reproduced on clean base c502b8789: 6 passed / 20 failed, same error. Only unrelated model-provider mocks were added to repair that fixture; archive behavior was not weakened. Archive spec timeout options were moved before the callback so the existing testkit wrapper records their actual completed outcomes.

Scope caveats: the broader layer-lint check during review reported 54 violations on both the review tree and clean c502b8789 control; full layer lint is not claimed green. The final-head scoped dependency check passes (56 modules, 84 dependencies). Private review-app upload was unavailable because the available Blob token belongs to a public store, so full assertion sections are published in the linked PR comment; only reviewed synthetic screenshots were uploaded publicly. Current GitHub CI/Warden status is a separate gate from this code-review verdict.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 16, 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 (83a2093e0c2b51526c498c92f49cb3570f8a13f6). 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 (c21fc368b2f2072f50772993bc658bdd51c63c47). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui
yomgui merged commit 2a1bcc8 into dev Sep 17, 2026
39 checks passed
@yomgui
yomgui deleted the feat/model-unavailable-repick-scope branch September 17, 2026 01:42
benjaminshafii pushed a commit that referenced this pull request Sep 17, 2026
…n scope (#4979)" (#5110)

This reverts commit 2a1bcc8, preserving subsequent session.create partial-result handling.

This branch was successfully deployed

3 active (2 outdated) and 1 inactive (outdated) deployments
Preview – openwork-app — c21fc368 Deployed Sep 16, 2026 by vercel[bot]
Preview – openwork-den — 4e94408f Deployed Sep 16, 2026 by vercel[bot]
Preview – openwork-diagnostics — 4e94408f Deployed Sep 16, 2026 by vercel[bot]
Preview – openwork-landing — 37f49a9c Deployed Sep 16, 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