decide the phase 2 fork: turns stay on opencode run
The serve has a second, newer API surface nobody here had looked at, and it publishes exactly what the parity doc calls impossible under stdin ignore: delivery steer and queue on POST /prompt, an interrupt that does not tear down, and a per-session event stream with an after cursor — the durable-replay machinery officer hand-built for claude, as a primitive. That would have made migrating obvious. It does not execute. A prompt is accepted with an admittedSeq, stored, emits prompt.admitted and prompted, and then never steps. Ruled out separately: the model, the permissions (build is *:allow, no pending requests), the per-request location (the surface is location-scoped via header or a deepObject query, supplied everywhere, no change), and a config gate. The legacy POST /session/id/message?directory= generates fine in 17s, so the serve itself works — only the new pipeline is inert. session.next.* is the tell. And not a version problem, which is the part everything here had backwards: this Mac runs 1.18.11 and alpha runs 1.17.9, measured. The dead pipeline was tested on the NEWER binary. The original "this server runs 1.17.9" meant alpha and was copied to a machine where it was false; corrected in runner.ts and the test. So building against it now would produce code that looks finished and does nothing, which is the failure mode this project keeps rediscovering. One request reopens the question after any upgrade, and the doc names it. Also de-flakes the lifecycle tests: they spawn real processes, and a fixed sleep(750) went red once on a machine busy running these probes. Presence assertions poll now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,10 +60,13 @@ const running = new Map<string, RunHandle>();
|
||||
|
||||
// Shape of `opencode run --format json` events.
|
||||
//
|
||||
// Verified live against opencode 1.17.9 (this server) and reported working on 1.18.11 elsewhere. Nothing
|
||||
// enforces either — the binary is whatever is installed on the machine, and two machines in this project
|
||||
// already differ. `runner.test.ts` pins the mapping itself so a shape change fails a test rather than a
|
||||
// turn; if it starts failing, re-read the NDJSON from the installed binary before editing the test.
|
||||
// Verified live against opencode 1.18.11 (this Mac) and 1.17.9 (alpha) — MEASURED on 2026-08-10, having
|
||||
// previously been recorded the other way round here: the "this server" in the original note meant alpha,
|
||||
// and the comment was copied to a machine where it was false. Nothing enforces a version anyway; the
|
||||
// binary is whatever is installed, and the two machines in this project already differ.
|
||||
//
|
||||
// `runner.test.ts` pins the mapping so a shape change fails a test rather than a turn; if it starts
|
||||
// failing, re-read the NDJSON from the installed binary before editing the test.
|
||||
type RunPart = {
|
||||
type?: string;
|
||||
text?: string;
|
||||
|
||||
Reference in New Issue
Block a user