Repository navigation
style: format three files that landed before the format check (fix red main) - #30948
Conversation
Its CI ran before #30863 added the check. Formatting pushed wsl-orcad-connection.ts past its line limit, so its port-fallback listen moves next to the stdio bridge it wraps.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
…30561) * fix(native-chat): a chat's model, effort and Fast belong to the chat, not to a model Structured chats kept their option values per model on the client, so a value the host saved without a model (a resumed chat that never picked one, Codex Fast saved on the conversation) had nowhere to live. The client either dropped it or labelled the chat with the listing's default model to hold it. - One flat record per chat holds model, effort, speed and Fast independently; a model pick changes only the model and the host reconciles the rest. - Controls come from the model they apply to, separately from the values; with no model known, a saved Codex speed still shows and Standard turns it off. - The options answer marks values a catalog default supplied (current.defaulted). A resumed chat never names or sends such a model as its own; a new chat still shows the default the host says it runs. An answer without the mark reads as before. - Every send, including a new chat's first message, carries the chat's own model and effort and held picks, never a default read off the picker. - A held launch pick supersedes only an earlier pick of the same option. Tracked in STA-10947. * fix(native-chat): a new chat's first send still pins the default model it shows A new chat that never picked a model carries the default its picker names, as before, so it keeps the model it actually ran after the CLI's default changes. Only a resumed chat's defaulted model is never named or sent. Tracked in STA-10947. * fix(native-chat): narrow the host catalog before reading whether its listing names the default The flag lives only on a listed catalog, so the check confirms the catalog is not the unknown answer before reading it; the first-frame test reads the chat's flat model value. * fix(native-chat): a reopened chat whose saved model was refused records the model it now runs After a retired saved model is reset, the options answer no longer marks the model the child runs as a default, so the next send records it instead of replaying the refused model on every reopen. * fix(native-chat): a new chat names and pins the default it shows, and a model pick keeps only what the model offers A chat this view started names the default model the host fills in, whichever of the model list and the options answer lands first, and its first send carries the shown model and effort. A resumed chat still names and sends only its own values. A model pick, held or live, keeps an effort, speed or Fast only where the new model offers it, so a value the model cannot take is never shown, sent or remembered. * test(native-chat): give the no-Fast model fixture its required default flag * fix(native-chat): an open chat's model pick leaves reconciling to the host A live pick no longer drops values on the client; the host's reply, when it carries its full value set, replaces the chat's own values as a read does. Only a pick held before launch, with no host yet, keeps just what the picked model offers. * fix(native-chat): a pick reply only adds the values it names A pick's reply carries only the values the host set or was asked for, so it can't speak for the rest: it no longer removes values it leaves out. Joined tests pin real reply shapes and a new Claude chat in a fresh Claude home naming and pinning Opus High. * fix(native-chat): a tier the drawn model doesn't offer shows as Standard A Speed value another listed model offers but the named model doesn't is drawn as Standard, which is what the host reconciles it to, while the chat's record keeps the host's value. Effort, a tier no listed model offers, an unlisted model and a stand-in model's controls still show what the host holds. After a lost pick reply the picker no longer shows the old tier as a raw extra choice. * fix(native-chat): a never-sent chat names and pins its default after a reopen The options answer no longer marks the default model and effort as stand-ins for a chat this host started that has sent nothing, so a chat reopened after a restart or on the phone names them and its first send pins them, as before. A chat taken from history, or one that has sent, keeps the mark. * fix(native-chat): narrow the missing record as null and type the new-chat fixture's handle chain * test(native-chat): the unloaded-turn context test's record store answers null for a missing record * fix(native-chat): a chat's speed shows what its next turn runs A Codex tier the drawn model lacks shows as Standard, which is how Codex runs it, except Flex, which Codex passes regardless: established Flex keeps showing, and after a model pick the host hasn't answered it shows no selection until the reply or a read. Each Codex turn sends the same effective tier without rewriting the chat's saved one, and a new chat's create carries held picks as the picker draws them, settling them so they aren't applied again after publish. * fix(native-chat): one speed rule for picker, host and turns; never-sent needs proof; create keeps held picks A Codex tier the model doesn't list shows and runs as Standard under one rule shared by the picker, the host's live reconciliation, each turn and the at-rest answer, which keeps the saved tier for a model that offers it. An older host's Flex shows as it reports it. A chat counts as never sent only when no turn, rewind or untrustworthy journal says otherwise. A new chat's create carries held picks as the picker draws them but keeps them as the user made them until create succeeds, so a refused create and retry still has the user's own pick, and a newer pick still applies after publish. * test(native-chat): type the resting journal mock and cut overlapping option tests One typed resting-journal helper replaces six inline mocks and the broad object parameters the low-evidence check rejects. Cuts tests the joined flows already pin: the resumed list-or-answer ordering test, the restart-after-first-send view test, the held effort before a model pick, and the model-pick and restart loop of the saved-Fast test. * test(native-chat): cut option assertions the joined flows already pin Drops the Codex Standard row (the joined tier test pins it), the dispatched-source and literal effort-choice checks, and the resumed view test restart and model-pick steps; folds the pick table. * fix(native-chat): an at-rest pick reply and answer name the speed the next start runs The reply to a pick made at rest now carries the tier the chat model runs, through the same rule as the at-rest answer, so an older app whose follow-up read fails shows what the next turn sends; the saved record keeps the pick. A saved tier no listed model offers (a Flex from the user Codex config) is the agent configured tier at rest too, as the live rule and the picker already read it. Restores the pin that an accepted Codex reply naming Standard shows with no later read. * fix(native-chat): a reopened chat with no saved model names its default at once A reopened chat that never saved a model showed just "Model" until a send started its agent, while main names the list default straight away. The picker now names the default the host marks for every chat, as main does. Whether a send carries that default is a separate rule: a new chat sends it, so its first send pins it; a reopened chat does not, so its next start still runs the agent's own. * fix(native-chat): a chat with no saved model keeps the model its first turn ran A chat that never saved a model followed whatever the agent's default was at each start, so a chat resumed from history or a terminal could quietly switch models after a restart. When a message is handed to the agent on such a chat, the host now saves the model that turn ran: the message's own model when it carried one, otherwise the model the agent reports running. A default the host filled in, no model at all, or a model the agent would refuse as a choice on later sends, is never saved. The write sets the model only while none is saved, inside the record store's transaction, so a pick made meanwhile always wins and effort, speed and Fast are untouched. One host step covers Claude, Codex, ACP agents and Pi. No new saved field. * fix(native-chat): a chat with no saved choices keeps the model and effort its first turn ran A Codex message that left the model or effort unset was filled from the model list's defaults, not from what the running thread uses. Once the host saved the model a chat ran, the next Codex turn carried that model alone and ran the list's default effort for it (a configured xhigh became medium), and a message carrying only an effort ran the list's default model while the chat saved the thread's. A Codex message now resolves an unset model or effort to the thread's own, and only a switch to a different model takes that model's default effort, the same rule the other agents use. When a chat with no saved model records what its first turn ran, it now records the effort, service tier and Fast that turn ran too, in the same one-time store write: each only where the chat has none saved, only from the message's own value or the agent's real report, never a filled-in default, so a later change to the agent's configured effort no longer pairs the kept model with an effort it never ran. No new saved field and no wire change. A Codex follow-up sent while a chat's first turn runs is compared with what that turn actually runs, so it steers instead of waiting for a new turn just because the host saved the model meanwhile. Also fixes the delivery loop's optional recording hook type. * fix(native-chat): key what a child ran by its provider child type * fix(native-chat): record each option a turn ran where none is saved, and drop what a model pick can't run A Codex message that only switched the tier set the thread's effort as a lasting override, so a later switch to a model with no listed efforts was refused; the effort is again written only where the model brought one or an earlier override needs replacing. Recording what a turn ran now works per option: a chat that already saved its model still records the effort it ran, and so on for each option it has none saved for. Tier and Fast come only from the agent's own report, since a message steered into a running turn runs that turn's, and Fast is kept only when the agent reports it actually routed on: an off state may only mean Fast is unavailable. A model pick drops a saved effort, or Fast, that the newly picked model's listed row does not offer, in the one host step both resting and live picks go through, so no later send carries a choice the agent would refuse. The saved tier is kept, as before: it runs as the model's effective tier. * fix(native-chat): save only options a turn really ran, and only ones the chat's model runs A chat with a saved model recorded the effort its agent's settings named, not the one the turn ran: with "effortLevel": "high" in Claude's settings and Haiku saved (no effort control), the chat saved high and every later send was refused. A Codex thread effort its saved model doesn't list did the same. What a turn ran now comes from the agent's own dispatch: Claude reports the choices it applied and the effort the CLI resolved for the model it applies, never the settings level alone; Codex reports its final request over the thread's own model and effort, and a steer reports its running turn. This evidence lives only in memory on the dispatch result; agents without it keep using their own reports. One admission rule now decides every saved option, inside the ordered record write: under a model the saved catalog lists, an effort must be one it offers and Fast must be one it replays (Claude needs positive support). A late record of a turn that ran on another model than the one the chat now has saves none of that turn's options. A model pick drops inherited options its new model doesn't run, an explicit pick or a new chat's option the model doesn't offer is refused with the existing option refusal, and unknown catalogs or unlisted models pass as before. The saved tier keeps its effective-tier rule, and nothing already saved is cleaned up later. * fix(native-chat): an attach that founds a chat admits its options against the saved catalog too * fix(native-chat): Claude and Codex always name what a turn ran, and picks are judged inside the write The handover type was misnamed, which broke the typecheck. Claude and Codex now attach their dispatch evidence even when it names nothing, so a Claude turn dispatched before its settings readback never records the settings effort it did not run; the agent's own report still names the model and stands in only for agents without dispatch evidence. Recording leaves the saved-model and set-if-unset checks to the store's one admission rule. An explicit effort or Fast pick is now checked inside the ordered write, with the same refusal, and only at rest: a running chat's own menu can offer more than its saved catalog row (Pi's probe menu stops at high). * test(native-chat): Codex admission tests accept the dispatch's run evidence * fix(native-chat): a new chat's options are admitted against the folder list its picker showed * fix(native-chat): a new chat's admission reads the list its picker read, resolved once by the create * chore: re-run CI against main's formatting fix (#30918) * chore: re-run CI against main's formatting fix (#30948) * test(native-chat): explain the seed-options stub host cast * fix(native-chat): attach keeps its two-argument call when there are no attach options * Revert "fix(native-chat): attach keeps its two-argument call when there are no attach options" This reverts commit e633d20. * test(native-chat): create-path attach assertions check the params argument, not the arity
ELI5
#29042 passed CI before the format check (#30863) existed, then merged with three unformatted files. Every PR's static job now fails on those files. This PR formats them.
Formatting
wsl-orcad-connection.tsputs it at 312 lines, over the 300-line limit; it only passed lint because it was unformatted. So the manager's "rebind the saved local port, else pick a free one" listen moves intowsl-orcad-stdio-bridge.tsaslistenWslOrcadStdioBridgeOnPreferredPort, next to the bridge listener it wraps. Behaviour doesn't change.Testing
oxfmt --check .: clean.pnpm tc:node: clean.pnpm test src/main/wsl/and the tunnel identity-restart test: pass.