Skip to content

Keep action model and effort choices out of Arguments - #34275

Merged
brennanb2025 merged 19 commits into
mainfrom
brennanb2025/sta-11102-model-action
Oct 29, 2026
Merged

brennanb2025 merged 19 commits into
mainfrom
brennanb2025/sta-11102-model-action

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 31 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3764 $\color{#cf222e}{\Huge{\mathbf{−}}}$​262 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3502
Prod 76 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3494 $\color{#cf222e}{\Huge{\mathbf{−}}}$​840 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2654

Source Control actions could select different models in chat and terminal launches, lose effort when Model stayed at Agent default, or change repository overrides while migrating Arguments. Model and Effort now use the same choice controls on global and repository action cards. Existing model/effort flags move into those controls on load; remaining Arguments stay intact. Save, Discard and removable badges keep the choices and Arguments together. Defaults remain Agent default and Default.

A repository that owns Arguments owns the entire Model/Effort/Arguments group, including an empty override. Other repositories inherit the global group. Permissions retain their separate ownership rules. The shared resolver preserves literal syntax it cannot safely lift, unknown model IDs, independent effort and captured choices through agent selection, complete Save and Start. The terminal path carries effort-only choices through the existing prepared-command delivery to older execution hosts.

The common pattern resolves typed choices before launch projection. Intended adaptations preserve user-owned CLI syntax across supported shells, opaque IDs, repository ownership, independent execution hosts and existing permission behavior. Broader Agents-default and compiler adoption is temporary and remains tracked in STA-11102. Settings → Agents model/effort controls are outside this PR; its existing permission-badge removal behavior is preserved for that follow-up.

Older Orca and phone versions may launch Source Control actions with a different Model, Effort or repository Arguments until they update (accepted).

Validation: the full feature, source-lifetime, migration, renderer, phone/host-contract and performance reviews passed independently. The late raw-edit repair passed a fresh delta review and 130 tests across four named owners. Nine red-before cases reproduced the bug; five additional controls were added afterward and are not claimed red. Normal commit hooks passed. A fixture-only portability completion at 8562de3 then passed independent review and 28 mounted-dialog tests; all executable fixture and production bytes remain unchanged. The authorized main integration at dd1f286 passed 67 tests across six named owners, the required merge hook, and independent integration review. These overlapping executions are not summed. All 19 frozen exported contracts are unchanged. Deliberate raw edits are committed into the submitted selection before Start, Save & start and a surface switch; untouched load conflicts remain raw.

Scoped Windows QA previously passed at 5b22618: both real Claude/Codex explicit and effort-only terminal replies, native remembered-model plus explicit High replies, repository-owned Arguments shadowing, and same-agent Terminal selection with inherited choices through Save & start. One genuine same-profile main-to-branch upgrade and graceful reopen preserved global/repository migration and ownership; all 26 PNGs were personally viewed and hash-verified. The historical permission-only repository fixture was prepared only while the disposable app was stopped before a fresh load, then exercised through ordinary UI actions. Actual CLI argv and executed turn context supplement screenshots. Production-path tests cover current-client delivery to older hosts. All prior owned copies and terminals were cleaned up and real config hashes stayed unchanged. Unchanged evidence carries; the targeted raw-edit result below covers the later repair.

Targeted Windows raw-edit QA passed at dd1f286: both real agents replaced migrated Model choices through terminal Start with Save OFF, and replaced Model/Effort through the same-agent native picker with repository Save & start. Actual CLI argv, provider transcripts, executed Codex turn contexts, canonical disk state and fresh dialog reopens agree. Save OFF retained the original recipes; Save ON retained only the new choices and residual Arguments. All 22 additional original PNGs were personally viewed and hash-verified. All 32 recorded identities are absent, ticket listeners are zero, real config hashes are unchanged, and ticket 3117 is released.

Limits: first-run terminal onboarding required continuing the already-requested harmless prompt once through CDP. This targeted run did not independently seed a remembered native-model/High cache; prior unchanged evidence and production tests carry. Four UI transactions are certified; auxiliary Claude transcript records are not additional scenarios. Historical raw rows were prepared in a stopped disposable profile, so this is not another genuine upgrade.

Current-head CI is green: PR checks, including all ten unit shards, static analysis/typecheck, Mobile verify, packaging, persistence and relay checks. Skipped jobs are not claimed as executions. The reviewed main integration is dd1f286. The only later commit, 8562de3, adds public test-fixture return type annotations; executable AST and production are unchanged, and 28 mounted tests plus independent review passed. Prior QA at 5b22618 carries only unchanged flows.

Visual proof: main global card, branch global card, branch repository card, Chat UI on, Chat UI off. The loop status comment lists route-by-route evidence.

Against integrated main aa1de42, production is +3,083/−840 lines, plus three locale catalog additions. Raw test/fixture accounting is +5,222/−1,312, plus 377 historical proof additions (5,599 charged proof additions). Whole-file moves include inherited text again at new paths; no relocation or formatter credit is taken. Main’s unrelated changes are excluded. Tests exceed production because the retained contracts cover separate persistence, renderer, phone and execution-host boundaries. All 66 distinct contracts and their nonoverlap are listed below.

Retained test contracts and nonoverlap

RAW-COMMIT-1 implementation:59 accepted contracts retained

The59 accepted contract labels/nonoverlap are retained. This follow-up adds the bounded raw-commit contracts below. Carried RAW-COMMIT execution (historical owner identities):130tests/4owners; historical red receipt is9failed/14passed/23tests/one earlier owner identity. Existing9 dialog registration ASTs and complete bodies/assertions/inputs remain identical to HEAD.

Contract Retained file:line Why another retained contract does not cover it
T2 exact first-inner-equals recognition and ownership src/shared/agent-launch-choices.test.ts:28 Malformed/prefix/numeric assignments and valid-unliftable ownership distinguish scanner recognition from literal lowering.
CH1 repeated choice-edit range/copy bound src/shared/agent-launch-choices.test.ts:58 Actual N/10N range reads/copied bytes exercise the cut seam, independently of transport or per-record migration.
Generic bounded/opaque/independent typed choices src/shared/agent-launch-choices.test.ts:147 No catalog gate, forged option key or oversized value; distinct from document shape validation.
Generic atomic lift and three-grammar duplicates/operands/terminator src/shared/agent-launch-choices.test.ts:158 Load role/mode refusal and exact surviving bytes are not final argv equivalence alone.
Generic load versus deliberate edit/conflict/composed policy src/shared/agent-launch-choices.test.ts:206 Edit replaces touched choices and dependent effort; load preserves authored conflict. Frozen generic owner remains distinct from action selection.
Remembered/default/yield isolation including permission-only layer src/shared/agent-launch-choices.test.ts:292 Accumulated choices can be defeated by raw even when incoming layer has no model; later explicit wins without importing another model options.
Raw inheritance and structured/terminal/legacy compatibility src/shared/agent-launch-choices.test.ts:312 Frozen profile/layer entrypoints and named-model prepared=false control are not action effort callback equivalents.
Literal spelling/order/UTF16 gaps across three shells src/shared/agent-launch-choices.test.ts:359 Exact original argv, quoting/config/composed spelling, equal gaps and non-BMP positions cannot be inferred from typed compilation.
Node lifetime under unrelated raw edit/removal/re-lift src/shared/agent-launch-choices.test.ts:359 Transport/trim/idempotence and later lift must not resurrect removed terms; differs from storage-only proof.
TP1 two-node canonical ordering and malformed document refusal src/shared/agent-launch-choices.test.ts:434 Real [9,18]→[0,0] witness retains both texts/order/raw, normalizes idempotently and lowers exactly; malformed external ordering still rejects.
Dependent effort retirement versus independent removal src/shared/agent-launch-choices.test.ts:497 Raw Model replacement retires dependent live effort while independent effort/permission survive their separate transitions.
FP1 complete raw-edit endpoint search operation bound src/shared/agent-launch-choices.test.ts:521 Actual migration→transport→lower; invalid-secondary, all-valid/exhaustion and two-node counts prove the endpoint-search seam, not CH1 cut work.
FP2 empty positive plan avoids tokenizer/remover src/shared/tui-agent-permission-choice.test.ts:717 Both public projection seams at128/1280, exact whitespace, genuine replacement positive work and invalid selected-shell non-Own control.
T3 explicit permission fallback/raw dominance and legacy projection src/shared/tui-agent-permission-choice.test.ts:111 Generic terminal Own/Ask/raw adapter semantics are independent of selected current action model group. Existing historical permission contracts were retained, not newly expanded.
Own empty/null/unrelated Args whole-group barrier src/shared/source-control-ai-action-recipes.test.ts:46 Central returned source/binding is checked independently of downstream emitted command; own raw suppresses G while permission uses old predicate.
Explicit agent/permission tuple versus model inheritance src/shared/source-control-ai-action-recipes.test.ts:217 Model eligibility and permission namespace differ; no raw-own barrier in this input.
Scoped/default/null/legacy canonical domain and literal dispositions src/shared/source-control-ai-action-recipes.test.ts:576 Complete/default decode, empty inherit disappearance, empty default retention, nested authority, foreign default, raw ownership and invalid new intent are separate from rendered authoring.
Deliberate complete-recipe Save preserves selected startup meaning src/shared/source-control-ai-action-recipes.test.ts:642 Actual resolve→full Save→resolve→project under permission-only R must retain inherited typed Opus/high when copied raw becomes owned. Incidental sparse writes deliberately differ.
Canonical launch normalizer/actual-agent projection src/shared/source-control-ai-actions.test.ts:41 Known action/type/binding owner and existing agent-switch/default/template guarantees remain distinct from direct modelSelection validator.
Writable complete/global/null/empty recipe serialization src/shared/source-control-ai-recipe-save.test.ts:26 Actual public write result and JSON clear sentinels are not central read projection or renderer ACK semantics.
C2 authored high conflicting with raw through real disk lifetime src/main/persistence/persistence-load-repair-durability.test.ts:98 Both agents actual load/flush/close/reopen preserve authored independent effort while lifting model/raw; raw-only migration is a different source.
Canonical raw-only global/repo migration and final startup src/main/persistence/persistence-load-repair-durability.test.ts:165 Actual nodes, canonical scoped/null/complete entries, source spelling, compiled both-agent command/applied values plus32/320 populations.
Disk migration failure/retry and no-op reopen src/main/persistence/persistence-load-repair-durability.test.ts:165 Failed write preserves disk, retry persists, second reopen has no repeated repair/write; differs from UI queue or mocked RPC store.
Valid current term becomes unprovable and durably demotes src/main/persistence/persistence-load-repair-durability.test.ts:406 Supported syntax becoming ineligible differs from malformed input or ordinary raw-only lift.
Malformed document/selection write refusal and stored-load preservation src/main/persistence/persistence-load-repair-durability.test.ts:447 Two real mutation/load refusal owners must retain input; successful normalize or disk failure alone does not prove this.
Actual global raw/menu/Save/Discard/reopen src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:136 Actual global draft/writer lifetime cannot be substituted by repository latest-base queue.
Actual repository raw/menu/Save/Discard/reopen src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:136 Shared UI executes a different writer/queue and exact submitted object; not a duplicate global path.
Raw permission adoption/permanent removal and input-work bound src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:262 Exact permission Args lifetime and per-keystroke range/copy work differ from model/effort syntax anchors.
Disabled/focus/null presence/raw permission rendered controls src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:341 Keyboard paths, geometry, untouched absence/null and terminal conflict warning require actual rendered events.
Sparse model edit does not author inherited permission src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:437 Menu versus permission edits and dirty raw preservation differ from prompt-only or explicit complete Save.
Residual edit, Discard and permanent Reset in both scopes src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:489 Two writer entrypoints must preserve live nodes during text changes and retire them on explicit reset.
Global rejected/pending Save with newer document src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:526 Global submitted baseline and pending edit ownership are not repo ACK queue success/failure.
RG-CLEAR real inherited Model clear through Save/reopen/G change/last clear/no-op src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx:576 The original renderer bug: sparse null owns only touched key, untouched effort follows later G, last clear cannot resurrect and unchanged Save writes zero.
Captured agent switch/failure/same-agent/newer edit src/renderer/src/components/settings/repository/source-control/repository-source-control-ai-global-ux.test.ts:48 Independent bound namespaces retire only captured old choices; agent switch cannot retag or destroy newer queued terms.
Repository optimistic failure and retry/newer Save src/renderer/src/components/settings/repository/source-control/repository-source-control-ai-global-ux.test.ts:274 Queue success/failure/base transform is independent of global exception and disk persistence.
Sparse prompt/menu writes and untouched siblings src/renderer/src/components/settings/repository/source-control/repository-source-control-ai-global-ux.test.ts:438 Prompt-only and menu writes must not complete inherited tuple/raw/permission or pin siblings; distinct from deliberate full Save.
Repository action/editor enablement/binding/null behavior src/renderer/src/components/settings/repository/source-control/RepositorySourceControlAiSection.test.ts:46 Real host registry/default/missing-agent rendering and source/plumbing ownership are not pure draft hooks.
Shared cards, first-row choices, full Arguments/Command and hidden gate src/renderer/src/components/settings/source-control-action-card-layout.test.tsx:76 Both scopes render existing controls/gates with own raw group labels, not merely serialized selection.
Current phone ownership/binding/default/literal/raw permission→full host command tests/e2e/source-control-action-phone-launch.unit.test.ts:18 Actual sender→real request schema→startup/compiler checks raw absence/configured fallback and exact options/applied/full output, not echo objects.
Transferred opaque named-model/raw-conflict pair tests/e2e/source-control-action-phone-launch.unit.test.ts:78 Both exact opaque low raw and own Opus/high outcomes/applied options survive in phone table; effort-only callbacks do not prove model conflict.
Phone sparse last-clear/foreign default/literal displacement tests/e2e/source-control-action-phone-launch.unit.test.ts:112 Current null per-key projection, same-bound inherited node suppression and foreign/literal lowering at actual agent distinguish value sources.
Global schema and canonical publication whitelist src/main/runtime/runtime-client-settings-source-control-projection.spec.ts:20 Actual schema/controller get can drop nested fields independently of disk normalization; permanently registered by included aggregate.
Repo update/schema/ACK/list/show envelope src/main/runtime/rpc/methods/repo-source-control-ai-publication.test.ts:7 Actual dispatcher and result shapes differ from settings projection; runtime store is mocked only at final boundary.
Setup plus optional repo create/list/update/notification src/main/runtime/runtime-project-host-setup-publication.test.ts:65 Independent explicit setup reconstruction may drop fields; differs from shallow repo projection and settings owner.
Dialog Save+Start/saved result/delivery/no duplicate write src/renderer/src/components/right-sidebar/runSourceControlAgentActionStart.test.ts:551 Persistence and delivery settlement start from canonical saved result rather than direct projector; foreign literal branch at626.
Canonical match/trim and central selected source comparison src/renderer/src/components/right-sidebar/source-control-action-recipe-match.test.ts:28 Same remapped document must match, changed inherited model beneath same permission-only authored tuple must not; different from emit-only command.
Dialog independently bound model/effort-only hint src/renderer/src/components/right-sidebar/SourceControlAgentActionDialogForm.test.tsx:138 Rendered hint cannot gate nested Model on outer permission agent or require a Model to describe independent effort.
C1 actual native action/remembered/held payload src/renderer/src/lib/structured-agent-session-launch-action-effort.test-fixture.ts:17 Both agents explicit high beats remembered low; held picker medium keeps normal precedence. Native create payload differs from terminal compilation.
Shared real effort plan plus pinned old no-model compiler control tests/e2e/prepared-action-launch.test-fixture.ts:33 Exact normalizer/projector/applied values/two full commands/real prepared predicate, portable pinned source112lines retained once.
Actual paired web adapter→real operation→complete-command consumer/result tests/e2e/web-runtime-session-terminal-host-authority.unit.test.ts:107 One legacy/zero authority with exact env/config/delivery; web session-tabs owner cannot stand in for background handler.
Actual background helper→schema/terminal.create/dedupe/runtime.createTerminal/result tests/e2e/launch-agent-background-session-remote.unit.test.ts:105 Paired identity, reserved tab/leaf/token/handle, background flags, result filtering and zero local/authority dispatch are background-specific.
Web post-create result versus bounded same-ID ambiguity tests/e2e/web-runtime-session-terminal-host-authority.unit.test.ts:483 Accepted create remains created after move/list failure; at547 two same-ID authority attempts/exhaustion yield zero legacy, unlike successful callback.
Background disappearance/subscription failure/public adoption tests/e2e/launch-agent-background-session-remote.unit.test.ts:175 At492 reject+cleanup differs from web-created; existing public adoption at293 proves public consumer without widening typed API.
Earlier phone/default-editor adaptation mobile/src/session/pr-ai-triage-launch.test.ts:1; src/renderer/src/components/settings/AgentLaunchDefaultsEditor.test.tsx:1 Retained accepted baseline contracts; not removed to pay for current amendment and not claimed rerun this stage.
Historical external migration159 + editor218 compatibility-feasibility-proof.patch; old-editor-baseline-proof.md Historical evidence remains charged377; not relocated or re-executed for current architecture proof.

FC1 executed contracts

All four upstream lifetimes were rerun through the actual dialog owner in final130-pass/4-owner execution; their complete test ASTs are unchanged. Earlier112-pass/9-owner evidence remains historical. The host/compiler/publication/queue owners outside these4 retain their prior receipts only; they were not rerun.

ID Current file:line Nonoverlap
FC1-U src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:234 Actual full dialog/AgentCombobox same-agent terminal button and saved-null row dispatch → real hook → selected hint/CLI visibility → complete Save via actual persistence owner with final I/O stubs → real Start orchestration → exact raw/options → fresh central resolution and mount. Includes independent effort without Model. Existing post-pick shared Save, direct Start and static hint contracts do not execute this upstream writer.
FC1-P src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:300 Masked-parent discriminator: eligibility at Codex retains R ownership; genuine Claude→Codex retires obsolete R, reveals captured G o3 with no G Own permission; intervening stored G=later cannot alter invocation. Complete Save/Start/fresh canonical reopening agree. Later fresh scope uses then-current G after explicit override reset. Neither same-agent retention nor flattened binding tests can recover the hidden current parent.
FC1-L src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:402 Actual migration supplies inherited Claude literal document; genuine Codex→Claude retains matching syntax and exact model/effort launch, complete canonical Save keeps document. Foreign switch demotes current terms once at existing gaps/order; returning does not reconstitute document/hint. Parser/gap tests alone do not execute picker/reset lifetime.
FC1-F src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:443 Owned empty Args + null/default Model barrier survives owning reset. Submitted empty raw/absent choices stay fixed through pending failed Save; newer real Input edit survives completion; durable scope remains unchanged; unmount/fresh mount discards unsaved edit. Existing Settings queue/disk failure owners do not own this invocation selection.

TR1: the FP1 row retains the migrated short fixture at agent-launch-choices.test.ts:579 and one short exhaustion invocation at:604, with exact gap0/lowered output. N/10N invalid-secondary/all-valid/exhaustion/two-node controls and operation bounds survive; only erased annotations changed in these performance owners.

Canonical-boundary completions remain runSourceControlAgentActionStart.test.ts:187 and:491. RPC publication remains repo-source-control-ai-publication.test.ts:7 with one repo-rpc fixture, plus25 registrations in repo.test.ts. The settings publication .spec remains imported by runtime-client-settings-projections.test.ts:4. Moved unit entrypoints use existing CI discovery; no config or ratchet-baseline change.

RAW-COMMIT-1 executed contracts

ID / current owner line Contract Nonoverlap
RAW1 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:505 Deliberate residual replacement before no-blur Start and Save&start; exact global/repo raw/options, complete compiler command and canonical saved/fresh mounted reopen. Earlier migration and post-submission newer-edit cases never typed replacement before submission.
RAW2 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:587 Actual same-agent Chat picker hides pending Args before submission; Claude and recorded Codex syntax; explicit options versus remembered/held precedence. Distinct from the terminal compiler, and from the unchanged native create-message production fixture run in the same command.
RAW3 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:558 Typed G Opus/high remains captured, R default remains complete, ownsArgs=false and R permission source stay unchanged; operation-derived model literalKeys; terminal/native Save/reopen. Inherited-literal default rows additionally preserve untouched displaced Effort as raw. Typed masked G is not equivalent to inherited literal G or a whole-own-Args barrier. Source equality and actual upstream dispatch both execute.
RAW4 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:677 Untouched raw conflict does not commit on Start; unrelated residual edit and empty residual retain nodes. Rules out unconditional arguments-edit on every submission; no accepted occurrence grants membership on unrelated edits.
RAW5 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:703 Sparse captured-parent Model replacement with independent R Ask and foreign-bound option; later stored G change cannot alter submitted meaning. Convenience own tuple does not contain the effective old model; this detects resolving from that tuple or rereading Global.
RAW6 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:752 Pending replacement settles in pretransition grammar before genuine owning-agent demotion; return does not restore old nodes. Foreign-syntax Codex row separately keeps hidden foreign text out of residual analysis then lowers it at remapped gaps. Different from same-agent route preservation and static foreign-agent projection; artificial duplicate prepend would fail the foreign row.
RAW7 src/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.test.tsx:780 Model-independent high survives; supported raw acceptEdits updates separately bound permission; unsupported plan remains raw with Ask typed unchanged. Dependent old-model effort retirement is distinct. Plan is not an AgentPermissionChoice; preserving it raw tests grammar refusal without an action gate.

The mounted suite has28cases after compact parameterization; all9 prior registration ASTs remain unchanged. The new cases are registered only in the existing owner; the fixture has no test registrations or copied production policy. Native requested/create options are test evidence, not an agent reply or running-app QA. No contract or assertion was removed for line accounting.

Final main integration carry

All59 retained contracts and RAW1–RAW7 remain; no new contract or deleted proof. Current mounted dialog bytes equal accepted fix-parent fff264a (root removed only three unused imports before that commit). Current targeted execution is67 tests/6owners, not additive/disjoint from historical130/4owners. Incoming saved-review registration is retained and adds no A contract. Lines reflect current integration; earlier execution identities remain historical.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 27, 2026 08:36
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

The change adds shared logic to identify, reconcile, and project agent model, effort, and permission choices from launch arguments and preferences. It updates agent CLI catalogs to declare recognized choice forms and adds settings controls for editing and removing choices. Settings drafts can now carry updated user arguments alongside launch preferences. Tests cover choice parsing, launch resolution, settings edits, and persistence.

Priority: Normal

Merge Risk: Low · up to 758bc

Some choice chips show a misleading Effort tooltip. This is a narrow labeling issue, so the change is mergeable with an acknowledged follow-up.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "Keep action model and effort choices out of Arguments" describes a real and central part of the changeset: the action Model and Effort menus take over choices that previously lived in the r…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is detailed and covers the change scope, rationale, testing, visual proof, compatibility limits, CI results, and review evidence. It does not follow the template structure and omits an…
Full details: Title check

Explanation

The title "Keep action model and effort choices out of Arguments" describes a real and central part of the changeset: the action Model and Effort menus take over choices that previously lived in the raw Arguments text, and the change migrates owned CLI recipes into those choices. It is specific and concise. It does not cover the full scope, which also includes shared choice reconciliation, layering, launch projection, and catalog grammar changes, but that is expected for a title.

Full details: Description check

Explanation

The description is detailed and covers the change scope, rationale, testing, visual proof, compatibility limits, CI results, and review evidence. It does not follow the template structure and omits an explicit ELI5 section, a Fixes # issue link, AI disclosure, agent-skill boundary, and checklist confirmations.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
⚔️ Resolve merge conflicts: 💡
  • Resolve merge conflict in branch brennanb2025/sta-11102-model-action
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c26221b-eda9-47e5-b896-2318690998f5
Commits

Reviewing files that changed from the base of the PR and between 1fdf896 and 81573b9.

Files selected for processing: 45
  • src/main/persistence/persistence-load-repair-durability.test.ts
  • src/renderer/src/components/settings/AgentCatalogRow.tsx
  • src/renderer/src/components/settings/AgentLaunchDefaultsEditor.test.tsx
  • src/renderer/src/components/settings/AgentLaunchDefaultsEditor.tsx
  • src/renderer/src/components/settings/AgentPermissionChoiceControls.tsx
  • src/renderer/src/components/settings/RepositorySourceControlAiActionRows.tsx
  • src/renderer/src/components/settings/SourceControlActionArguments.tsx
  • src/renderer/src/components/settings/SourceControlActionModelPicker.tsx
  • src/renderer/src/components/settings/SourceControlActionRecipeRow.tsx
  • src/renderer/src/components/settings/SourceControlAiActionRecipeDefaults.tsx
  • src/renderer/src/components/settings/repository-source-control-ai-text-draft.ts
  • src/renderer/src/components/settings/source-control-action-card-layout.test.tsx
  • src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx
  • src/renderer/src/components/settings/source-control-action-recipe-draft-state.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/launch-agent-web-host-tab.ts
  • src/renderer/src/lib/runtime-agent-background-create.ts
  • src/shared/agent-choice-args.ts
  • src/shared/agent-choice-cli-apply.ts
  • src/shared/agent-choice-layers.ts
  • src/shared/agent-choice-reconciliation.ts
  • src/shared/agent-launch-choices.test.ts
  • src/shared/agent-launch-choices.ts
  • src/shared/agent-launch-preferences.ts
  • src/shared/agent-launch-profile.ts
  • src/shared/agent-permission-args.ts
  • src/shared/agent-session-option-catalog-antigravity.ts
  • src/shared/agent-session-option-catalog-claude-codex.ts
  • src/shared/agent-session-option-catalog-codebuddy.ts
  • src/shared/agent-session-option-catalog-gemini-cursor.ts
  • src/shared/agent-session-option-catalog-grok.ts
  • src/shared/agent-session-option-catalog-muse.ts
  • src/shared/agent-session-option-catalog-omp.ts
  • src/shared/agent-session-option-catalog-opencode.ts
  • src/shared/agent-session-option-catalog-types.ts
  • src/shared/agent-session-option-catalog.ts
  • src/shared/agent-session-option-launch.ts
  • src/shared/source-control-action-launch-preferences.ts
  • src/shared/source-control-action-permission-lift.ts
  • src/shared/source-control-ai-action-recipes.test.ts
  • src/shared/source-control-ai-actions.test.ts
  • src/shared/source-control-ai-actions.ts
  • src/shared/tui-agent-launch-defaults.ts
  • src/shared/tui-agent-permission-choice.test.ts
  • src/shared/tui-agent-permission-lift.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Comment thread src/shared/agent-choice-args.ts Resolved
Comment thread src/shared/agent-launch-profile.ts Resolved

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fa660d79-2894-4cd3-8943-afdd6c5e4492
Commits

Reviewing files that changed from the base of the PR and between 00c2827 and 560e1c3.

Files selected for processing: 5
  • src/main/persistence/persistence-load-repair-durability.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-action-effort.test-fixture.ts
  • src/renderer/src/lib/structured-agent-session-launch-create-message.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-create-message.ts
  • src/shared/agent-choice-reconciliation.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@coderabbitai coderabbitai 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.

Nitpick comments: 1
src/shared/source-control-action-launch-preferences.ts: 1

89-89: Trivial · Maintainability & Code Quality · Low value

Optionally remove the unused helper fields.

sourceControlActionLaunchOptions returns only sessionOptions. Remove its unused Pick member and return property. Update tests that read this helper property.

This is a type-only cleanup. Do not remove yield support from terminalSessionOptionInputs or the general launch request types; those APIs still support that behavior.

Suggested fix
 export function sourceControlActionLaunchOptions(
   recipe: Pick<
     SourceControlActionRecipe,
-    'agentId' | 'launchPreferences' | 'launchPreferencesYieldToAgentArgs'
+    'agentId' | 'launchPreferences'
   >,
   agent: TuiAgent
-): {
-  sessionOptions?: Readonly<Record<string, string>>
-  sessionOptionsYieldToAgentArgs?: true
-} {
+): { sessionOptions?: Readonly<Record<string, string>> } {

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b120c92a-3f96-41b1-830a-37939b29547b
Commits

Reviewing files that changed from the base of the PR and between 8bfb374 and 758bcd9.

Files selected for processing: 16
  • config/vitest.config.ts
  • mobile/src/session/pr-ai-triage-launch.test.ts
  • mobile/src/session/pr-ai-triage-launch.ts
  • src/main/persistence/persistence-load-repair-durability.test.ts
  • src/renderer/src/components/settings/RepositorySourceControlAiActionRows.tsx
  • src/renderer/src/components/settings/SourceControlActionArguments.tsx
  • src/renderer/src/components/settings/repository-source-control-ai-draft.ts
  • src/renderer/src/components/settings/repository-source-control-ai-global-ux.test.ts
  • src/renderer/src/components/settings/repository-source-control-ai-labels.ts
  • src/renderer/src/components/settings/source-control-action-card-layout.test.tsx
  • src/renderer/src/components/settings/source-control-action-permission-draft.test.tsx
  • src/renderer/src/lib/fix-checks-agent-launch.ts
  • src/shared/source-control-action-launch-preferences.ts
  • src/shared/source-control-action-phone-launch.test.ts
  • src/shared/source-control-ai-action-recipes.test.ts
  • src/shared/source-control-ai-operation-policy.ts
Files with no reviewable changes: 1
  • src/renderer/src/lib/fix-checks-agent-launch.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No blocking code issue was found in the changes since the previous review.

Summary

Source Control actions now keep Model and Effort separate from Arguments while preserving repository ownership and saved launch choices.

  • Source Control actions carry model and effort choices through launch.
  • Global and repository action settings save model and effort with Arguments.
  • The action dialog saves and starts from one captured selection.

Reviews (4) · Last reviewed commit: "Name portable Source Control dialog fixt..." · Reviewed by Greptile

Reconcile deliberate raw edits once into the submitted action recipe so replacement model and effort flags reach Save and Start together. Preserve captured sources and untouched load conflicts.
Preserve both mobile test transforms and current Source Control action choice behavior.
@brennanb2025

brennanb2025 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Source Control actions previously mixed saved model/effort flags with raw Arguments and could lose inherited choices when changing the launch surface. Global and repository action cards now share Model/Effort dropdowns and removable badges. Loading existing settings lifts safe flags while preserving remaining Arguments and repository ownership. Defaults remain Agent default and Default.

The full review loop finished its feature, source-lifetime, migration, renderer, phone/host-contract and performance review. No open P0/P1 remains. The 19 frozen public contracts are unchanged. The common pattern's central typed-choice mechanism was adopted; intended adaptations preserve arbitrary user CLI syntax, opaque models, independent effort, repository ownership and mixed execution hosts. Broader defaults/compiler adoption stays temporary in the existing follow-up. A deferred P3 tooltip wording nit does not change behavior.

Older Orca and phone versions may launch Source Control actions with a different Model, Effort or repository Arguments until they update (accepted). Updated client behavior and prepared delivery to older execution hosts are covered by production-path integration tests. No carrier, inverse or legacy publication was introduced.

Scoped Windows app verification passed at 5b22618. Both real agents returned replies for explicit model/effort, reset-to-Agent-default with effort-only terminal commands, and native remembered-model plus explicit High effort. The repository-owned Arguments route ignored the global group and returned a real reply. One genuine baseline-main-to-branch profile upgrade lifted global and repository flags, preserved a repository's unrelated owned Arguments, and survived graceful reopen without duplicate badges. The permission-only repository inheritance case kept model/effort through same-agent Terminal selection and repository Save & start, with a real reply and canonical saved meaning.

That last historical sparse state cannot be authored by current Customize UI, which deliberately copies the complete group. It was set up only in the stopped disposable profile before a fresh window load; the launch, selection and Save were ordinary UI actions. All other setup/settings and the upgrade baseline were UI-authored. Actual CLI argv and executed Codex turn context back the screenshots; native create packets were not intercepted. Older execution-host delivery uses integration proof, not an extra app sweep.

All 26 original PNGs were personally viewed and hash-verified. All owned copies stopped through graceful Browser.close plus recorded-descendant cleanup, with zero final survivors/listeners; real config hashes were unchanged. The first local admission exhausted available drivers before any UI action; those failed setup attempts are retained and are not passing evidence.

For Brennan's review:

Surface or flow Evidence
Global migration Main · Branch · Model menu
Repository migration and ownership Main lifted input · Branch lifted badges · Own Args/default Model · Default Effort
Chat UI visibility Global on · Global off restored · Repository on
Claude explicit / effort-only Explicit reply · Agent default + Low reply
Codex explicit / effort-only Explicit reply · Agent default + Low reply
Native remembered model + High Claude reply · Codex reply
Repository own Arguments Own group controls · Default-model reply
Permission-only inherited group Hint after same-agent Terminal pick · Real reply
Raw Claude Model-only terminal / Model+Effort native Save Edited input · Terminal reply · Native reply · Saved reopen
Raw Codex Model-only terminal / Model+Effort native Save Edited input · Terminal reply · Native reply · Saved reopen
Selected full-window screenshots

Global action card after migration

Repository action card after migration

Claude raw Model and Effort replacement: real native reply

Codex raw Model and Effort replacement: real native reply

Human judgment spots: captured source and raw commit, load migration, and submission boundary.

Targeted Windows raw-edit QA passed at dd1f286: both real agents replaced migrated Model choices through terminal Start with Save OFF, and replaced Model/Effort through the same-agent native picker with repository Save & start. Actual CLI argv, provider transcripts, executed Codex turn contexts, canonical disk state and fresh dialog reopens agree. Save OFF retained the original recipes; Save ON retained only the new choices and residual Arguments. All 22 additional original PNGs were personally viewed and hash-verified. All 32 recorded identities are absent, ticket listeners are zero, real config hashes are unchanged, and ticket 3117 is released.

Limits: first-run terminal onboarding required continuing the already-requested harmless prompt once through CDP. This targeted run did not independently seed a remembered native-model/High cache; prior unchanged evidence and production tests carry. Four UI transactions are certified; auxiliary Claude transcript records are not additional scenarios. Historical raw rows were prepared in a stopped disposable profile, so this is not another genuine upgrade.

Current-head CI is green: PR checks, including all ten unit shards, static analysis/typecheck, Mobile verify, packaging, persistence and relay checks. Skipped jobs are not claimed as executions. The reviewed main integration is dd1f286. The only later commit, 8562de3, adds public test-fixture return type annotations; executable AST and production are unchanged, and 28 mounted tests plus independent review passed. Prior QA at 5b22618 carries only unchanged flows.

@brennanb2025
brennanb2025 merged commit 85a1d7b into main Oct 29, 2026
57 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/sta-11102-model-action branch October 29, 2026 07:26
audichuang added a commit to audichuang/orca that referenced this pull request Oct 30, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 2, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 3, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 4, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 5, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 5, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 6, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 7, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 8, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 8, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 10, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 10, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 12, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 13, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 14, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 16, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 18, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 18, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 19, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 20, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 20, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 20, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang added a commit to audichuang/orca that referenced this pull request Nov 21, 2026
…s action selection API

Upstream stablyai#34275 made getLaunchActionRecipe return a SelectedSourceControlActionRecipe
and the saved-start path take a selection instead of a recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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