Skip to content

Solver toggle does not actually switch — backend half stranded in stale PR #14 #78

Closed

Description

@jack-champagne

Tracking issue for work stranded on rchari/solver-wire (PR #14, opened 2026-07-09, ~278 commits behind).

Only the UI half is on the default branch. Verified:

$ git ls-tree -r --name-only origin/local/amicode | grep -i solver
packages/ui/src/amicode/solver-toggle.test.ts
packages/ui/src/amicode/solver-toggle.tsx
packages/ui/src/components/amicode-solver-toggle.tsx

solver-mode.ts and the switch wizard are absent. So the toggle renders but there is no server-side solver-mode contract behind it — PR #14 was the half that makes it do the real switch.

What PR #14 carried that is still missing (+286/-6):

  • packages/opencode/src/server/amicode/solver-mode.ts — the contract
  • route registration in httpapi/server.ts
  • packages/ui/src/amicode/solver-switch-wizard.tsx — the wizard
  • packages/opencode/test/server/amicode-solver-mode.test.ts
  • wiring in packages/app/src/pages/home.tsx and solver-toggle.tsx

Note home.tsx has changed substantially under the branch, so expect conflicts on any rebase — a fresh implementation against current local/amicode is likely cheaper.

Closing PR #14 as stale. Needs an owner.

Activity

  1. added 2 commits that reference this issue on Aug 21, 2026
  2. kateebonner commented on Aug 21, 2026

    @kateebonner
    Contributor

    Resolved by #221 (d0b2a1c on local/amicode).

    The toggle now does a real switch in both directions:

    • → hp: rides a validated Company Compute credential (requestHpFlip, Provider permissions: enforcement hook in permission system #167).
    • → piccolo: POST /amicode/solver-mode (piccolo-only) → requestPiccoloFlip(), which revokes the issimo entitlement and writes the mode file in one operation. The extension watcher re-preps the session config and restarts the server.

    That also closes the split-brain this issue implied but didn't name: a piccolo mode file sitting beside a granted issimo entitlement, which reconcileSolverMode (amicode#259) heals straight back to hp.

    Two deliberate deltas from the checklist above:

    1. No standalone server/amicode/solver-mode.ts. The contract landed in connections.ts instead, so the switching writers stay in one file — the single-writer rule ADR 0001 asks for.
    2. No solver-switch-wizard.tsx. Not deferred so much as superseded: connection-banner.tsx already narrates the restart window ("Server connection dropped — reconnecting…" → "Server reconnected", self-healing), and the extension posts a completion toast. The wizard also polled GET /amicode/solver-mode, which does not exist, and its hp stages assume an hp flip from a button — which ADR 0001 now forbids.

    The remaining gap is cosmetic: during a deliberate switch the banner reads as a fault rather than an upgrade. Tracked separately if we decide the demo needs it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions