feat(#63): Δ10 per-solve routing UX — SolveSpec executor + confirm-not-auto-route - #186
Merged
Conversation
The per-solve routing confirm sets executor to "remote" when the researcher picks company compute; the SolveSpec carries that choice upstream (Freeze 1 S12: downstream stays executor-agnostic). Extends the enum from ["local"] to ["local","remote"]; "cloud" and other bogus values stay field-precisely rejected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
routing.ts owns the Δ10 routing UX decision logic: read whether Company Compute is connected (from the connections seam's NON-SECRET status cache — status only, never the token in ~/.amico/cloud.json) and shape the "run on company compute?" guidance spliced into the agent's AGENTS.md. The remote OFFER renders ONLY when BOTH the connection exists AND solver mode is hp — the flip is one-way, so mode alone would keep offering company compute to a disconnected session. The Estimate suggests the confirm's default (offloadSuggested); the researcher always confirms, per-solve, never auto-routed. buildRoutingSection returns "" otherwise, so piccolo / disconnected sessions stay byte-identical. Wired via routingSection() appended in prepareOpencodeProject alongside solverModeSection(). All hermetic: scratch files + $AMICODE_OPS_DIR / $AMICODE_CONNECTIONS_FILE overrides, no network. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Step 5 now: estimate (amico-run estimate) → confirm route → assemble. Routing is per-solve and explicit, defaults to local, and never auto-routes (large estimate never routes; cloud-key entry never routes). Company compute is offered ONLY when the spliced Routing section is present (i.e. connected); executor is set "remote" only on explicit confirmation, else "local" — the choice the SolveSpec carries upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Closes #63. Records a per-solve routing choice (local vs company compute) on the SolveSpec, surfaced through an explicit confirm that is informed — never decided — by the estimator. Nothing auto-routes; default is local.
solvespec.schema.jsonexecutor enum["local"] → ["local","remote"]. Usesremoteto match the existing executor infrastructure (launch.ts --executor local|remote,remote_executor.ts); the issue's "e.g. hp" was an example, the existing plumbing is authoritative."cloud"/bogus values stay field-precisely rejected.packages/extension/src/routing.tsshapes the "run on company compute?" guidance spliced into the agent's AGENTS.md; step 5 now teaches: runamico-run estimate→ surface sizeClass / estimatedBytes-vs-local-RAM / reason → confirm per-solve → set executor. Estimator is suggestion-only (drives the confirm default viaoffloadSuggested, never decides).hpand a connection currently exists. The HP flip is one-way (disconnect doesn't revert mode), so gating on mode alone would keep offering company compute to a disconnected session — hence gating on live connection status.~/.amico/connections.json), whitelistingstate/identity; the token (~/.amico/cloud.json) is never read and no probe is fired. Adversarial test proves a poisoned cache can't leak a token/base_url.Freeze respected
Downstream stays executor-agnostic — this slice only sets
executoron the SolveSpec.launch.tsdispatch and the inspector/runs path are untouched.Deferred (out of scope)
Actual remote dispatch —
launch.tsstill reads executor from the CLI flag and blocks--spec --executor remote(verification is local-only). #63 records the choice; honoring it downstream is separate plumbing (#32 / Δ8 remote_executor lane). AGENTS.md copy is careful not to over-claim cloud execution.Gate results
🤖 Generated with Claude Code