fix(agents): tell the agent to import Piccolo alongside Piccolissimo - #225
Merged
Conversation
Cloud solves were failing at load time with an UndefVarError: the agent wrote `using Piccolissimo` alone. Piccolissimo does not re-export Piccolo's symbols, and every problem-setup name the template uses comes from Piccolo — GATES, TransmonSystem, EmbeddedOperator, UnitaryTrajectory. The HP solver-mode section told the agent to author "with the Piccolissimo stack (`using Piccolissimo`)", which reads as a replacement for `using Piccolo` rather than an addition. It now says to import BOTH, names the symbols that break, and says why it matters: the error lands before any solve starts, so on a cloud run you pay the full queue and instance-boot wait before seeing it. The bundled template already imports both, so this only affects scripts the agent authors itself. solverModeSection is exported to make it testable — its sibling routingSection already was. extension: 780 passed, tsc clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Rchari1
added a commit
that referenced
this pull request
Jul 29, 2026
The template gained a SOLVER flag but nothing told the agent it exists, so an
agent asked for Altissimo would hand-roll a solve call — and silently lose both
telemetry channels plus the iteration budget:
- frames come off IpoptOptions.intermediate_callback, which AltissimoOptions
has no equivalent of, so a hand-written call leaves the Run Inspector fully
dark rather than merely numberless;
- a `max_iter` passed to solve!(::AltissimoOptions) lands in kwargs... and is
dropped, so the solve quietly runs Altissimo's default 20 outer iterations;
- inf_pr/inf_du need deriving from eq_viol/ineq_viol/kkt_error on Altissimo
builds that predate #414.
The template already handles all three. The guidance now says the switch is ONE
line — `SOLVER = :altissimo` in the FILL-IN block — and states each trap, so the
instruction carries its own justification rather than reading as arbitrary.
solverModeSection is exported to make it testable, matching its already-exported
sibling routingSection. (The same one-line export is on #225; identical change,
so either merge order is fine.)
extension: 778 passed, tsc clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Rchari1
added a commit
that referenced
this pull request
Aug 5, 2026
…nvented API
Third cloud solve, third hand-authored script, zero uses of the vetted
template. The latest (task 975a7c07, exit 1) invented API wholesale:
CubicSplinePulse(; T=, n_knots=, n_drives=, bounds=) every real method takes
POSITIONAL args, so an
all-keyword call matches
no method
CallbackLogger(qcp) not defined in Piccolo
or Piccolissimo
get_fidelity(qcp) not defined either
It died with a MethodError at LOAD time, before any optimization — after the
user had already paid the full queue and instance-boot wait. Verified by
running the script locally and by checking each symbol with isdefined against
both packages.
Naming the specific invented symbols is what made the earlier `using Piccolo`
guidance stick (#225), so the same treatment here rather than another abstract
"follow the template" line.
Worth being explicit about what this does NOT fix: guidance is not enforcement.
The durable version is a preflight that resolves the script's symbols against
the entitled packages before submitting, which needs the Julia stack — not
available on a cloud-only machine, which is the whole point of the tier. In the
meantime aws-infra#230 makes the failure VISIBLE: with the runner's output
redirected to run.log, a MethodError reaches the user's run dir instead of
dying invisibly in the SSM stream, which is why this one presented as a bare
"failed, exit 1".
Co-Authored-By: Claude Opus 5 (1M context) <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.
The failure
Cloud solves died at load time with an
UndefVarError, before any solve started — the agent had writtenusing Piccolissimoalone.Piccolissimo does not re-export Piccolo's symbols, and every problem-setup name comes from Piccolo:
GATES,TransmonSystem,EmbeddedOperator,UnitaryTrajectory.Why the agent got it wrong
The HP solver-mode section said to author "with the Piccolissimo stack (SplinePulseProblem, free-phase paths,
using Piccolissimo) rather than plain Piccolo" — which reads as a replacement forusing Piccolo, not an addition.It now says to import both, names the symbols that break, and says why it matters: the error surfaces before the solve begins, so on a cloud run you pay the full queue and instance-boot wait (~10 min) before seeing it.
Scope
Guidance only. The bundled template already imports both, so this affects only scripts the agent authors itself — which is exactly where the failures came from.
solverModeSectionis exported so the guidance is testable; its siblingroutingSectionalready was.Testing
New test drives the real
solverModeSection()withmode: "hp"and asserts the both-imports instruction, the "does NOT re-export" rationale, and the named symbols — with a guard that the section isn't empty, so a misfiring mode gate can't make the assertions vacuous.extension: 780 passed,
tsc --noEmitclean.Separate from #219 by request — this is a one-line-of-guidance fix and shouldn't wait on that branch.