β.2: vendor + pin opencode (closes #2) - #8
Conversation
…ension Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ract enforcement Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ash spike (S31 grep green) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ontract end-to-end Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jack-champagne
left a comment
There was a problem hiding this comment.
β.2 looks solid — approving in spirit. Pulled the stacked branch locally and ran it end-to-end: build/typecheck green, fast tier 44 (amico-run) + 10 (extension) passing, fetch:opencode downloaded the real v1.17.3 linux-x64 and the committed SHA verified against the live GitHub release, and test:smoke drove the real binary to GET /event → 200 text/event-stream with a clean SIGTERM exit. CI is green on all three jobs, so the darwin-arm64 pin is machine-gated too. Supply-chain handling (archive-hash-before-unpack, hard-fail with no override, atomic temp→rename install, injectable download for hermetic tests) and graceful degradation (chat disabled but the extension still activates) are exactly right.
Two inline notes — one's a question for you on the leftover AMICO_* env wiring, the other a CI-cost suggestion. Neither blocks.
| cwd: opencodeProject.projectDir, | ||
| env: { | ||
| PATH: `${binDir}:${process.env.PATH ?? ""}`, | ||
| AMICO_JULIA_SCRIPT: juliaScript, |
There was a problem hiding this comment.
@Rchari1 — this AMICO_* env + PATH=binDir:$PATH injection looks like leftover spike wiring, and it cuts against β.1's all-argv / no-AMICO_* contract (S37 / Q90 — amico-run takes everything via argv, nothing from env). I'm inclined to kill it. Before we rip it out: is there something the opencode server still needs these for (a tool the chat slice invokes that reads them), or can β.3 pass them through amico-run flags instead? Want your read.
| - uses: actions/setup-node@v4 | ||
| with: { node-version: 20, cache: pnpm } | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm --filter amicode-v2 fetch:opencode |
There was a problem hiding this comment.
Both matrix legs re-download ~157MB on every run. Worth an actions/cache step keyed on hashFiles('packages/extension/opencode.lock.json'), restoring packages/extension/vendor/ before this step — the .sha256 idempotency stamp already makes fetch:opencode a no-op on a cache hit, so unchanged pins skip the download entirely.
…xpected-throw→exit 64, updateLatest per-runId temp (concurrent-submit race), version single-sourced from package.json; solve_common.jl on Piccolo 1.19 via public Piccolo.Callbacks (no reach-through) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n hashes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ion (S35) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e spike smoke tests v1.17.3 passes: GET /event → 200 text/event-stream against a synthesized project, clean SIGTERM exit. No walk-back needed despite the 1.3.x-era spike. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e matrix; .vscodeignore ships vendor/ Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4bb031b to
26d9018
Compare
|
Thanks — on your two notes:
(Branch force-updated from the β.1 rebase — same content, just restacked on the #7 fixes.) |
feat: amicode-managed Julia setup via juliaup (#8, layers 1-3)
Closes #2. Stacked on #7 (β.1 workspace layout) — base will retarget to
mainautomatically when #7 merges.Implements
spec-20260610-155955-vendor-opencode(in amico#132): the extension no longer assumesopencodeon$PATH.What this is
opencode.lock.json— committed pin: opencode v1.17.3, per-platform SHA256 (darwin-arm64 + linux-x64). Bumping the pin = one-file PR, gated by CI.scripts/fetch_opencode.mjs— zero-dep download-at-build: SHA256-verified against the manifest (hard fail, no retry/override on mismatch — supply-chain signal), unpack-to-temp + atomic rename, idempotent (.sha256stamp → offline repeat builds),--recordmode for pin bumps.vendor/is gitignored.src/opencode_binary.ts— resolution: config override (dev-only) → vendored path from the extension install dir → hard error with fetch/reinstall instructions. No$PATHfallback (§4 Assumption 4 stays dead). Config default"opencode"→"". On a missing binary the extension still activates (inspector/watcher/commands) with chat disabled.test/boot_smoke.mjs— the S35 gate: synthesized project → vendored binaryserve→GET /event→ 200text/event-stream→ clean SIGTERM exit. No LLM creds needed. Runs as a two-platform CI matrix (ubuntu-latest + macos-14) and as the namedtest:smokescript β.4's packaging step will call..vscodeignore— exists sovscedoes NOT fall back to.gitignore(which would silently exclude the binary from the VSIX);!vendor/**negation makes the intent explicit.smoke_cli,smoke_opencode_boot,opencode_boot_harness,vscode_shim); extension now has a real vitest unit suite (10 tests) in the fast CI job (pnpm -r run test).AC → evidence
/eventSSE 200opencode.lock.json+ fetcher mismatch tests; local smoke:GET /event → 200 (text/event-stream) … PASSon v1.17.3; CIboot-smokematrix$PATHopencode_binary.tsresolution tests;extension.tswiring; config default""Notes
/event.)boot_smoke.mjs(plain node) so vitest's glob can't pull a network test into the hermetic suite; the fetcher buffers the download in memory rather than a temp file (outcome-equivalent, nothing half-written); idempotent path printsup to date:instead of exiting silently.vsce packageper platform afterfetch:opencode --platform <target>;.vscodeignorealready shipsvendor/**.🤖 Generated with Claude Code