Skip to content

solver: issimo entitlement switch — watcher, config re-prep, server restart, AGENTS solver-mode - #127

Merged
Rchari1 merged 2 commits into
mainfrom
rchari/solver-wire
Jul 14, 2026
Merged

solver: issimo entitlement switch — watcher, config re-prep, server restart, AGENTS solver-mode#127
Rchari1 merged 2 commits into
mainfrom
rchari/solver-wire

Conversation

@Rchari1

@Rchari1 Rchari1 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Extension half of the real solver switch (pairs with harmoniqs/opencode#14).

What it does

  • solver_mode.ts: poll-watcher on solver-mode.json (the fork toggle's POST target). On a switching request it does the REAL switch: applyEntitlementForMode grants/revokes the issimo entitlement (other codes preserved) → re-runs prepareOpencodeProject (skills/scores/allowlist follow the entitlement) → restarts the opencode server → writes status:ready. This exercises the exact machinery a paid subscription will use (packageAllowlist → agent + amico-run import scan).
  • HP mode actually authors Piccolissimo (the load-bearing fix): a new templates/solve_template_hp.jl (Piccolissimo SplineIntegrator+SplinePulseProblem, cubic-spline rollout) preserving the run-dir contract line-for-line (AMICODE_ITER/PULSE/META, STOP poll, result.toml, iter PNGs). Both prepareOpencodeProject sites (boot + switch) select the template by solver mode. Optimizer stays Ipopt — Altissimo's backend exposes no per-iteration hook, so the live convergence stream + cooperative stop only exist on Ipopt (another reason Altissimo execution is a follow-up).
  • AGENTS gains a ## Solver mode section in HP (author with Piccolissimo; never claim cloud execution).

Known follow-ups (flagged, not in scope here)

  • The score-local template path (scores/pulse-designer/templates/solve.jl) + tier-1 registry are NOT yet mode-aware — a solve routed through the score resolver can still pick plain Piccolo. Needs its own design pass (shared registry contract).
  • Julia env auto-provisioning (dev machines currently need a one-time Pkg.develop of the Piccolissimo/Altissimo checkouts).
  • Server-restart hardening on rapid flips.

Verification

442 tests green (4 new solver-mode tests: state round-trip, entitlement grant/revoke/preserve/idempotence, watcher single-fire+busy-latch); packaging guard updated so the HP template ships; live-verified end-to-end — flip → issimo granted → restart → ready → boot log shows solve_template_hp.jl → allowlist gains Piccolissimo.

🤖 Generated with Claude Code

Rchari1 and others added 2 commits July 9, 2026 12:29
…le's POST), grant/revoke the issimo entitlement (other codes preserved), re-prep the session project, restart the opencode server, then report ready; AGENTS gains a '## Solver mode' section in HP (author with Piccolissimo, never claim cloud execution) + tests

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… (Piccolissimo, same run-dir contract) selected by solver mode at both prep sites

The agent's vetted-solve flow follows {{TEMPLATE_PATH}} procedurally, so an
appended AGENTS instruction could never make HP sessions author Piccolissimo
solves — the template file itself must swap. solve_template_hp.jl mirrors
solve_template.jl line-for-line in every contract section (AMICODE_ITER,
AMICODE_PULSE_META/AMICODE_PULSE, STOP-file cooperative stop, iter PNGs,
result.toml, pulse.jld2, DONE) and swaps only the solver layer: CubicSplinePulse
+ Piccolissimo SplineIntegrator (Tsit5) inside SplinePulseProblem, rollout at
interpolation=:cubic. The optimizer stays Ipopt — AMICODE_ITER needs the raw
IPM state (inf_pr/inf_du) and the STOP poll rides Ipopt's intermediate
callback; Altissimo exposes neither. Both prepareOpencodeProject call sites
(boot + solver-mode watcher re-prep) now select the template by mode, and the
packaging guard pins the new asset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Rchari1
Rchari1 merged commit 911e182 into main Jul 14, 2026
5 checks passed
@Rchari1
Rchari1 deleted the rchari/solver-wire branch July 14, 2026 20:01
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