β.6: demo dry-run + failure fallback (closes #6) - #11
Conversation
jack-champagne
left a comment
There was a problem hiding this comment.
Gave β.6 a look — runbook + fallback read well, CI green. Two demo-asset gaps stood out.
Must change (before demo day)
demo/run/has norun.log, but the inspector readsrun.logto build the stats row — so the replayed demo renders a blank stats row, which undercuts the 'exactly like a live solve' fallback. Bundle a realrun.log(or soften that claim).- AGENTS.md step 2 copies to
solve.jlbut step 3 runs/tmp/amicode-work/solve.jl— author/run paths should match.
Taste / non-blocking
- Q52 (detached launch) is effectively being set here — worth ratifying rather than closing-by-impl.
| 3. Run it **detached** so the chat doesn't block on the ~minutes-long solve: | ||
| ```bash | ||
| mkdir -p /tmp/amicode-work | ||
| ( nohup amico-run --project <JULIA_PROJECT> /tmp/amicode-work/solve.jl \ |
There was a problem hiding this comment.
Step 2 copies to solve.jl but you run /tmp/amicode-work/solve.jl here — have step 2 write to that path so they match.
…p subshell) + hands off to inspector Replaces the synchronous run + blocking 'quote DONE line' steps with a detached ( nohup ... & ) launch so the ~100s Julia solve can't hit opencode's ~120s bash-tool timeout. Agent hands off to the Run Inspector, which streams iterations + final fidelity from the run dir. No setsid (Linux-only; breaks the macOS demo). Guard test enforces the idiom + no-block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lback
A real transmon-X solve (F=0.99998, 60 iters) captured under demo/run/:
manifest, run.log, 7 iter_*.png frames, result.toml, FINISHED{completed}.
pulse.jld2 omitted (inspector never reads it). Ships in the VSIX via
.vscodeignore !demo/**; packaging.test.ts now requires demo/run/. Removed
the stale local amicode.vsix so the packaging assertion stays inert until
Task 6 rebuilds it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (fresh runId, β.1 contract) Pure fn: copies demo/run/ under a fresh generateRunId(), rewrites the manifest run_id to match, appendIndex + updateLatest. Reuses the β.1 primitives so the staged dir is contract-identical and the existing watcher renders it. Unit test validates the staged manifest/FINISHED against the β.1 validators and asserts latest + index resolve. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s the pre-baked solve Command Palette 'Amicode: Replay demo run' stages the bundled demo/run/ into the resolved runs root via stageDemoRun and focuses the Run Inspector. The watcher follows latest -> replays the converged solve with no Julia/opencode/ creds. Guards a missing bundle with a clear reinstall message. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ecklist + RUNBOOK fallback CONTRACT.md freezes the β run-dir layout + provisional schemas (Phase-β DoD); exit codes + index/latest paths verified against amico-run. DEMO_CHECKLIST.md is the pre-flight + live + DoD sign-off with a timings table. RUNBOOK gains a Fallback section pointing at 'Amicode: Replay demo run'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a9c4e2c to
7c768d8
Compare
2363f8c to
ddec597
Compare
…ck review nits The real "plots never display" bug: LiveRunSink shared one counter between image() and iter(). run.log AMICODE_ITER lines stream once per iteration and race the counter to max BEFORE the lagging PNG frames land (solver logs iter=k, then writes iter_k.png), so every image() hit `k <= latest` and was dropped — blank inspector for the whole solve. Split into SinkDedup: frames dedup only against frames; log lines advance a separate high-water mark for the status bar. Extracted SinkDedup to the pure, vscode-free run_dir_reader layer so the live path is finally unit-tested (Jack #9: "no test covering the live status-bar / incremental inspector path" — the exact gap this regression slipped through). Also folds in the remaining non-blocking review nits (kept here rather than restacking the 7-deep chain to place one-liners on their home branches): - #13: #runlabel was styled but never populated → setRunLabel + webview handler. - #12: resolveJuliaProject now expands a leading ~ (parity with resolveRunsRoot). - #9: server_manager ServerOptions.env comment no longer cites the removed AMICODE_EXTENSION_URL/MCP-callback env. - #9/#11: AGENTS.md step-2 author path now matches step-3 run path (/tmp/amicode-work/solve.jl) and the invocation passes --lab default (run provenance — amico-run supports --lab). Plus the cold-start display polish already in flight on this branch: launch stays idle for a prior finished run (no stale plot), and the placeholder toggles via style.display (the [hidden] attr was overridden by .placeholder{display:flex}). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ipped) Jack #11 must-change ("bundle a real run.log") never actually landed: the demo run.log is matched by .gitignore's `*.log`, so it was never committed. .vscodeignore has `!demo/**` so it'd ship IF present on disk — meaning it only "worked" on the capture machine; a clean checkout / CI VSIX shipped the demo with NO run.log → blank stats row, exactly the failure he flagged. Un-ignore the asset (.gitignore negation), track it, and assert it in the packaging manifest test so a future drop is caught. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@jack-champagne on your other must-change ("demo/run/ has no run.log → blank stats row"): you were more right than the branch showed. The run.log is matched by Fixed in 32438de (on #23, stacked above): un-ignored the asset via a Both landed on #23 to avoid restacking the 7-deep chain for these. If you'd rather they sit on this PR proper (so #11 is correct in isolation), say the word and I'll relocate + restack. |
|
CONTRACT.md is the strong part — run-dir layout + validators + exit codes frozen and verified against cli.ts. Two issues, both fixed in #23 (now validated end-to-end), recording for history:
Non-blocking follow-ups: |
jack-champagne
left a comment
There was a problem hiding this comment.
Approving as a unit member — the script-path mismatch and the missing run.log are both fixed in #23 (validated). Non-blocking follow-ups noted above.
Closes #6 — the final β task. Makes the live demo robust and freezes the Phase-β contract. Stacked on #10 (β.4); base
rchari/beta4-provisioning(retargets tomainas the stack lands).What & why
The live demo had one real failure mode (diagnosed on-machine): the agent ran
amico-runsynchronously, so the ~100 s Julia solve blew past opencode's ~120 s bash-tool timeout and any mid-turn message aborted the turn → "trouble running gates." This PR removes that, adds an on-site fallback, and freezes the contract.1. Detached solve (
AGENTS.md)The agent now launches the solve detached and hands off to the Run Inspector — the bash tool returns in <1 s, no timeout:
Portable (macOS + Linux): no
setsid(Linux-only — it would silently break the Mac demo). Replaces both the synchronous run step and the blocking "quote the DONE line" step. A guard test (agents_md.test.ts) enforces the idiom (nohup+& )+ "Run Inspector"), forbidssetsid, and forbids any "wait for the solve to finish".2. Pre-baked replay fallback
demo/run/bundles a real known-good transmon-X solve (F=0.99998, 60 iters, 7 frames;pulse.jld2omitted). New command "Amicode: Replay demo run" (amicode.replayDemo) stages it via the pure, unit-testedstageDemoRun(demoDir, runsRoot)— fresh β.1 runId, manifestrun_idrewritten,indexappended,latestswung — and the existing watcher replays the converged solve with no Julia, no opencode, no creds. Ships in the VSIX (.vscodeignore !demo/**);packaging.test.tsnow requiresdemo/run/.3. Phase-β DoD
CONTRACT.mdfreezes + documents the run-dir layout, the provisionalvalidate*schemas, and amico-run's exit codes (verified againstcli.ts).DEMO_CHECKLIST.mdis the pre-flight + live + DoD sign-off with a timings table.RUNBOOK.mdgains a Fallback section.Verification
rm -rf node_modules && pnpm install && build && typecheck && test→ 45 amico-run + 33 extension green. VSIX packs (30 files, 39.7 MB); packaging assertion confirms all 11demo/run/files ship.amico-runlaunched via the exact idiom, launcher exited, solve ran in the background and reachedFINISHED{completed}F=0.9998 (92 s solve + cold precompile). The hard pgid-SIGKILL on tool teardown stays the acknowledged residual risk (nosetsidon macOS, spec §7) — the replay fallback covers it; a killed solve shows "running", never a false completion.Split (per spec §1)
The timed clean-machine live rehearsal + the chat→LLM hop is yours to run from
DEMO_CHECKLIST.md(this PR ships the artifacts + checklist it fills in).This completes the β phase (β.1–β.6).
🤖 Generated with Claude Code