Repository navigation
fix(ci): record the Codex capacity capture's known replay divergence - #28286
Conversation
#28231 added the codex-model-capacity-fullscreen PTY capture without an entry in the replay test's known-divergence table, so every PR's test shard fails on main (expected 0, got 12). The serializer is untouched; the divergence is the same restore limitation the table records.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
) #28192 and #28286 both recorded 'codex-model-capacity-fullscreen' with the same count, and the duplicate object key fails typecheck (TS1117) on main. Co-authored-by: m4air <[email protected]>
#28286 and fba7b75 both recorded the same capture; the duplicate key fails typecheck and lint. Co-authored-by: m4air <[email protected]>
…ime fact (C1) (#27692) * feat(agent-launch): host plans agent launches with the window's runtime rule and one runtime fact Host-started agent launches now pick their platform with the same rule the window uses (project runtime, else a \\wsl$ path, else the host), and resolve one runtime fact that supplies both the command quoting and the PTY shell. Adds the agent.launch.terminal-inputs.v1 capability and its optional title/extraAgentArgs/requestKind/terminalOnly fields; no sender yet. OpenCode's createAgentSession stays on today's rules until C2 (temporary). * fix(agent-launch): one shared runtime rule, a derived fact, and only quoted commands carry it Round-1 review fixes for C1: - Window and host read a workspace's runtime through one shared resolver (local-workspace-execution-runtime.ts); a repo-less \\wsl$ folder gets no runtime, as in the window. - The fact is { platform, remote, pty } with the spawn's own PTY type; the quoting shell is derived from it, never stored. - createAgentSession uses the same fact (its pre-C1 exception is deleted). - Worktree startups quote from a fact for the repo and pass it on; a runtime that needs repair fails the startup, not the create. `shell` is required when building a launch command. - The host planner stamps a fact only on commands quoted with it; a caller-quoted command keeps the spawn's own rule. - Qoder probes where the process runs (\\wsl$ cwd, then a WSL shell). - wslShellRule 'host-legacy' keeps today's WSL-shell outcome where no project chose a runtime (temporary, removed by C8). - terminalOnly reaches the early-tab decision with an accurate receipt sentence; the unused client gate is removed. - Adds one host C0 row for a \\wsl$ repo with no saved runtime. * fix(agent-launch): round 2: keep request fields for C2, extend main's resolver, one answer per workspace Problem: the first round still carried request fields and window-parity switches that only the next step sends, added a new shared resolver that also changed window code, and left some background launches using a different runtime answer than the one they spawn with. - Move the agent.launch request fields, their capability and fingerprint handling, and the prompt/Codex parity switches out to the next step; today's host behaviour is kept. - Drop the shared resolver: main's resolveLocalWorkspaceRuntime now finds the project by repo id or source repos, folders borrow their single local repo, and a \\wsl$ path is not refused on a stale distro list. Window code is back to main. - Agents started in an existing worktree use that worktree's answer; the phone's fallback paths spawn with the answer they quoted for, and a runtime that needs repair shows its message instead of a plain shell. - The OpenCode model check looks where the agent will run. - A Windows --shell in a \\wsl$ workspace names the path, not a runtime setting that cannot change it. - The temporary folder rule names its follow-up, STA-10231. * fix(agent-launch): OpenCode model picks in WSL folders keep today's Windows runtime Problem: once a folder follows its repo's WSL runtime, an OpenCode launch that picks a model would be checked and started inside WSL, where Orca cannot yet verify OpenCode models, so picks that work today could be refused. Where main had no runtime for the scope (only folders), a model-picked OpenCode launch keeps main's answer. Start, resume and the worker's model check read the same answer. Temporary until OpenCode models are verified inside WSL. * fix(agent-launch): round 3: OpenCode keyed on the agent, new worktrees quoted for where they land Problem: round 2's OpenCode exception keyed on a model pick, so a resumed chat could run somewhere other than where it started, and the worker's model check read WSL from the Terminal shell and refused folders that work today. A new worktree's startup used the repo's answer even when the worktree lands in a WSL share. - In a folder whose repo runs in WSL, every OpenCode launch keeps main's Windows answer: create, resume and the worker's model check agree. The model check reads WSL from the path alone, as main did. STA-10251. - A new worktree's startup is planned for its WSL-share base folder when one is set (newWorktreeLaunchScope). - A \\wsl$ working directory runs in WSL whatever the project says, so non-OpenCode agents there are written for Linux. - The planner test derives the answer instead of passing it in. - Smaller shapes for the PTY settings type, the cache-less resolve, executionRuntimePlatform, spawnShellInputs and two comments. * fix(agent-launch): round 3c: one labelled rule for where the path decides; OpenCode follows the WSL-share fix Problem: OpenCode in a repo on a WSL share whose project is saved as Windows host still got PowerShell quoting typed into WSL, because the WSL-share fix skipped OpenCode. The fix and the two temporary parity rules were also split across two returns, so deleting the temporary ones could take the permanent fix with them. - One expression decides when the path places the agent, each term labelled: WSL share + Windows host (permanent fix), folder + Windows host (STA-10231), OpenCode in a folder (STA-10251). - OpenCode now gets the WSL-share fix too; a model pick there is refused, as main's model check already did. - The OpenCode entry-point tests set a WSL Terminal shell, so the model check test fails if it reads WSL from that shell again. - Tests trimmed with no coverage loss; the spawn-precedence unit test is dropped (the C0 WSL-share row covers the reachable case). * fix(agent-launch): keep the window's WSL answer for panes the window spawns Live Windows QA (Terminal shell wsl.exe, global default Windows host, repo with no project setting) saw an agent command written with PowerShell quoting typed into a WSL pane, so codex lost the apostrophes in its prompt. The host wrote the command for its own answer (Windows, PowerShell), but on routes where the window spawns the pane (the phone while a window is open, a focused desktop chat create, `orca terminal create --command` in a repo) the window spawned it by the Terminal shell, which is WSL. Quoting and the pane came from two different answers. Those routes ran in WSL with Linux-style quoting on main and worked, so the temporary host-legacy term (STA-10231) now also covers them: when the window spawns the pane, the path and Terminal shell decide, as on main. Background routes keep the approved change (PowerShell instead of cmd.exe with Linux-style quoting, which was broken on main). createTerminal and the pre-launch planning share one `windowSpawnsTerminal` rule so they can't disagree about who spawns the pane. * Revert "fix(agent-launch): keep the window's WSL answer for panes the window spawns" This reverts commit 3e4311d. * fix(agent-launch): report a runtime that needs repair as a refusal, not an unknown outcome `orca agent launch` into a folder whose one repo is set to a WSL distro that is no longer installed printed "Orca could not confirm the launch outcome; the agent may already be running", although nothing had started. The host knew the launch was refused before any spawn, but the refusal went out as the generic `runtime_error`, which the CLI must treat as possibly started. The launch planner now raises that refusal under its own code, `project_runtime_repair_required`, with the same message, and the RPC layer passes the code through. The CLI then prints the repair message as a plain failure. Older CLIs read the unrecognised code as a failure too; a newer CLI against an older host still gets `runtime_error`, as before. * fix(agent-launch): say a repair refusal in plain words, and repeat them on a retry The repair refusal from the last commit read "Project runtime requires repair before terminal spawn: wsl-distro-missing", an internal reason code rather than what happened and what to do. It now says, for example, "No agent was started. Ubuntu is not installed in WSL. Choose an installed distro or switch this project to Windows.", adding "This project follows the default in Settings > Project Runtime." when the runtime came from the default. Those sentences are the project settings page's own. They now live in one shared module that maps each repair reason to the page's existing translation key; the settings page passes its translator, and the host writes English, since it also runs headless where the desktop's translations can't load. The planner checks for a repair before the shell lookup, so the shared spawn message, which window spawns still use, is untouched. A retried launch (`--retry-launch`, or a phone resend) used to answer with the bare error code. The failed launch record now keeps the refusal's words and the retry repeats them. * fix(agent-launch): test that a retry repeats a refusal's words, and keep the host's English equal to the window's A retried launch now repeats a coded refusal's own words, but nothing tested it. A new case refuses a launch with a coded error and checks the retry answers with the same words. The repair sentences live in one shared module whose English the host writes and whose keys the settings page translates. The localization checks can't see call sites outside the window and main, so the module's test now checks each sentence against the window's English catalog for its key. Smaller, behaviour-identical tidy-ups: the reason-to-words mapping is a table, the refusal type fits on one line, and the length cap the retry words share with folder refusals has a neutral name. * refactor(agent-launch): keep main's behaviour where the stacked fixes change it The repair refusal's own code and words, the \\wsl$ path's distro in the agent list, --shell refusals for agents (decision and words), OpenCode's model check in a \\wsl$ repo, and finding a repo's project by its id move to their own stacked PRs. Until they land, each keeps main's behaviour with temporary code and a test that pins it. A disabled agent is refused as disabled before its runtime is looked at again, as on main. * fix(agent-launch): keep main's folder agent list when only the group names another host The agent list for a folder reads the folder's own host pin, as on main; only launches also read the containing group's host tag. * ci: re-run checks now that main's capacity-capture replay fix (#28286) has landed * test(agent-launch): give main's account-env startup test the launch runtime its build now returns
ELI5
Main's test shard 5 fails on every PR. #28231 added a captured terminal recording (
codex-model-capacity-fullscreen), but did not add it to the replay test's table of known, existing serializer differences.What Changed
KNOWN_PREEXISTING_I2_FAILURESwith its observed count of 12. That is the same count CI reports (expected 0, got 12).Why
The serializer is untouched. These are the same restore differences the table already records for the other Codex and OpenCode captures, and adding a new capture's count there is the established practice. Until it lands, CI is red for everyone.
Linked Issue
Main CI breakage from #28231.
Visual Proof
N/A. Test-only change.
Testing
serialize-grid-transcript-replay.test.ts: 114 passed locally.Agent skill upstream boundary
Checklist