Skip to content

fix(julia): ship Piccolo 2.2 env so the vetted template runs; let slow suites run (#2180) - #2187

Open
jacktrnr wants to merge 3 commits into
mainfrom
fix/2180-julia-env-piccolo22
Open

jacktrnr wants to merge 3 commits into
mainfrom
fix/2180-julia-env-piccolo22

Conversation

@jacktrnr

@jacktrnr jacktrnr commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2180

What changed

Shipped Julia environment (packages/extension/julia)

  • [compat] raised to Piccolo 2.2, DirectTrajOpt 0.11, NamedTrajectories 0.9.4 (unchanged floor). MadNLP is now a direct dep (0.9, what DTO 0.11 admits), because the vetted template does import MadNLP; without it the template fails to load on the shipped env even once Piccolo is bumped.
  • Manifest re-resolved with Julia (Pkg.update(...; preserve=PRESERVE_NONE) → resolve → instantiate), not hand-edited. Resolved: Piccolo 2.2.0, DirectTrajOpt 0.11.0, NamedTrajectories 0.9.4, MadNLP 0.9.2, CairoMakie 0.15.13, JLD2 0.6.7. julia_version moves 1.12.5 → 1.12.7 (same minor, which is what the installer and the setup command pin).
  • Fresh-directory instantiate of the shipped files (what install.sh and "Amicode: Set up Julia" do) succeeds, loads Piccolo/MadNLP/CairoMakie/JLD2, and leaves the Manifest byte-identical.

Upgrade path for existing users (AC4)

  • New juliaProjectStatus() → current | stale | missing. stale means the env was set up before from an older bundled pin (the marker records a different fingerprint, or there's a Manifest with no marker from a pre-marker install).
  • Healthcheck now says the project is on an older pinned Piccolo stack and to upgrade by running "Amicode: Set up Julia", instead of "not instantiated". The agent's Setup-state section renders "Piccolo project out of date" and offers the upgrade. The setup command's toast says it is upgrading. Re-running setup already re-copies the bundled pin and re-instantiates in place, so the upgrade itself needed no new machinery.

Slow suites (AC3)

  • test/setup_hermetic_env.ts now lets AMICO_TEST_JULIA_PROJECT through. Every other AMICO_*/AMICODE_*/OPENCODE_* var is still cleared. The rule lives in test/hermetic_env.ts with a unit test.
  • Julia slow suites gate through test/slow_gate.ts (gateSlowSuite), which logs why a suite skipped on stderr.
  • New test/slow/pulse_designer_probe.test.ts runs the pulse-designer template's own header (imports + version probe), read from the template and never edited, against the supplied project.

Fast guard (AC1/AC2)

  • test/julia_env_pins.test.ts reads the floors from the template's probe text and asserts the shipped Manifest and [compat] satisfy them, and that every non-stdlib template import is a direct dep. A future floor bump in the template fails this until the env follows.

The template itself is untouched (#2174 owns it).

Verification

  • CI: all checks green.
  • Fast suite (pnpm --filter amicode test): 348 files passed, 2 skipped; 5840 tests passed. tsc --noEmit clean.
  • RED evidence: the pins test failed 4/6 on the old env. The probe slow test failed against an old (Piccolo 2.1) ~/.amico/julia.
  • Slow suites with AMICO_TEST_JULIA_PROJECT=<fresh instantiate of the shipped env>:
    • pulse_designer_probe ✓, template (solve_template.jl via amico run) ✓, verify_harness 2/2 ✓, verify_spline_free_phase 2/2 ✓
    • calib_chain, mocksoc_rehearsal: skipped, with the logged reason that AMICO_TEST_REHEARSAL_PROJECT is still cleared by the hermetic setup (see follow-ups)
  • Pulse-designer template, unmodified, end to end through amico run on the shipped env: FINISHED status=completed, F = 0.99959. Piccolo 2.2 prints an optimizer-vs-rollout divergence warning (0.026 > 0.005). That's the template's own behavior, out of scope here.
  • amico-run slow integration (x-gate, h-gate): failed on 2.2 at first. The fixture solve_common.jl used the raw callback kwarg, which is Ipopt-only, and DTO 0.11 defaults to MadNLP, so no AMICODE_ITER was emitted. Fixed by naming IpoptOptions() in the fixture (the fixture tests the run-dir contract, not solver choice). Now 2/2 ✓.
  • Other templates on the shipped env, through amico run:
    • scores/pasqal-mis/templates/solve.jl: completed, F = 0.9952
    • templates/skeleton_free.jl with its own commented example authored in: completed, F = 0.99997. Unmodified, it stops with op not defined, which is expected for an author-first skeleton.
    • templates/solve_rydberg_cz.jl (status experimental, not tier-1 eligible): fails after the solve with a BoundsError in the free-phase scan, which passes a 4×4 goal with a 9-dim subspace to unitary_fidelity. This predates the bump: unitary_fidelity is identical in Piccolo 2.1.0 and 2.2.0, so it fails on the old env too. Left alone here.
    • Not run: solve_template_hp.jl (needs Piccolissimo, which isn't in the shipped env), mocksoc_rehearsal.jl (separate rehearsal env).

Follow-ups (not done here)

  • solve_rydberg_cz.jl free-phase scan bug (predates this PR, see above).
  • AMICO_TEST_REHEARSAL_PROJECT is still cleared by the hermetic setup, so the two rehearsal suites can't opt in from the shell. Their skip reason now says so.
  • templates/mocksoc-rehearsal/Project.toml still pins Piccolo = "~2.1". It consumes pulses solved on the 2.2 solve env, so the cross-version JLD2 path is unverified until the rehearsal suites can run.

🤖 Generated with Claude Code

…w suites run (#2180)

The shipped Julia environment pinned Piccolo 2.1 / DirectTrajOpt 0.10.1, but the
vetted pulse-designer template's version probe requires Piccolo >= 2.2 /
DTO >= 0.11 / NamedTrajectories >= 0.9.4 and refuses to run on anything older.

- Raise [compat] to Piccolo 2.2 / DTO 0.11 and add MadNLP (0.9, what DTO 0.11
  admits) as a direct dep, since the template `import MadNLP`s. Manifest
  re-resolved with Pkg.update + instantiate: Piccolo 2.2.0, DirectTrajOpt 0.11.0,
  NamedTrajectories 0.9.4, MadNLP 0.9.2.
- Fast test pins the shipped Manifest/compat to the template's own probe floor
  and checks every non-stdlib template import is a direct dep.
- The hermetic test setup now passes AMICO_TEST_JULIA_PROJECT through; every
  other AMICO_*/AMICODE_*/OPENCODE_* var is still cleared.
- Slow Julia suites gate through gateSlowSuite, which logs why a suite skipped.
  New slow suite runs the pulse-designer template's own version probe.
- An env set up from an older bundled pin is reported as "out of date, upgrade
  via Amicode: Set up Julia" (healthcheck + agent setup state) instead of "not
  instantiated"; re-running setup upgrades it in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 47cce952-6241-4aff-a696-70d0ed392e58
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Jackson Turner and others added 2 commits November 23, 2026 17:24
…2180)

The rehearsal suites need AMICO_TEST_REHEARSAL_PROJECT, which the hermetic
setup still clears. Their skip reason now says that instead of suggesting a
shell export that cannot take effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…back (#2180)

DTO 0.11 (Piccolo 2.2) defaults to MadNLP, where the raw `callback` kwarg never
fires, so the fixture emitted no AMICODE_ITER lines and both integration tests
failed on the shipped env. The fixture tests the run-dir contract, not solver
choice; it now names IpoptOptions explicitly, as the template's Ipopt arm does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jacktrnr
jacktrnr marked this pull request as ready for review November 23, 2026 22:52
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.

Shipped Julia environment pins Piccolo 2.1, so the vetted template refuses to run; slow template tests never run

1 participant