Repository navigation
[Feature]: pi agent has no launch-time model selection — add a pi session-option catalog (--model / --thinking) - #444
Merged
Merged
Conversation
Author
|
The gatekeeper did not merge (it never merges on a failed gate).
|
nplez1
force-pushed
the
nplez1/issue-434
branch
from
November 17, 2026 09:52
e8cbcc0 to
963b362
Compare
Author
|
The gatekeeper did not merge (it never merges on a failed gate).
|
nplez1
force-pushed
the
nplez1/issue-434
branch
from
November 17, 2026 10:10
963b362 to
fcb3d14
Compare
The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the two deleted cases so a reverted catalog flag, a reverted --thinking apply or a dropped capability gate fails again.
…#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the coverage in surviving suites rather than by restoring the retired file, and record the decision in the sync ledger.
… fail (#434) Round-2 review: getAgentSessionOptionLaunchCatalog returns null, never undefined, so toBeDefined() could not fail when the pi branch was deleted.
nplez1
force-pushed
the
nplez1/issue-434
branch
from
November 17, 2026 10:15
fcb3d14 to
b195d2d
Compare
Author
|
Merged as Gate — clean worktree at
Review — Decisions
Workspace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #434
Summary
The launch-time model selection this issue asks for already shipped on
main, and the repro is version skew rather than a missing feature:3e0b7f791a2—feat(pi): offer a thinking level for Pi terminal launches (#41006)adds theeffort→--thinkingoption toPI_LAUNCH_OPTION_CATALOG.d0882ca38c2—fix(pi): accept --model/--effort for Pi agent launch and worker-start (#42255)addssupportsWorkerLaunchPreferences: true,isPiModelOptionId+ theprovider/idrefusal, thepientry in the extra-arguments allowlist, and the host capabilityagent.launch.pi-model.v1that makes an old host refuse instead of starting Pi on its default model.git tag --contains d0882ca38c2→v1.4.214-np.56. The issue's base is3babb8f5f8(2026-10-17), which predates both commits;1.4.214-np.50therefore refuses exactly as reported.So
orca agent launch --agent pi --model <provider/id> --effort <level>compiles topi --model <provider/id> --thinking <level>,orca worktree create --agent pi --model …goes through the same validator, and a host that cannot apply a Pi model refuses withincompatible_runtimeinstead of dropping the flag.What was actually missing is the coverage:
b9b4a115c53(test: remove low-value CLI dashboard and browser examples (#42316)) deleted every test that pinned those behaviours — the whole ofagent-launch-model-preferences.test.tsand theagent.launch.pi-model.v1refusal case inindex-agent-launch.test.ts. Nothing else in the suites asserted Pi--thinking, Pi model acceptance, or the capability refusal.This PR restores that coverage, in surviving suites rather than by restoring the retired file, and records the decision in the sync ledger:
src/shared/agent-session/options/catalog-providers/agent-session-option-catalog.test.ts— api launch catalogblock: thepilaunch catalog resolves,{model, effort}is accepted and compiles to['--model', …, '--thinking', 'xhigh']; a model without aprovider/idand a thinking level Pi does not list are both refusedinvalid_argument.src/cli/index-agent-launch.test.ts—orca agent launch --agent pi --model …against a host withoutagent.launch.pi-model.v1exits 1 withincompatible_runtimeand makes noagent.launch,agent.launchReplayorworktree.createcall.local/sync/convergence-ledger.md— a2026-11-17 addendumunder § "Test inventories retired upstream" recording the re-homing, so a future sync does not re-litigate it.No production code changes.
Verification
pnpm test src/shared/agent-session/options/catalog-providers/agent-session-option-catalog.test.ts --maxWorkers=2pnpm test src/cli/index-agent-launch.test.ts --maxWorkers=2pnpm tcpnpm check:code-quality:changed mainorca-queue node local/gate-unit.mjsUnit gate @e8cbcc000e (clean): PASS — 26392 passed; 1 failed (0 allowlisted, 0 unexpected); 1 flaky re-run passed; 0 unhandled error headline(s); 240 sThe diff touches
src/shared/**andsrc/cli/**, so the full unit gate applies and was run on the pushed revision. The one failure wasFLAKY, not ours:src/main/network/best-effort-socket-type-of-service.test.ts › installBestEffortSocketTypeOfService reproduces the native EINVAL on a reset macOS socket— it passed on the gate's isolation re-run, and it is unrelated to this diff.Discrimination was checked by reverting each behaviour and re-running, then restoring:
supportsWorkerLaunchPreferences: truefromagent-session-option-catalog-pi.tsfailslaunches Pi on a chosen model and thinking level;provider/idrefusal fromagent-launch-model-preferences.tsfailsrefuses a Pi model without a provider;callAgentLaunchfails the CLI case withexpected 'runtime_error' to be 'incompatible_runtime'.Decisions
mainand inv1.4.214-np.56; the honest fix for the report is the release note plus restored regression coverage. The PR body states this so the reporter is pointed at np.56.agent-launch-model-preferences.test.ts.local/sync/convergence-ledger.md:922,:2223and:2594all say the same thing — a deleted upstream test file is not restored; the assertion goes into a surviving suite next to the code. Re-adding the file would have re-paid sync churn for coverage upstream retired, and the new ledger addendum records why this coverage is worth keeping anyway (the feature it pins is live, and#42316deleted it as collateral of an examples sweep).docs/agents-md-refs/test-antipatterns.md:16lists "Assert copy or translations" as an anti-pattern, andmessageis English copy while the only structured field this contract exposes iscode. The cases assertrefusal.code, which is the observable contract at this layer, and each still fails when the behaviour it names is reverted (verified above).agent.launch.pi-model.v1gate on federatedorchestration worker-start. A federated start already refuses on the execution host:legacy-remote/federation.ts:65→prepareFederationWorkerLaunchOnHost→prepareFederationConfiguredWorkerStart→resolveWorkerStartAgent→resolveWorkerLaunchPreferences→checkAgentLaunchModelPreferences, which refuses when that host's Pi catalog lackssupportsWorkerLaunchPreferences, before any worktree is created.isKnownRemoteStartFailuretreatsinvalid_argumentas a known failure, so the home host records and reports it. There is no silent-drop window, and a home-sideagent === 'pi'test would miss alias-mapped Pi agents, whose aliases only the remote resolves.models: []), and listing them needs a host-sidelistModelsprobe plus a change toagentPickerListsCliModels. Thinking levels already appear in the launcher since#41006. This is noted here rather than folded in, since it is renderer and host work outside a CLI launch issue.Reviewed by claude/opus, high: R1 clean after 1 SHOULD-FIX and 1 MINOR fixed, R2 clean with its one MINOR applied