Skip to content

feat(#63): Δ10 per-solve routing UX — SolveSpec executor + confirm-not-auto-route - #186

Merged
kateebonner merged 4 commits into
mainfrom
amico/issue-63-routing-ux
Jul 20, 2026
Merged

feat(#63): Δ10 per-solve routing UX — SolveSpec executor + confirm-not-auto-route#186
kateebonner merged 4 commits into
mainfrom
amico/issue-63-routing-ux

Conversation

@kateebonner

Copy link
Copy Markdown
Contributor

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.

  • Executor contract: solvespec.schema.json executor enum ["local"] → ["local","remote"]. Uses remote to 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.
  • Confirm + estimate: new packages/extension/src/routing.ts shapes the "run on company compute?" guidance spliced into the agent's AGENTS.md; step 5 now teaches: run amico-run estimate → surface sizeClass / estimatedBytes-vs-local-RAM / reason → confirm per-solve → set executor. Estimator is suggestion-only (drives the confirm default via offloadSuggested, never decides).
  • Gating (the subtle one): the remote offer renders only when solver mode is hp and 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.
  • Token safety: UI reads status only from the connections seam's non-secret cache (~/.amico/connections.json), whitelisting state/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 executor on the SolveSpec. launch.ts dispatch and the inspector/runs path are untouched.

Deferred (out of scope)

Actual remote dispatchlaunch.ts still 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

  • schema: 43/43 · extension: 686 pass / 4 skip (+20 tests: 11 routing, 4 opencode_config, 5 agents_md) · amico-run regression: 314/314 · typecheck clean · prettier clean

🤖 Generated with Claude Code

kateebonner and others added 4 commits July 20, 2026 03:09
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>
)

# Conflicts:
#	packages/schema/schemas/solvespec.schema.json
@kateebonner
kateebonner merged commit fb4c357 into main Jul 20, 2026
5 checks passed
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.

Δ10-UX — per-solve routing UX (local vs company-compute)

1 participant