Uh oh!
There was an error while loading. Please reload this page.
feat(pasqal): python provisioning — activation venv + AMICO_PYTHON injection - #189
Merged
Conversation
…jection The fresh-install fix: the fork's validator spawn resolves $AMICO_PYTHON → bare python3, and on a fresh machine no ambient interpreter has pasqal-cloud, so the validator exits 1 and the panel misreports 'Service unreachable'. The extension now owns the interpreter: venv from the STAGED requirements.txt (hash-gated, stamp-on-success), injected via the single buildServerSpawnEnv seam so no respawn path drops it; background slow path self-heals via the existing restart command. Host $AMICO_PYTHON wins outright. Behavioral CI gate (source + vsix lanes) proves the shipped assets provision a working interpreter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kateebonner
commented
Jul 20, 2026
ContributorAuthor
Verification record (merging on this evidence):
🤖 Generated with Claude Code |
kateebonner
marked this pull request as ready for review
July 20, 2026 20:46
Uh oh!
There was an error while loading. Please reload this page.
jack-champagne added a commit
to harmoniqs/opencode
that referenced
this pull request
Jul 28, 2026
The unit job died with exit 137 and reported nothing. Not an OOM (peak 0.37GB of 32GB, zero faults) — a segfault inside @napi-rs/keyring's native setPassword(), reached from the pasqal submit success path. Install the in-memory secret store, as the sibling amicode-connections.test.ts already does. Production is unaffected: the same write succeeds under `bun run … serve`, verified end-to-end against Pasqal with real credentials. Also swap the stub validator from a bun-executed .mjs to a python3-executed .py. amicode provisions <opsDir>/venvs/pasqal-connector and passes it as AMICO_PYTHON (harmoniqs/amicode#189), so the production interpreter is always a real python; bun-as-interpreter tested a configuration that never ships. Drop the windows unit lane: opencode.lock.json ships darwin-arm64 and linux-x64 only, and it was the ~50min long pole while red for an unrelated reason (#76). Refs #82, #76
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 freeto 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.
Implements the Slack-thread decision (option 1: extension-provisioned venv; Aaron + Kate aligned). Issue to be filed from the thread — will re-title
fix(#NN)when it exists.Summary
Fresh installs cannot connect to Pasqal: the fork's validator spawn resolves
$AMICO_PYTHON→ barepython3, no ambient interpreter haspasqal-cloud, the validator exits 1 ("SDK not installed"), and the panel misrenders the config lane as "Service unreachable" (found live-testing v0.0.3-alpha; root-caused against the shippedamicode.8binary, whoseAMICO_PYTHONsupport was verified live before this was written).pasqal_python.ts(mirrorspasqal_assets.ts): probe hostpython3≥ 3.10 (PATH + well-known absolute candidates — Dock-launched VS Code inherits the launchd-minimal PATH),-m venvunder<opsDir>/venvs/pasqal-connector,pip install -rthe staged requirements.txt. Hash-gated: stamp written only after pip exit 0, so failed provisions retry free next activation; fast path is stat+hash, zero subprocesses.buildServerSpawnEnvbuilder used by all three spawn sites (boot, solver-mode respawn, vault respawn) — no respawn path can drop it. S37 ("no AMICO_* env propagation") note amended in place: this is server-child plumbing for the fork's validator spawn, NOT amico-run contract; amico-run still receives nothing via env.amicode.restartServer, so a fresh install self-heals without a reload.$AMICO_PYTHONwins outright and skips provisioning (the$AMICO_PASQAL_VALIDATORconvention; absent-not-empty semantics match the fork's resolver).{ PATH, HOME }— poison-token test proves no secret rides argv, env, or failure copy.Freeze respected
release.ymluntouched, no tag cut. amico-run argv contract untouched.launch.tszero-line diff. Unprovisioned sessions:buildServerSpawnEnvoutput byte-identical.Deferred (out of scope)
Fork-side rendering of the config-lane error text (panel currently shows state-generic "Service unreachable" copy; the route already returns the precise message).
amico-pasqallauncher interpreter unification (submit path). Windows venv layout (lock targets darwin-arm64/linux-x64 only). Staging of the 3 submit-path connector scripts.Gate results
tsc --noEmitclean · prettier cleanv1.17.3-amicode.8)assert_provisioned_python.mjs(mirrorsassert_packaged_cli.mjs): local run 4/4 PASS — pin parse, real venv+pip from shipped assets, SDK import at ==0.23.0, validator env-guard smoke. Wired inci.ymlonly: fast job (source lane) + vsix-gate job (assets unzipped from the real artifact).🤖 Generated with Claude Code