Repository navigation
feat(pipeline): replace the handcrafted OpenAI client with the official openai-go SDK + a fully-authored CUE param surface - #26
Conversation
…al openai-go SDK + a fully-authored CUE param surface
The engine's agent runtime hand-rolled the entire OpenAI-compatible wire path
(chatRequest/chatMsg structs, a net/http POST, a 121-line SSE parser) and
hardcoded every request knob. That client could not do vision, dropped
reasoning deltas, sent no max_tokens/response_format/seed/stop, and silently
dropped tool_choice (ollama's compat request struct has no such field). It is
now DELETED and replaced by github.com/openai/openai-go/v3.
SDD: every parameter is authored in charly.yml through the plugin's own CUE
schema (schema/pipeline.cue -> params/cue_types_gen.go, regenerated by
cue exp gengotypes, reproducible).
- schema/pipeline.cue: #LLMSpec gains organization/project/timeout/
idle_timeout/max_retries/headers/params; NEW #LLMParams (temperature, top_p,
max_tokens, max_completion_tokens, frequency/presence_penalty, seed, stop,
response_format, reasoning_effort, reasoning, stream_options,
parallel_tool_calls, tool_choice, logprobs, top_logprobs, user, metadata,
logit_bias, and an extra escape hatch); #ResponseFormat/#Reasoning/
#StreamOptions/#NamedToolChoice; #StageLLMSpec + the #AgentStage llm
override. Both param defs are closed - an unknown or wrong-typed field is a
LOAD error naming the CUE path.
- llm.go: resolveLLM applies env > stage > entity > built-in default
FIELD-WISE; the client is built per call with explicit options. It uses
NewChatCompletionService (NOT NewClient) so a stray OPENAI_API_KEY /
OPENAI_BASE_URL / OPENAI_CUSTOM_HEADERS can never hijack a lane; an empty
resolved key sends NO Authorization header (the keyless local ollama needs
none); the request params map 1:1 onto the SDK union.
- chat() re-implemented on NewStreaming + ChatCompletionAccumulator, KEEPING the
RCA'd IDLE bound (a per-chunk watchdog that cancels the request ctx - not a
whole-generation deadline) and the empty-completion guard. ollama's
non-standard reasoning delta (which the SDK accumulator drops) is read from
the raw JSON, so a reasoning-only 200 is reported as a NAMED empty completion
instead of a bare one - the real shape behind the intermittent lane failures.
- tools.go: the catalog now renders openai.ChatCompletionToolUnionParam; the
catalog + dispatchTool are unchanged.
- executor.go: rc.llm was map[string]any assigned via mm(p.Llm) - the same
map-assertion defect already RCA'd for rc.media, which made an authored llm
block a SILENT no-op. It is now the generated params.LLMSpec, assigned
directly.
- vision: chatVision/imageDataURL send a screenshot as a base64 image_url
content part DIRECTLY to the endpoint (ollama supports base64 data URLs only).
This is the primitive the screenshot-vision check verb will drive.
- tests: the SSE fixtures now speak the SDK's chunk shape; 13 conformance tests
prove each authored param reaches the wire (incl. vision content parts,
reasoning-only, empty completion, idle-stall, precedence, NO OpenAI_* env
bleed, custom headers, response_format, extra) + 3 LIVE R10 tests against real
ollama. Two mutations prove the guards are load-bearing: neutralising the
reasoning read reds TestConformance_ReasoningOnlyIsNamedEmpty, and swapping
NewChatCompletionService for NewClient reds TestConformance_NoOpenAIEnvBleed.
Verification:
cd candy/plugin-pipeline
gofmt -l . # clean
go vet ./... # clean
go test -count=1 ./... # ok (93 tests)
go test -count=1 -race ./... # ok
cue exp gengotypes . + diff params/cue_types_gen.go # PARAMS REPRODUCIBLE
charly box validate (eval-omarchy + a full llm block, local override)
-> OK; an unknown param -> #PipelineInput.llm.params.bogus_unknown_knob:
field not allowed
Co-authored-by: agent <[email protected]>
…r-plan lane Eleven defects, each root-caused. Two of them were MISCONCEPTIONS on my part, corrected here by measurement rather than inference. MEASURED BASELINE (the correction). Running the real eval-pr-plan lane on a real non-draft PR (omacom/omarchy#12138, lanes=1) took 757.6s = 12m38s, NOT the "30+ minutes" I had asserted from a tool timeout. Timestamped stage breakdown: oracle 90s, render 20s, control 177s, eval 196s, validate 147s, report 24s, cold-read 88s, the rest ~0s. A 2-lane run took 1095s with the lanes finishing at 874s/1079s — a 1.38x speedup over sequential, so concurrency helps but contends. The per-bed STEP durations sum to only 61-81s while the enclosing stage takes 177-196s: the gap is charly-subprocess overhead (project resolve + plugin connect + `box validate`, measured at ~13s each). And 16 lanes is NOT 16x2 VMs: control and eval are SEQUENTIAL stages within a lane, so the concurrent VM count is `lanes`, not `lanes*2`. The fixes: 1. (HIGH) runBatch reported SUCCESS for a FAILED batch. It printed each lane's error and then returned `0, nil` unconditionally, so a lane ending in the LOOP-GUARD escalation still printed "pipeline eval-pr-plan: OK" and exited 0 — the exit status carried no information (R7). Extracted a `laneReport` aggregate; ANY failed lane is now a non-zero exit and an honest "FAILED (n/m lanes failed)" summary. Live-verified: a bad PR now exits 1. 2. (HIGH) ade.go passed the PROCESS-GLOBAL `os.Getenv("PR_HEAD_SHA")` to the check-run instead of the per-lane value, directly contradicting the RCA already recorded at executor.go ("$env.PR_HEAD_SHA to this lane's head; never via os.Setenv"): the live run logged `--var PR_HEAD_SHA=`. `adeVerdict` now takes the lane's head from `rc.env`. 3. (HIGH) teardownVenue hardcoded the eval-omarchy golden entity and a `check-omarchy-pr-<pr>-vm`/`-vm-probe` domain scheme inside the DOMAIN-NEUTRAL engine, and omitted `--if-exists` (so every clean lane logged a spurious "no such VM … nothing destroyed"). Replaced with `teardownLaneBeds`, which derives the beds from the lane's OWN `ade` stages (ref-resolved) and always passes `--if-exists`. 4. (HIGH) No signal handling. The lanes drive child processes that hold the per-bed flock and keep a VM alive; the engine passed `context.Background()` and installed no handler, so a SIGTERM/SIGINT killed only the engine and the orphaned child kept the lock — every later lane then died on "check bed … already running in this project". Added `signal.NotifyContext`, so the lane contexts cancel and the children tear down. 5. (HIGH) The ledger dump path was FIXED (`workdir/stage-findings.yml`), so concurrent lanes overwrote each other: the surviving file held ONE lane's stages and a FAILING lane's forensic artifact could be destroyed by a sibling. This is the per-lane-state class the ledger OBJECT already fixed (RCA 2026.252.2210) — never applied to the dump PATH. Now per-lane (`stage-findings-pr-<pr>.yml`). 6. (MEDIUM) The runner has ALWAYS measured `StageResult.Duration` but the dump DROPPED it, so the one artifact that could answer "where did the lane's 13 minutes go?" carried no timing. `#StageFinding` gains `duration_seconds` and the dump records it. 7. (MEDIUM) runCheckRun + teardownBed were DEAD code (definition-only) and teardownBed hardcoded `exec.Command("charly", …)`, bypassing CHARLY_BIN. Deleted (R5). 8. (MEDIUM) probeHeadFreshness shelled out to a hand-rolled `gh api` subprocess and reported a bare "gh failed" — the exact defect class tools.go's own header RCA'd. It now uses the canonical ghkit client and names the repo in its failure. 9. (MEDIUM) The `pipeline` agent-tool group declared NINE tools with EMPTY parameter schemas and dispatched them with an EMPTY input map, so each either passed vacuously (lock_audit over no trees) or failed spuriously (config_audit needs a bed) — the "every call arrived arg-less" class, and it DUPLICATED the schema-validated probe STAGE surface while being unused. Deleted (R3/R5); `tools: [pipeline]` now resolves to no tools. 10. (MEDIUM) probeSequencing matched a hardcoded `guest=charly-check-omarchy-pr-<N>-vm` (a vacuous green for any other project) and probeGoldenPresent silently substituted a hardcoded eval-omarchy path. Both are now driven by their declared inputs (`bed_prefix`, `golden`), and a missing input is an explicit failure. 11. (LOW) The ADE summary was truncated to the last 400 BYTES, slicing mid-word and dropping the diagnosis (live: "check-run exit 1: eline/candy/plugin-pipeline"). `lastLines` keeps whole trailing lines. Also: `lanes_ok` was an unreachable alias of the sequencing gate whose description claimed it "reports the concurrency budget" — deleted. Tests (all mutation-verified to FAIL without their fix): laneReport exit gate, per-lane ledger path, duration recording, entity-driven teardown target, sequencing bed_prefix requirement, golden_present input requirement, head_freshness canonical client, pipeline-tool-group removal, whole-line summary tail. Verification: gofmt -l . ; go vet ./... ; go test -count=1 ./... ; go test -race ./... cue exp gengotypes . + diff params/cue_types_gen.go # REPRODUCIBLE LIVE: eval-pr-plan #12055 (draft) 12/12 stages green; #12138 (real, non-draft) ran the full lane, 757.6s, verdict BLOCK with a populated record; a bad PR now exits 1 (was 0). Co-authored-by: agent <[email protected]>
Review — BLOCKHead SHA: Change class: runtime/behaviour — Go plugin ( Security screen: PASS — no T1–T4 findings (no embedded directives in the body/commits, no secrets or egress added, no guardrail weakened; the added dependency is the version-pinned Blocks
Non-blocking flag (B15): the cutover lands as two non-changelog commits ( Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: runtime/behaviour — Go plugin ( Security screen: PASS — no T1–T4 findings (no embedded directives in the body/commits, no secrets or egress added, no guardrail weakened; the added dependency is the version-pinned Blocks
Non-blocking flag (B15): the cutover lands as two non-changelog commits ( Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
…no hardcoded bed default The fresh pr-validator BLOCKED PR #26 with three findings. All three were correct; each is fixed by its root cause, not patched. BLOCK 1 (R3/R5) — the hardcoded `check-omarchy-pr-<pr>-vm` bed default survived in three more sites (`ade.go` runAdeBed + adeVerdict, `adekit.go` bedPlanOps), the same lane-coupling the change removes from the batch path. ROOT CAUSE: `#AdeStage.bed` is schema-REQUIRED, so an empty bed is a CALLER DEFECT and the fallsback were dead defensive code that (a) baked a lane's private naming scheme into the domain-neutral engine, (b) silently mis-targeted any other project, and (c) made the bed-naming rule live in two places with different rules. All three now FAIL LOUD with "ade: bed required". Test: TestAdeBedIsRequiredNotDefaulted (mutation-verified: restoring the fallback reds it). BLOCK 2 (R1/R3/R5) — `teardownLaneBeds` re-broke the per-lane env invariant and was skipped exactly on abort. ROOT CAUSE: venue lifecycle had TWO owners. `runAdeBed` already destroys its `--keep-venue` domain; the batch-level copy was a duplicate that resolved bed refs against the PROCESS env (`envMap()`) instead of the lane's run context, and used the signal-cancelled ctx, so once `signal.NotifyContext` fired the destroy never ran at all. Fixed by R3/R5: DELETE the duplicate — the `ade` stage is the ONE owner — and make the one owner abort-safe: `destroyVenue` is deferred and runs on a `context.WithoutCancel`-detached context, so a failure, a provider error and a SIGTERM all still tear the venue down (the previous early return on a non-ExitError leaked the VM). Tests: TestVenueHasOneOwner (mutation-verified: rejoining the signal ctx reds it). BLOCK 3 (B10/A1) — the PR body claimed `chatMsg`/`chat()` were "Deleted" while the diff re-defines both. ROOT CAUSE: the accounting conflated "the WIRE structs + the old implementation" with "the symbols". The body now says exactly what changed: the wire structs and the old hand-built `chat()` implementation are replaced; `chat()` is re-implemented on the SDK and `chatMsg` survives as the engine's internal transcript row (no longer a wire type). Verification (frozen tree): gofmt -l . # clean go vet ./... # clean go test -count=1 ./... # ok go test -count=1 -race ./... # ok cue exp gengotypes . + diff params/cue_types_gen.go # REPRODUCIBLE LIVE eval-pr-plan #12138, lanes=1: full 12-stage lane green in 521.9s (control 209s, eval 409s), and BOTH venues destroyed by the one owner — `virsh list --all | grep 12138` => CLEAN (no leak). The prior batch-level teardown leaked in exactly the abort case this fixes. Co-authored-by: agent <[email protected]>
Review — PASSHead SHA: Security screen: PASS — no T1–T4 findings. No embedded directive aimed at the validator (the body only describes the prior review), no secrets/egress added, no guardrail/rulebook/validator-spec change; the new dep is version-pinned Checklist: All applicable rules PASS or NA. Prior-comment dispositions (re-derived against the CURRENT diff):
Tool-limit disclosure (rule 4): the harness returned 65 536 of 98 322 diff bytes — the tail of Verdict: PASS opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — no T1–T4 findings. No embedded directive aimed at the validator (the body only describes the prior review), no secrets/egress added, no guardrail/rulebook/validator-spec change; the new dep is version-pinned Checklist: All applicable rules PASS or NA. Prior-comment dispositions (re-derived against the CURRENT diff):
Tool-limit disclosure (rule 4): the harness returned 65 536 of 98 322 diff bytes — the tail of Verdict: PASS opencode/deepseek-v4.1-flash — action-review. |
…ledger dump (#79) Advances the eval-pr lane to the merged plugin-pipeline tag `v2026.259.1825` (opencharly/plugin-pipeline#26), which replaces the hand-written OpenAI client with the official `openai/openai-go/v3` SDK and makes the whole request surface authorable through the plugin's CUE schema. Consumer consequences carried in the same change: - candy/eval-pr/charly.yml: the pipeline pin v2026.259.0809 -> v2026.259.1825. - .gitignore: the engine now writes the per-run ledger dump ONE FILE PER LANE (`stage-findings-pr-<pr>.yml`) so concurrent batch lanes cannot overwrite each other's forensics; the previous exact-name pattern (`stage-findings.yml`) no longer matched, so the new dumps showed up as untracked run artifacts. Widened to `stage-findings*.yml`, which covers both the per-lane and the no-PR form. - docs/evidence-and-media.md: the artifact table names the per-lane file and notes that each row records the stage's status and duration. The bump is the same shape as #78 (pin advance, no candy `version:` change). Verification (local): $ EVAL_UMBRELLA=<umbrella> charly box validate Downloading github.com/opencharly/plugin-pipeline:v2026.259.1825... plugin plugin-pipeline: served from .../[email protected]/... charly box validate: OK — checked 200 candies, 21 boxes, 33 deploys, 7 distros, 7 builders; 0 warnings, 0 errors $ charly pipeline run eval-pr-plan --pr 12055 --lanes 1 10.7s [stage oracle] ok 10.7s [stage render] skipped — skipped: @oracle.class == skip 10.7s [stage control] skipped — skipped: @oracle.class == skip 10.7s [stage eval] skipped — skipped: @oracle.class == skip 10.7s [stage media] skipped — skipped: @oracle.class == skip 10.7s [stage gate] skipped — skipped: @oracle.class == skip 10.7s [stage validate] skipped — skipped: @eval.verdict != PASS && @eval.verdict != FAIL 10.7s [stage report] skipped — skipped: @eval.verdict != PASS && @eval.verdict != FAIL 10.7s [stage cold-read] skipped — skipped: @eval.verdict != PASS && @eval.verdict != FAIL 10.7s [stage record] skipped — skipped: @oracle.class == skip 10.8s [stage not-testable] ok 10.8s [stage publish] skipped — skipped: $env.EVAL_PUBLISH != approve || @cold-read.verdict == NO_VALIDATION 10.8s lane 12055: done 10.8s pipeline eval-pr-plan: OK (lanes=1, pool=1) $ ls stage-findings*.yml stage-findings-pr-12055.yml # the merged plugin's per-lane dump $ git status --short (the dumps are ignored — the .gitignore fix works) Rulebook compliance: R1 (every anomaly RCA'd before remediation); R3 (the consumer follows the engine's single naming rule); R5 (the stale ignore pattern + doc row are removed, not left alongside); R10 (live lane run pasted above). Change classification: contract/pin + consumer config + docs. Verification gate: charly box validate + a live eval-pr-plan lane. Attribution: fully tested and validated for the pin/lane path; the doc row is a projection of the verified runtime behavior. *Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)* Co-authored-by: atrawog <[email protected]>
Summary
Replaces the engine's hand-written OpenAI client with the official
github.com/openai/openai-go/v3SDK, makes the whole request surface authorablethrough the plugin's own CUE schema, and fixes every defect a measured
end-to-end run of the real
eval-pr-planlane exposed.Why. The agent runtime hand-rolled the entire OpenAI-compatible wire path
(
chatRequest/chatMsgstructs, anet/httpPOST, a 121-line SSE parser) andhardcoded every request knob. That client could not do vision, dropped
reasoning deltas, sent no
max_tokens/response_format/seed/stop, andsilently dropped
tool_choice(ollama's compat request struct has no suchfield — the docs list it unsupported). It is now gone.
Two parts:
1 — the SDK swap + full configurability (commit 37b23c9).
schema/pipeline.cue(SDD single source) →params/cue_types_gen.go: a new#LLMParamscovering the general OpenAI chat-completions parameters(
temperature,top_p,max_tokens,max_completion_tokens,frequency_penalty,presence_penalty,seed,stop,response_format,reasoning_effort,reasoning,stream_options,parallel_tool_calls,tool_choice,logprobs,top_logprobs,user,metadata,logit_bias,plus an
extraescape hatch for undocumented fields).#LLMSpecgainsorganization,project,timeout,idle_timeout,max_retries,headers.#ResponseFormat/#Reasoning/#StreamOptions/#NamedToolChoiceadded;
#StageLLMSpecgives each#AgentStageanllm:override. Both paramdefs are
close()d — an unknown or wrong-typed field is a LOAD error namingthe CUE path.
llm.go(new): resolvesenv > stage > entity > built-in defaultfield-wise, builds the client per call with explicit options, and maps the
authored params 1:1 onto the SDK union. It uses
NewChatCompletionService(NOT
NewClient) so a strayOPENAI_API_KEY/OPENAI_BASE_URL/OPENAI_CUSTOM_HEADERScannot hijack a lane; an empty resolved key sends NOAuthorizationheader (the keyless local ollama needs none).chat()re-implemented onNewStreaming+ChatCompletionAccumulator,keeping the RCA'd IDLE bound (a per-chunk watchdog that cancels the request
ctx — not a whole-generation deadline) and the empty-completion guard.
ollama's non-standard
reasoningdelta (which the SDK accumulator drops) isread from the raw JSON, so a reasoning-only 200 is reported as a NAMED empty
completion instead of a bare one — the real shape behind the intermittent
lane failures.
chatVision/imageDataURLsend a screenshot as a base64 image_urlcontent part DIRECTLY to the endpoint (ollama supports base64 data URLs only).
tools.go: the catalog rendersopenai.ChatCompletionToolUnionParam.chatMsg,toolCall,toolSchema,functionSchema,chatRequest,chatResponse), the oldchat()IMPLEMENTATION (thehand-built POST + manual SSE parser), and the hand-built tool JSON are
replaced:
chat()now takes the SDK message union and delegates tochatMessages(see Part 1 above), andchatMsgsurvives as the engine'sinternal transcript row fed to
toSDKMessages— it is no longer a wire type.2 — the defects found by measuring (commit ffc3323). Eleven, each
root-caused. Two were per-lane state collisions of the same class the ledger
OBJECT already fixed (RCA 2026.252.2210), never applied to the artifacts they
write:
runBatchreported SUCCESS for a failed batch — it printed each lane'serror then returned
0, nilunconditionally, so a lane ending in theLOOP-GUARD escalation still printed
OKand exited 0 (R7). AlaneReportaggregate now makes any failed lane a non-zero exit.
ade.gopassed the process-globalos.Getenv("PR_HEAD_SHA")instead ofthe per-lane value, contradicting the RCA recorded at
executor.go; the liverun logged
--var PR_HEAD_SHA=.teardownVenue/teardownLaneBedsduplicated the venue lifecycle in thedomain-neutral engine and got it wrong twice: it hardcoded the eval-omarchy
golden entity and a
check-omarchy-pr-<pr>-vm/-vm-probedomain scheme,resolved the bed refs against the PROCESS env (not the lane's run context),
and used the signal-cancelled ctx (so it was skipped precisely on abort).
Venue lifecycle now has ONE owner: the
adestage, whoserunAdeBeddestroysits
--keep-venuedomain via a deferreddestroyVenueon acontext.WithoutCancel-detached context — so a failure, a provider error and aSIGTERM all still tear down. The batch-level duplicate is deleted.
check-omarchy-pr-<pr>-vmfallback existed in three moresites (
ade.go×2,adekit.go).#AdeStage.bedis schema-REQUIRED, so anempty bed is a caller defect: all three now fail loud instead of silently
mis-targeting a non-omarchy project.
the per-bed flock, so every later lane died on "check bed … already running".
Added
signal.NotifyContext.workdir/stage-findings.yml), soconcurrent lanes overwrote each other's forensics. Now per-lane.
StageResult.Durationwas measured but dropped from the dump, so the oneartifact that could answer "where did the time go?" had no timing. Recorded.
runCheckRun/teardownBedwere dead code and hardcodedexec.Command("charly", …). Deleted (R5).probeHeadFreshnessshelled out to a hand-rolledgh apiand reported abare "gh failed" — the class
tools.go's own header RCA'd. Now the canonicalghkit client.
pipelineagent-tool group declared nine tools with empty parameterschemas and dispatched them with an empty input map, so each passed vacuously
or failed spuriously, while duplicating the schema-validated probe STAGE
surface and being unused. Deleted (R3/R5).
probeSequencingmatched a hardcoded omarchy regex (a vacuous greenelsewhere) and
probeGoldenPresentsilently substituted a hardcodedomarchy path. Both now driven by their declared inputs.
dropping the diagnosis.
lastLineskeeps whole trailing lines.Also deleted
lanes_ok, an unreachable alias of the sequencing gate whosedescription claimed it "reports the concurrency budget".
How tested
All output below is from the frozen head
b36e5d7135259d0c5a6e93ba9f1e4b57dd737d34(round 2; the round-1 head/block and its fixes are recorded under "Validator round 1" below).Params reproducibility (the CI gate recipe —
cue exp gengotypes+ diff):Schema closedness, live (a full block passes; an unknown param is rejected by
path).
charly box validateon eval-omarchy with a fullllm:block:and with one bogus param added:
Live against the real local ollama (
go test -run TestLive_Ollama -v), thereal SDK client against the real endpoint:
The real 12-stage lane, draft PR (all stages executed):
A real, non-draft PR (omacom/omarchy#12138), timestamped, single lane:
The R7 fix, live — a bad PR now FAILS and exits non-zero:
The per-lane dump + duration fixes, live — 2 concurrent lanes produced two
separate ledgers:
Mutation checks (the guards are load-bearing). Each new test was verified to
FAIL without its fix:
TestConformance_ReasoningOnlyIsNamedEmptyFAILSNewChatCompletionServiceforNewClient→TestConformance_NoOpenAIEnvBleedFAILS (Authorization="Bearer polluted-key")TestLaneReportExitIsAGateFAILSTestLedgerPathIsPerLaneFAILSTestDumpLedgerRecordsDurationFAILSMeasured timing (recorded because it is the answer to "why does a lane take
that long"): 12m38s per lane at
--lanes 1— LLM agent stages 349s, VM beds372s, other 36s. The per-bed STEP durations sum to only 61–81s while the
enclosing stage takes 177–196s; the gap is
charly check runsubprocessoverhead (project resolve + ~10 plugin connections;
box validatemeasures~13s). 2 lanes → 1.38x over sequential. A 16-lane run is bounded by host
concurrency, not by the LLM: ollama served 16 parallel calls in 2.5s wall and
concurrent charly calls are genuinely parallel.
Validator round 1 (BLOCK) — all three findings fixed, re-verified. The
fresh pr-validator blocked the first head with three findings, each correct:
check-omarchy-pr-<pr>-vmbed default survived inthree more sites (
ade.go×2,adekit.go), the same lane-coupling removedfrom the batch path.
#AdeStage.bedis schema-REQUIRED, so an empty bed is acaller defect: all three now fail loud.
TestAdeBedIsRequiredNotDefaulted(mutation-verified).
teardownLaneBedsre-broke the per-lane env invariant and wasskipped on abort. Root cause: TWO owners of the venue lifecycle. The
duplicate resolved bed refs against the process env and used the
signal-cancelled ctx. Deleted (R5); the
adestage is the one owner, and itsdestroy is now deferred on a
context.WithoutCancel-detached ctx so afailure, a provider error and a SIGTERM all still tear down.
TestVenueHasOneOwner(mutation-verified).Corrected to say exactly what changed (wire structs + old implementation
replaced).
Round-2 live proof,
eval-pr-plan #12138,--lanes 1, full 12-stage lane:Mutations for the round-1 fixes (each FAILS without its fix):
restoring the bed fallback →
TestAdeBedIsRequiredNotDefaultedFAILS;rejoining the signal ctx →
TestVenueHasOneOwnerFAILS.Rulebook compliance
root-caused before remediation; the two per-lane collisions were traced to the
already-documented class at
executor.go(RCA 2026.252.2210).duplicate
pipelineagent-tool group and the unreachablelanes_okaliasdeleted rather than taught to shadow the probe stages.
SSE parser, the dead
runCheckRun/teardownBed, and the broken tool groupare removed in this same change.
run on the frozen head and are pasted above.
eval-pr-planlane was runend-to-end against real
omacom/omarchyPRs on real disposable VMs, plus realollama over the real SDK client.
schema/pipeline.cueis the single source;params/cue_types_gen.gois generated and proven reproducible.
go.workis added; no submodule is edited; no force-push.Change classification
eval-pr-planlane (draft + real non-draft PR),live ollama, schema validation,
go test/-race/vet/gofmt, params regen.fully tested and validated— all gates passed on thefinal tree and the changed runtime paths were executed live.
Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)