Repository navigation
feat(plugin-lobster): the native lobster workflow engine — run, resume, gates, scheduler, CLI (supersedes #2) - #3
Merged
Conversation
schema/lobster.cue: a faithful CUE transcription of UPSTREAM lobster 2026.9.16 (openclaw/lobster @ 74db267) — WorkflowFile, the step/parallel/branch/retry shapes, the approval + input gates with their upstream aliases, and the cost_limit / _meta.cost payloads from cost_tracker.ts. Every field name, alias, enum member and numeric bound is transcribed from src/workflows/types.ts + src/workflows/load.ts, never invented; the cross-field rules load.ts enforces are documented here and implemented in Go. params/cue_types_gen.go: generated by `cue exp gengotypes` (the plugin-pipeline procedure), verified reproducible; ci.yml gains the same reproducibility gate.
… scheduler, CLI
Adds the engine behind `workflow:lobster`, a transcription of upstream
`@clawdbot/lobster`'s semantics so a `.lobster` file means the same thing here as
there, plus the two capabilities charly adds (systemd-user-timer scheduling and
the `charly lobster` import/export/doctor CLI).
engine.go the run loop: step dispatch, retry, on_error, `when`, the run result
shell.go upstream's shell contract (`/bin/sh -lc`, own process group, timeout kills
the group, `LOBSTER_SHELL` override) — transcribed from src/shell.ts
refs.go `${arg}` then `$id.path` refs, the per-step value walk, `when` via
workflowkit.Eval (ONE expression grammar, shared with the front-end)
lobster.go the workflow-file loader + cross-field validation (the ported load.ts rules)
gate.go the approval and input gates: state, tokens, identity policy, JSON-Schema
validation of a response (cuelang.org/go/encoding/jsonschema)
state.go $LOBSTER_STATE_DIR state, the upstream-wire-compatible resume token, the
short approval id, and the non-replayable consumed tombstone
batch.go parallel (wait all|any) and for_each
pipeline.go the deterministic pipeline stdlib over real gjson paths
cost.go `_meta.cost` accounting and `cost_limit`
schedule.go cron -> OnCalendar -> systemd user timer/service via sdk/deploykit
run.go the op envelope: run/resume/emit, and the reply projection
cli.go `charly lobster import|export|doctor`
tty.go the TTY probe the interactive gate needs
The engine is handed the LOWERED pair and never lowers: it loads
<gen-dir>/workflow.lobster, which the front-end writes. Two seams are stated where
they bite rather than worked around: the approval reply is a LOSSY projection (the
pinned IR's `#WorkflowApproval` has no home for `items`/`preview`/`approval_id` or
the approver identity), and `workflowkit.lobsterDrop` drops `triggers`, so the
scheduler reads the IR's own trigger list from `<gen-dir>/schedule.json` and refuses
`apply` with a message naming that file.
engine_test.go covers the engine against the REAL shell and a temp-dir state store.
Writing it found and fixed six defects in the transcribed code:
- `$id.json.path` resolved to nothing: the walk re-entered the `json` segment
- a for_each body's `$item` stayed literal: sub-steps resolved against the run's
result map instead of the loop scope
- the input gate never fired: `isInputStep` was handed the typed struct
- `exec` rebuilt its command from unquoted fields, so a JSON argument reached the
shell unquoted and brace-expanded into eight words
- a pipeline's value was an earlier stage's text, so a trailing `where`/`pick` was
invisible to `$id.json`
- a step timeout was reported without naming the step
go test ./... passes; go vet clean; gofmt clean.
schedule_test.go covers the scheduler's decidable half — the unit-name mapping, the cron-conversion next-run, the content-idempotent unit writer, the OnCalendar reader, the front-end schedule.json descriptor, and three hard-error paths of `apply` (no descriptor, no `triggers.schedule`, an unparseable cron) plus the marker a completed run leaves. The systemd side of `apply` is a live boundary and stays with the bed. cli_test.go pins the import face: `engine: lobster` pinned, lobster's `name` re-shaped into the authored `description` (with the explicit description and the filename fallback), every step and every other workflow key carried through unchanged, and a workflow the loader rejects never emitted as an entity. cliImport takes the output writer as a parameter so the emitted YAML is assertable; runCLI keeps passing os.Stdout.
Implement the redo conditional back-edge in the native lobster engine, preserving the retired plugin-pipeline executor's semantics: - schema: a charly-only `redo` step key (#LobsterRedo: triggers/max/ escalate_after/on_fail), regenerated into params. - engine: a failed shell step that prints "LOOP-GUARD-TRIGGER: <name>" on its stderr carries that trigger out to runSteps, which re-enters the mapped earlier step; escalate-then-max LOOP-GUARD bounds; a trigger that maps to no step is a named spec defect (never a silent swallow). - state: the per-target budget persists across a resume (resumeState.RedoCount is this plugin's own state, optional and backward-compatible). - docs: AGENTS.md pointed at a nonexistent executor.go (R1); it is engine.go. Tests drive the REAL runSteps through the engine's shell seam (a real child process writing the sentinel to its own stderr), covering sentinel parsing, the back-edge, fail-hard without a sentinel, both guards, the per-step max override (the float64-defect regression), an unresolvable target, redo-absent behaviour, and the budget's resume round-trip.
The module's lint gate (the config and the CI step, both copied from
plugin-task during repo setup) was red on 112 staticcheck findings. None
had ever fired: the branch has never been pushed, and golangci-lint's
default `max-same-issues: 3` collapses findings that share an issue text,
so every local run showed only 3 of the 110 ST1005 hits and looked
almost-clean.
Two of the findings are real and are fixed in code:
- engine.go: WriteString(fmt.Sprintf(...)) -> fmt.Fprintf(&b, ...) (QF1012)
- state.go: an empty `if decode(...) {}` branch -> the `_ =` form already
used on the line above, with the reason kept as a comment (SA9003)
The other 110 are ST1005 (error strings must not be capitalized), and they
are deliberately NOT reworded: this module's error text is a product
surface. lobster.go is a port of upstream lobster's load.ts and its own
header records the rule — the strings are upstream's, verbatim, and "a
reworded one is a different product" — and those strings are 68 of the
110. The remainder carry the messages of the engine moved from
plugin-pipeline, whose CI never ran a linter at all; rewording them during
the move would be a behavioural change smuggled into a move. The module's
own tests assert the capitalized form (engine_test.go:
strings.Contains(err.Error(), "Unknown command: frobnicate")), so
lowercasing would be a product change plus a test break, not a lint fix.
charly's root config records that a module MAY keep its own closer config;
this is that case. The staticcheck `checks` list spells golangci-lint's
six default exclusions out explicitly because setting `checks` REPLACES
the defaults — omitting them would re-enable ST1000/ST1003/ST1016/ST1020/
ST1021/ST1022 and fail CI on findings the defaults suppress.
Verified with the same-issue dedup DISABLED (the run that catches a wrong
`checks` list): `golangci-lint run --max-same-issues=0
--max-issues-per-linter=0 ./...` -> 0 issues. gofmt clean, go vet clean,
go test ok (1.2s), and the CI params-reproducibility diff is byte-identical.
The plugin declared `workflow:lobster` and `command:lobster` and described a
`charly lobster import|export|doctor` CLI, but exported NEITHER entrypoint a
plugin is reached by — so both faces were declared and dead.
A plugin is reached by one of exactly two routes, and both name the same
function:
- EXTERNAL (the default for a NEW plugin, per /charly-internals:plugin):
charly connects it by word at runtime, host-building ./cmd/serve and
speaking go-plugin gRPC over it. There was no main package anywhere in
this repo, so there was no binary for the host to launch.
- COMPILED IN: sdk/cmd/charly-lib-gen emits
`{Provider: X.NewProvider, Meta: X.NewMeta, CLI: X.CliMain}` per listed
plugin, so the absent exported CliMain is a COMPILE ERROR on that leg.
Add CliMain — forwarding to the SAME runCLI that Invoke(OpRun) already drives,
so the two routes cannot drift — and cmd/serve/main.go, mirroring plugin-task
and plugin-example-command. Unlike plugin-task's CliMain this one works in BOTH
placements: lobster's CLI reads a file and writes a directory, so it needs no
host project and dropping the executor is safe.
The candy's own `lobster-capabilities-declared` probe could not catch this: it
greps plugin.go for the capability STRING, which was present the whole time. Add
`lobster-entrypoint-reachable`, which asserts the entrypoint exists and binds
CliMain. It bites: with cmd/serve/main.go moved aside the probe exits 1, and 0
once restored.
Verified at this head: go build/vet clean, gofmt -l empty, go test ok (1.073s),
and the built binary drives the CLI end to end — `import demo.lobster` emits the
kind: pipeline entity, exit 0.
…heduler) The repo had discover: and nothing else, so the lobster leg had no R10 witness at all. Adds check-lobster-local (the engine's refs/when, args, retry, on_error, timeout, parallel, for_each, composition, approval+input gates, the pipeline stdlib, and the import/export round trip, with an upstream-lobster parity step that is live-or-skip) and check-lobster-schedule-local (apply, idempotency, list, run-now, a real timer fire, a pending approval, and full teardown). Both are authored, UNRUN and unvalidatable today: charly box validate at this root fails on the candy's `workflow:lobster` word because the workflow provider class is not in the pinned spec — the opencharly/charly#762 gate. They run the moment that lands.
…ng translates the gate's key The bed OMITTED the input-gate step, and the reason was real: the authored grammar spells the gate's schema `response_schema` while the engine's typed input is `responseSchema`, and the engine treats a step as a gate only when that field is set (lobster.go:158-160 isTypedInputStep ⇔ ResponseSchema != nil). The lowering passed the authoring spelling through untouched, so the schema was silently dropped on the way in and an authored `input:` step was not a gate at all — there was no shape that could pass. The sdk leg fixes exactly that (`sdk/workflowkit` mapLobsterInputKey renames the key into the generated file's `input` object), so the step is AUTHORED here. It asserts the gate halts the run with nothing after it having run, the LOWERED file carries `responseSchema:` (the artifact that proves the translation ran — gen dir plugin-pipeline cli.go:72 `projectDir()/.opencharly/pipelines/<name>`), a schema-valid `--response-json` resume completes it with `$ask.json.branch` resolving to the answer, and a type-invalid response is refused so the run never advances. The refusal half asserts the EFFECT (no marker), not an exit code: the engine answers an error with a NIL error, so the CLI still exits 0. The header comment is rewritten from "omitted" to the reason it was omitted, kept because that reason is what makes the assertion worth having. `schedule-approval-pending` stays OMITTED, and correctly: `schedule list` projects only the unit files it finds (schedule.go:192-232, Pipeline/Timer/OnCalendar/Active/NextRun) and carries no pending-approval surface, so the listing the plan describes cannot be asserted against the tree.
spec's `#WorkflowResumeRequest.approve` is now `*bool` (opencharly/spec#195), so the engine can finally tell a REJECTION from silence. This adapts the engine to it. The defect this removes was structural. `resumeWorkflow` read the decision by WHICH field the caller happened to set, and its `default` arm turned "an approval decision" out of anything that was neither a response nor a cancel — so a resume carrying NO decision at all was silently read as a rejection and CANCELLED the gate. Silence could destroy a pending approval. - `run.go` — the switch gains an explicit `case in.Approve != nil:`; the catch-all is gone, so a decision-less request leaves `Approved` nil and `applyResume` refuses it by name. - `state.go` — `HasApproved bool` + `Approved bool` collapse into `Approved *bool` (R3). The pair was a hand-rolled tri-state, and it existed only because the wire could not carry one; keeping both beside the real thing would be two sources of truth for one decision. - `engine.go` — `!r.HasApproved` → `r.Approved == nil`, `!r.Approved` → `!*r.Approved`, `r.HasApproved` → `r.Approved != nil`. - `engine_test.go` — the five decision sites take `boolPtr(true|false)`, plus the helper that names the three states. NOTE: this does NOT yet compile against the module's pinned `spec` — the pin still points at a ref without the tri-state, which is correct: pin discipline forbids pinning an unmerged ref. The bump lands once spec#195 merges and tags. Verified meanwhile against the PR branch through an out-of-tree workspace (build/vet/gofmt/test all green). *Agent: `workflow-ir` · session `7e17b5cf-c349-4032-8da5-2e4e03612780`*
…eal resume entry
TestApprovalGateResumeWithoutADecisionIsRefusedNotCancelled drives `resumeWorkflow` —
the entry the `workflow:lobster` op binds, reached host-side as OpWorkflowResume —
through all three wire states of `#WorkflowResumeRequest.approve *bool`, plus the
separate ABORT arm:
- approve: true → the run proceeds past the gate (`ok`, output `done`)
- approve: false → an explicit REJECTION cancels the run
- approve absent → REFUSED BY NAME, and the SAME token still carries a live gate, so
a follow-up approve:true completes the run
- cancel: true → the ABORT arm cancels
The absent case is load-bearing, and it is exactly what the old engine got wrong: with
a plain `bool` on the wire a decision-less request arrived as the zero value `false`,
the catch-all `default:` arm assigned it to `state.Approved`, and the pending gate was
silently CANCELLED and destroyed. A resume that names no decision must never destroy a
gate, so sub-assertion 3 also pins the survival: the refusal returns BEFORE the state is
consumed, and a later real answer on that same token still completes the run.
Can-fail proof. With run.go's switch temporarily restored to the old catch-all
`default:` (a scratch edit, never committed; the restore verified byte-identical to HEAD
by `git diff --exit-code -- run.go`), sub-assertion 3 fails with
`status = "cancelled", want error` while the other three still pass. Restored, all four
pass. Both runs are captured on the same head.
*Agent: `workflow-ir` · session `7e17b5cf-c349-4032-8da5-2e4e03612780`*
…approval-resume bed
The engine's resume decision is TRI-STATE on the wire (`approve *bool`), and the bed only
exercised two of the three states. It now drives the third — the envelope that carries NO
decision — and pins the behaviour the change exists to produce: a decision-less resume is
REFUSED, never silently read as `approve: false` and cancelled.
- `gate-absent` (new fixture): run to the gate, save the recorded resume handle, then
`pipeline resume gate-absent --token …` with NO `--approve` flag. The reply must be
`status=error` and must NOT be `status=cancelled`; nothing after the gate may run; and
the SAME token with `--approve yes` must still complete the run — a refusal that had
consumed the gate would pass the status check and still lose the pending approval.
- `--mode tool` on the three `pipeline run` dispatches. This is a determinism fix, not
cosmetics: the engine's gate is interactive when stdin is a CHARACTER device, and
/dev/null is one. A check runner (or any harness handing the step /dev/null) therefore
took the interactive branch, prompted on the terminal, read EOF and answered
`status=error` instead of saving the gate — the bed passed or failed on the runner's
stdin. The wire path a resume answers is by definition non-interactive, and `--mode tool`
is that dispatch.
The NAMED refusal text ('Workflow resume requires --approve yes|no for approval requests')
is not asserted here: this front-end answers the engine's error-status reply without
surfacing its text, and the bed's own rule is to assert on the CLI's output and on what the
run leaves behind. The exact text is pinned in engine_test.go, in
TestApprovalGateResumeWithoutADecisionIsRefusedNotCancelled.
*Agent: `workflow-ir` · session `7e17b5cf-c349-4032-8da5-2e4e03612780`*
Every step in check-lobster-local captures a command's stdout/stderr into the step's
tempdir and then deletes the tempdir, so a red step reached the runner as a bare exit
code: `FAIL ... exit=1, want 0 (stderr: )`. The runner could not tell a plugin-resolution
failure from an assertion mismatch, and the diagnosis was destroyed with the dir.
The tail of each step now dumps the captures to the step's stderr AND keeps the tempdir
when `rc != 0`, and removes it as before when the step passes. No assertion is touched:
the block reads `$rc` and never writes it, so every exit status is byte-identical.
Measured on the re-run (calver 2026.277.1250, same 13 steps: 7 passed, 6 failed) the six
failures now name their cause in the runner's own log:
- lobster-args-env - engine status=error
- lobster-for-each - status=ok, loop body got no values
- lobster-input-resume - `which branch?` / `Enter JSON response:` - the run took the
INTERACTIVE branch, so no pending gate was recorded and the
resume answered `no pending gate recorded in ...`
- lobster-pipeline-stdlib - status=ok, wrong payload
- lobster-import-export - the stdout matcher's subject is redirected away
- lobster-export-unknown-is-named-error - exit=0, want 1
The seventh failure in the old-engine scratch run is lobster-approval-resume, which is
the intended can-fail proof, not a bed defect.
*Agent: `workflow-ir` · session `7e17b5cf-c349-4032-8da5-2e4e03612780`*
The engine-semantics bed went 7/13 red on the real engine. Six of the failures
were the bed or the engine lying about what the engine does; this fixes all six
without weakening a single assertion.
Engine (two real defects):
* `cliExport` swallowed TOTAL absence: a pipeline that was never lowered has no
`(workflow.lobster, charly.yml)` pair to export, and the per-file `continue`
turned that into exit 0 with no output — a caller who typo'd the name believed
the export succeeded. It now COUNTS what it copied and refuses by name
(exit 1, `lobster export: no lowered files for "<name>" in <dir> …`) when the
count is zero. `cli.go:188-205`; pinned by the new
`TestCLIExportRefusesAnUnloweredPipeline` / `TestCLIExportRequiresAPipelineArgument`.
* `stdinIsTTY` tested fd 0 for "is a character device", the tempting port of
Node's `process.stdin.isTTY`. `/dev/null` IS a character device, so a check
runner that hands a step `/dev/null` was taken for a human at a keyboard: the
input gate PROMPTED a terminal that is not there, read EOF, errored the run,
and never wrote the resume handle — which is exactly why the input-resume step
could not reach its gate. It is now `term.IsTerminal(int(f.Fd()))` on a named
file (`isTerminal`), pinned by `tty_test.go` against `/dev/null`, a pipe, and
nil. `golang.org/x/term` moves to the direct require block.
Bed (four assertions that described the engine wrongly — assertion text kept,
`source:` citations added):
* `lobster-args-env` — `$id` substitution and `${arg}` substitution are RAW TEXT
(refs.go:344-346), and a quoted shell string is not a place raw text can carry
a `"`. Split into the two arms the engine actually offers: a metacharacter-free
value through the `${arg}` template, and a quote-bearing value through the
injected `LOBSTER_ARG_<NORMALIZED>` env var (engine.go:1166-1183), where the
shell owns the quoting.
* `lobster-for-each` — `item_var`/`index_var` are SCOPED STEP RESULTS, i.e. refs
(batch.go:202-203), so a bare `$it` in a shell string is literal text; read them
as `$it.json`/`$ix.json`. The loop's own array is handed over through `stdin:`
(refs.go:191-203 writes a string ref verbatim) instead of being spliced into a
quoted shell string, which used to strip its JSON quotes. The ordered 5-item
result with `batch_size: 2` is asserted exactly.
* `lobster-input-resume` — a RESUMED answer is recorded as `Response`, never as
`JSON` (engine.go:768-769), so the ref is `$ask.response.branch`; the
authoritative spelling is engine_test.go:556. The gate stays strict: the
schema-invalid arm must still never advance.
* `lobster-import-export` — the step's `stdout:` matcher is asserted on the STEP's
stream, so the captured `pipeline nightly: valid (2 steps)` is echoed back after
it is captured.
`lobster-pipeline-stdlib` is the sixth: the measured `$shape.stdout` IS strict
JSON already (pipeline.go:124-125 renders via `renderItemsJSON`,
pipeline.go:607-608 `json.MarshalIndent`); it only LOOKED like YAML because the
fixture spliced it into a quoted shell string. The assertion is unchanged; only
the delivery is (the same `stdin:` ref delivery as the for_each fix).
…its assertion The `lobster-input-resume` step's `check:` text still claimed "`$id.json` resolves the answer", which contradicts both the engine and the step's own assertion. `applyResume`'s input arm records a resumed answer as `Response`/`HasResp` and never sets `JSON`/`HasJSON` (engine.go:765-770), and `getValueByPath` returns nil for `json` when `!r.HasJSON` (refs.go:213-232), so the reachable ref is `$id.response.*` — the spelling the assertion already uses (engine_test.go:556). Prose only: no assertion, fixture, or engine change.
…pprove wire) The engine reads the resume decision from a *bool, so the module does not compile against the pre-tri-state spec v0.2026276.0: ./run.go:119:21: invalid operation: in.Approve != nil (mismatched types bool and untyped nil) ./run.go:120:20: cannot use in.Approve (variable of type bool) as *bool value in assignment spec#195 is merged (9bf0e3f) and tagged v0.2026277.1407; this pins it.
…k-variable ref
The step computed its unit directory as a braced shell default:
u="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user"
That is not shell syntax here. charly's check-variable grammar
(sdk/kit/checkvars_expand.go:17) parses a brace-dollar UPPERCASE name, optionally
with an ":arg", as an ENV-MAP KEY -- never as a shell default. So the reference
resolved to the key "XDG_CONFIG_HOME:-$HOME/.config", the key was absent, and the
expander left the ref visible and reported it UNRESOLVED, which the check runner
turns into a skip:
SKIP check `schedule apply` writes AND enables the .service + .timer units ...
[schedule-apply] unresolved variables: XDG_CONFIG_HOME:-$HOME/.config
...
6 steps: 0 passed, 0 failed, 6 skipped
The whole bed reported ok: true while proving NOTHING -- the worst kind of green,
and exactly the failure a skip is supposed to make visible.
Fix: compute the unit directory brace-free, in shell, in the SAME order
schedule.go:341-350 resolves it (a non-empty XDG_CONFIG_HOME, else $HOME/.config).
A brace-free $X is invisible to that regex, so the expander no longer sees it.
The `if` form (rather than `[ -n ... ] && ...`) is deliberate: the latter returns 1
when the variable is empty and would abort a `set -e` script.
The explanatory comment is written without any brace-dollar literal for the same
reason -- the expander scans the whole command string, comments included, so an
illustrative example in a comment would have reintroduced the very skip it
documents. Verified after the edit: the only brace-dollar refs left in charly.yml
are the 46 resolvable ${CHARLY_BIN} and four lowercase names, which the regex
cannot match, and the file still parses as YAML.
…oader rules stated truthfully Fixes, from the validator BLOCK on ecf69bf — all four blocks: B14(a)/B18 — proven-dead code, in files this PR edits: * pipeline.go renderTable: `cols` was appended and never read, `seen` existed only to populate it, and `_ = cols` suppressed the evidence. Deleted all three. * engine.go: executeStep returned a stepKind its only caller discarded (`exec, ... := ...` then `_ = exec`). The return is gone, so the discard and the binding go with it. * batch.go runForEach: `batchSize` was computed, clamped, and discarded. It is unreachable anyway — the loader already rejects a batch_size below 1 (lobster.go). The variable is gone; the comment now says plainly that the hint is accepted, validated, and deliberately not used to pace an ordered loop. * refs.go stepResult: `Attempts` was never assigned anywhere and never read; `DurationMs` was written by attemptStep and read by neither envelope() nor MarshalJSON. Both fields are gone, with the two writes and the now-unused `started` timers in attemptStep. None of this was visible to the lint gate, because `_ = x` is exactly what suppresses it. The gate is green either way; the diff is smaller and honest. B5/R1 — a comment in this PR's own bed contradicted this PR's own code. The check-lobster-local `lobster-approval-resume` step claimed `--mode tool` is required because the gate goes interactive on a character device "and also /dev/null — a check runner's usual stdin". tty.go implements, and tty_test.go pins, the opposite: stdinIsTTY() is isatty(0), so /dev/null is correctly NOT a terminal. The stated reason was false. `--mode tool` is required for the ENVELOPE — the step asserts on `status=error` / `status=cancelled`, which human mode renders as prose. The comment now says that, and names run.go:60 as the interactive condition. A1/T3 — the Summary claimed two loader rules lobster.go does not implement. * "no approval inside parallel": validateForEach rejected a gate on a for_each body, but validateParallel never looked at a branch's approval/input. A branch is an exec arm — runBranch builds its LobsterStep from run/command/pipeline and carries no Approval field — so the key was silently DROPPED and the run sailed past a gate the author had declared. Now rejected by name, mirroring for_each, and pinned by two new cases in TestLoaderRejectsBrokenWorkflows. * "refs must point at earlier steps": NOT implemented, and the Summary no longer claims it. Upstream's handling is two-tier and the code already reproduces it — a stdin/for_each operand that is entirely `$id.path` resolves strictly and ERRORS on an unknown id (resolveInputValue), while a ref inside a templated string leaves an unknown id literal (resolveStepRefs). A blanket "every `$id.` must name an earlier step" check is deliberately not applied, because a for_each body legitimately refers to the synthetic `item`/`index` scope, which is not a step id at all. The Summary now states both tiers and the reason. Tests: gofmt clean, go vet rc=0, go test ok — 55 test functions, 76 `=== RUN` lines (two new rejection cases), 0 FAIL, 0 SKIP. B12/A2 — the missing R10 witness (block 1), which turned out to be TWO defects, one of them in THIS bed. `check-lobster-schedule-local` first failed outside this repo (the front-end `schedule` word does not resolve in a dev-tree binary — a charly dev build deliberately drops the installed plugin dir); a witness built from BOTH unmerged worktrees through charly#788's sanctioned `--dev-plugin` removed that cause. The bed then ran for real and exposed: * EVERY step invoked `${CHARLY_BIN} pipeline schedule apply`, but `${CHARLY_BIN}` is a check-variable EXPANSION — sdk/kit/checkvars_charlybin.go stamps the resolver Env map; it is NOT exported into the step process environment. `apply` is a CHILD process, so it never saw it, and resolveCharlyBin (run.go:295) fell through to exec.LookPath("charly") -> /usr/bin/charly, the INSTALLED binary. The generated .service therefore exec'd an installed charly that knows no `kind:pipeline`, and every scheduled run died with `pipeline entity "nightly" not found` before it could write the marker. Every step now exports CHARLY_BIN, so the unit execs the binary UNDER TEST — without which this bed witnesses nothing. * `schedule-fires` polls `while [ "$i" -lt 150 ]` and carried no `timeout:`, so the probe was killed at 2m0.171s — "probe killed by never-hang ceiling" — and the step failed. `timeout: 300s` added there, and to `schedule-run-now`, which likewise starts the unit and waits on it (per the check contract, `timeout:` is mandatory past the ~120s ceiling). Tests: gofmt clean, go vet rc=0, go test ok — 55 test functions, 76 `=== RUN` lines (two new rejection cases), 0 FAIL, 0 SKIP.
The header asserted, in the present tense, that both beds were UNRUN, that
`charly box validate` "FAILS on this repo's own candy and always has", and that
"every engine step here is UNRUN until #762". None of that is the measured state:
* both beds ran and PASSED on this head (B2 13/13, B3 6/6);
* `charly box validate` PASSES here (3 candies, 2 deploys, 7 distros,
7 builders; 0 warnings, 0 errors);
* the "workflow" provider class is in the pinned spec as of v0.2026276.0
(charly#778 MERGED, charly v2026.277.0930) — #762 is unrelated and open.
Restated as the two closed gates plus the still-true facts: the host must carry
BOTH faces, the dev-plugin override that supplies them is charly#788 (MERGED,
released v2026.277.1528), and the resume/schedule front-end subcommands are the
W6 leg.
…ds' drivers are released The header's MEASURED STATE and DRIVER SURFACES blocks were written against `e29a519`, when opencharly/plugin-pipeline#32 (the `resume` + `schedule` front-end, and the merged driver both beds drive) was still an unmerged sibling. It merged as `3d2aee88` and `tag-on-merge` published `v2026.277.2104` (alias `candy/plugin-pipeline/v0.2026277.2104`), so the block's two central claims are now FALSE: * "Two driver surfaces are NOT in plugin-pipeline's released tree yet" — both are released in that tag. `charly pipeline`'s subcommand set is `run|validate|agent|probe|resume|schedule` (candy/plugin-pipeline/cli.go:52 in the merged tree), and the `workflow-schedule` ops apply|list|remove|run-now are reached from cli.go:176. * "plugin-pipeline's released CLI serves only run|validate|agent|probe (cli.go:35-46)" — it serves six, and that line range no longer carries the subcommand list. Both beds were re-run against a build whose plugin-pipeline source is that MERGED tag (`--dev-plugin plugin-pipeline=<[email protected]>`), so nothing in either witness rests on an unmerged sibling, and the block that required exactly that witness is satisfied without a sign-off. The two run dirs and their totals are recorded in the new MEASURED STATE. Also corrected: the stale claim that `#CandyRef` has no local-path form is irrelevant to why plugin-pipeline is not composed here. It is not composed because the front-end is reached HOST-SIDE (`${CHARLY_BIN} pipeline …`), never as a bed-composed candy — a ref would add a candy the bed never invokes. Comments only. No entity, step, or plan changed; the bed's own semantics are untouched. *Agent: `workflow-ir` · session `7e17b5cf-c349-4032-8da5-2e4e03612780`* *Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)*
…hanged paths with no proof The validator's B12 block: `cost.go`'s `costTracker.checkLimit` (called from `runSteps`) and `cli.go`'s `cliDoctor` are changed behaviour, and nothing in `engine_test.go`/`cli_test.go` exercises either — no bed step emits `_meta.cost` or runs `charly lobster doctor` either. cost_test.go pins the read of `_meta.cost` (model, both token counts, dollars, the per-step ledger and the run total), the negative control (a step with no cost block contributes no entry and no dollars), each `action` at the boundary (`stop` fails naming both figures, `warn` prints and continues, an empty action defaults to `warn`, a total exactly AT the cap is not over it) and the tracker's one piece of state (`warn` latches to a single line, `stop` deliberately does not latch). cli_doctor_test.go drives `doctor` through the environment only — `CHARLY_BIN` and `LOBSTER_STATE_DIR` — and pins both branches of each: an unresolvable `CHARLY_BIN` warns AND still exits 0, an existing state dir reads `present` while a missing one reads `not created yet`, and the `pipeline stages:` line equals `newRegistry().names()` exactly. Both are in-process; no live boundary is crossed, so nothing is skipped, stubbed or faked. The systemd line in `doctor` is deliberately not asserted — it comes from a real `systemctl --user` query, so its value is a property of the host, not of this code. Both bite: mutating `if action == "stop"` fails TestCostCheckLimitActions/over_the_cap_with_stop_fails and TestCostWarnIsLatchedAndStopIsNot; deleting `cliDoctor`'s WARNING block fails TestCLIDoctorWarnsWhenCharlyIsNotResolvable.
…or block 2 on e7f3ef2) `resumeState` declared `InputKind` (`json:"inputKind,omitempty"`) and `SupersededStateKey` (`json:"supersededResumeStateKeys,omitempty")`. Neither was ever assigned nor read: `grep -rn 'InputKind\|SupersededStateKey' candy/plugin-lobster/` matched the two declaration lines and nothing else, and neither could reach a save, because every `saveGateState` call constructs a fresh `resumeState` literal (`gate.go:88`, `gate.go:294`) rather than carrying a loaded one forward. They were live-looking dead state carrying two upstream-shaped JSON keys this plugin never produces. Removed rather than documented: R5 asks that a cutover leave nothing legacy behind, and a field kept "for compatibility" with a writer that does not exist is the same class as the `cols`/`seen`/`batchSize`/`Attempts`/`DurationMs` the earlier review flagged and the previous head removed. If real upstream interop ever needs them, that is a change with a caller, and it lands then with one. No behaviour changes: the state a gate persists is byte-identical apart from the two omitted keys, and the fields were never in the wire request (they are not `json:"-"`, but nothing reads them). The state round-trip those gates depend on is already covered — `redo_test.go`'s `TestRedoCountSurvivesResume` does a real `save`/`load` round-trip, and `engine_test.go` loads a gate's state at six sites.
…h the body on #775 Two validator findings on cc50e95, both real, both fixed here. 1. R1(B5) — the committed `charly.yml` header said `opencharly/charly#775 (issue, still OPEN)` while the PR body said #775 is CLOSED. The issue is CLOSED (COMPLETED 2026-10-04T19:54:53Z, resolved by opencharly/charly#788); the header was stale. It now reads CLOSED. The same header's MEASURED STATE block was stale in the same way for the same reason: it named run directories, and a run dir written into this file describes a tree that cannot contain the line doing the describing — so it went stale the moment a comment above it moved. It now names NO run dir and NO SHA. It states only what is invariant under a comment-only edit of itself (the step counts and their result), and the per-head run dirs and summaries live in the PR body, which is the artifact that CAN name a commit. 2. B12 — `lobster-upstream-parity` could not fail. `exit_status: 3` makes exit 3 the step's EXPECTED code, i.e. a pass, and the command set `rc=3` unconditionally and exited 3 on BOTH branches, each of which only printed a `SKIPPED — …` line. The branch for `lobster` being PRESENT skipped too, because openclaw/lobster is not vendored here and its CLI invocation was never established. So the step never invoked upstream lobster, asserted nothing, and laundered a permanent skip into one of the bed's "passed" steps — the same lie-by-skip class as the schedule bed's own defect (fixed in e29a519), and the pathology charly's own bed header warns about ("a bed that reports SKIP where it meant to prove something"). The step is REMOVED (R5), with the reason recorded in its place. The engine bed is now 12 steps, every one of which can FAIL; none is a declared skip. The bed description and the file header say so. What is NOT removed is the claim it was standing in for: the upstream parity is simply NOT ASSERTED by this repo's beds, and README.md's "also runs under upstream lobster" is restated as the interface property the lowering is designed for — not a tested result. Restoring the check needs an upstream lobster whose invocation this repo can source, which is a change with a real interface to test. This commit changes no Go file (README.md and charly.yml only), so the witness binary is unchanged from cc50e95; both beds are re-run on this head regardless, because the engine bed's step set changed and its previous evidence does not cover it.
… naming a run and a SHA The three findings of the `4f4e58e` verdict, all in ONE commit. 1. B12 — `workflow-emit` shipped with no test that would fail without it. The op (`emitWorkflow`, run.go) and its dispatch arm (`ops.OpWorkflowEmit`, plugin.go) had zero coverage across every test file, and neither R10 bed drives it, so one of the plugin's four advertised ops — including its `github-actions` and unknown-format refusals — was unproven. `emit_test.go` drives the REAL provider dispatch (`NewProvider().Invoke` with an `OpWorkflowEmit` envelope), so one test covers both the plugin.go arm and the copy/refusal logic in run.go: the happy path for every advertised format (an entry per format, byte-identical to the lowered source), the empty-`out_dir` default, and each refusal (no pipeline, no format, `github-actions` designed-but-not-built, unknown format, and a requested file the lowering never produced). A further test pins `engineCapability().EmitFormats` to the set the op actually accepts, because that list is what the front-end reads to refuse a format before it dispatches. 104 `=== RUN` lines now, from 95. 2. R1/B5 — the committed `charly.yml` contradicted the invariant its own header states. The header says the file "names NO run directory and NO commit SHA"; the file named run dir `.check/check-lobster-schedule-local/2026.277.1733` and SHA `3d2aee88`. The named run dir was also not the run the PR body cites for that bed, so it was stale as well as self-contradicting. Both tokens are removed. The `plugin-pipeline` release is now named by its TAG (`v2026.277.2104`) — stable under a comment-only edit of this file, unlike a SHA — and the schedule-bed comment states its two requirements without pointing at one run. The header's invariant is KEPT, not weakened: it is what removed the earlier staleness loop. 3. R1 — the `2026-10-05` header block referred to "the two runs above" after that block had stopped naming runs; reworded to "both bed runs described above". Also R1, found in the same pass: `.gitignore` did not cover `.check/`. This repo runs its two beds FROM ITS OWN ROOT — that is what makes it a project — so a bed run leaves an untracked `.check/` tree. charly's own `.gitignore` and the umbrella's both ignore it, with the same rationale (per-run generated state, never version-controlled source), so this repo is the one that had drifted. One entry with that reason. `charly.yml`'s diff is comment-only (0 non-comment lines) and `emit_test.go` is a test, so no non-test Go file changes and the plugin binary is unchanged from `4f4e58e`. Both R10 beds are re-run on this head regardless, because the tree changed and R10 requires proof from the final committed tree; the body carries their new run dirs.
…AIL] diagnostic Two findings from the verdict on `043a702`, both in this branch's own new code. **B14(a)/B18 — `engine.now` was an inert field.** `engine.go` declared `now func() time.Time` under a comment claiming a test can pin the clock the state records use; `newEngine` assigned it `time.Now` and `testEngine` assigned a fixed clock — but nothing ever **read** it. Every state timestamp is stamped with the package-level `time.Now()` in `state.go` (`save`, `markConsumed`, `createApprovalIndex`), and `stateStore` never receives the engine's clock, so the injection was dead and the comment asserted a capability that did not exist. The gate's own first-listed remedy is removal, which is also the precedent this branch already set for the identical class (`cc50e95` removed the two inert `resumeState` fields), so the field, its comment and both assignments are removed. Nothing else changes and every gate stays green — which is itself the proof that the field was dead rather than merely unobserved. **R1/B5 — the closing engine-bed step's diagnostic was inverted.** In `charly.yml` the `lobster-export-unknown-is-named-error` step declares `exit_status: 1`, which makes a **non-zero** exit its PASSING case, yet its command reused the sibling steps' `if [ "$rc" -ne 0 ]` shape. So on **every passing run** the step printed a false `[FAIL]` and kept its scratch directory, while the cleanup branch was reachable only on the unexpected success — the step's own output contradicted the verdict it carried. The comparison is now inverted: a **zero** exit (the export of a never-lowered pipeline reporting SUCCESS) is the failure, exiting `2` rather than the expected `1`, and the passing path removes the scratch dir. Both branches were proved by running the exact body with the exit code injected: `rc=1` → exit 1, no `[FAIL]`, scratch removed; `rc=0` → exit 2, `[FAIL]` printed, scratch kept. **Both classes were swept across the whole module and both beds**, not just the named instances. `now` is the only field in the module that is never read as `.field` — every other zero-reference hit is either json-serialized (so the encoder reads it) or generated from CUE. And this step is the only one of the twelve `[FAIL]` blocks in the manifest whose `exit_status` is non-zero: the eleven `exit_status: 0` steps use the `rc≠0 == FAIL` shape correctly, and the schedule bed's six steps all use the `rc=0` / `exit_status: 0` convention consistently.
…uplicating them The engine hand-wrote types mirroring the CUE-sourced params shapes, leaving the generated result-side types unreferenced. Delete the one true duplicate (approvalRequest), use params.LobsterApprovalRequest / LobsterApprovalIdentity / LobsterApprovalObject directly, and EMBED the generated shapes in the small engine-only wrappers the documented json:"-" exception allows where the engine needs a field upstream does not carry. Decode the cost _meta through params.LobsterCostMeta and project it through a helper whose parameter and by-step local NAME the generated cost shapes. Honour the declared step condition: in evaluateWhen, and rewrite lobster.cue's use-map so every claim names a live consumer.
Review — PASSHead SHA: Security screen: PASS Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
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 free
to 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.
Supersedes #2 — and why the predecessor was closed
Supersedes #2(opencharly/plugin-lobster#2), which thecharly/pr-validatorauto-closed at2026-10-05T01:42:54Zon its 5-verdict BLOCK/INCONCLUSIVE threshold(
AI_REVIEW_AUTO_CLOSE_AFTER— for this repo the default 5, notopencharly/charly's override of 20;auto-close comment
5986682923). The auto-close is a policy bound on the thread, not a code finding —the gate says so itself — and the work continues here on a clean thread from the same commit lineage, as
the carry-forward rule requires.
Every finding raised on the predecessor is fixed, and the diff proves it rather than re-arguing it.
This work has drawn eight rounds of verdicts across eight heads — three on
#1before itsauto-close, four on
#2's own heads, and the fifth verdict on#2that closed it. Here is where eachfinding landed:
5981531544(ecf69bf)e29a5195984949490(bbca25e)pipeline.go;cost_limit/doctoruntestede7f3ef2;5985290924marks both resolved5985290924(e7f3ef2) 1 (A1/T3)workflow" tolobster.go, which has no cycle detectionengine.go'srunFile(engine.go:258-259) —cc50e955985290924(e7f3ef2) 2 (B14(a)/B18)resumeStatecarried two inert fields (InputKind,SupersededStateKey)cc50e955985516031(cc50e95) 1 (R1/B5)charly.ymlheader saidcharly#775"still OPEN" while this body said CLOSED4f4e58e5985516031(cc50e95) 2 (B12)lobster-upstream-paritycould not fail; a self-declared skip counted as a "passed" step4f4e58e5985516031(cc50e95) 3 (B15)5985909470(4f4e58e) 1+25986053587) marks bothstale-superseded; owned in PR comment59860154665986053587(4f4e58e) 1–3workflow-emituntested; the committedcharly.ymlnamed a run dir and a SHA; the body's R6 named the wrong branch043a702, one commit — the gate records eachverified-blocking, now resolved5986568983(043a702) 1 (B14(a)/B18)engine.nowinert — declared, assigned innewEngine/testEngine, never read8baa3f45986568983(043a702) 2 (R1/B5)exit_status: 1a non-zero exit is its PASSING case, but the command used the siblings'rc≠0shape, so a false[FAIL]printed and scratch was kept on every passing run8baa3f45986682557(8baa3f4) 1 (B13(d)/R3/SDD)paramstypes (approvalRequest,inputRequest,stepResult,costSummary/stepCost,runResult,approvalIdentity); the generated result-side types had 0 referencesaca182ee: the one exact duplicate deleted forparams.LobsterApprovalRequest;approvalIdentity→params.LobsterApprovalIdentity; the five with a real divergence became embed-wrappers (the documentedjson:"-"exception);costTracker.trackdecodes_metaviaparams.LobsterCostMeta. Measured 11 → 3 (§2), survivors named5986682557(8baa3f4) 2 (R1/B10)lobster.cue's "WHERE EACH DEF IS USED" named the deleted parity bed as#LobsterRunResult's consumeraca182ee5986682557(8baa3f4) 3 (R1/B14(a))params.LobsterStep.Conditionnever read whilerefs.go'sevaluateWhenclaimedwhen ?? conditionTestEvaluateWhenFallsBackToCondition(5-case table + 2 end-to-end loader cases) —aca182ee5986682557(8baa3f4) 4 (A1)charly.ymlis 1121 lines; measured 1123wc -lon the final tree)Everything the predecessor proved carries into this head unchanged or freshly re-measured. This PR is
8baa3f4's tree plus ONE commit,aca182ee, which changes non-test Go files (engine.go,refs.go,gate.go,state.go,cost.go,run.go,batch.go) as well as tests and the CUE comments, soit does move the binary: measured, the witness binary is
67234533bytes ataca182ee(
sha256 b1d5d7c5195b000cf2aaf78778b0cf544b35900baaab0051d4e5ee6d2668428a) against67224889at8baa3f4— a different size and hash, andgo.work.dev:19resolvesplugin-lobsterto this checkout,so the bed binary links the head under review rather than the released candy (§5a). Because the binary
moved, both R10 beds were re-run on
aca182ee, as R10 requires proof from the final committed tree. Nofinding is re-argued on the closed thread.
Summary
This PR lands the LOBSTER workflow engine module into
plugin-lobster— the repo skeleton (README.md,AGENTS.md,LICENSE, rootcharly.yml,.github/workflows/) was therepo-setupleg; the Go module isthis one. The plugin is the one thing in the wave that executes a workflow:
kind:pipeline(lobstersyntax carrying charly's own step grammar) is resolved and validated by
plugin-pipeline, lowered bysdk/workflowkit.Lowerinto a(workflow.lobster, charly.yml)pair, and dispatched here asInvokeProvider("workflow", "lobster", workflow-<op>). This plugin decodes that request, runs the pair, andanswers in lobster's tool-mode envelope v1, so its output is interchangeable with upstream lobster's.
workflow:lobsterworkflow-run(execute) ·workflow-resume(answer an approval/input gate by token or short id) ·workflow-schedule(apply/list/remove/run-now the systemd-user timers) ·workflow-emit(lower the IR to a consumer's on-disk form)command:lobstercharly lobster import <file>(upstream.lobster→kind:pipeline) ·export <name>(write the pair upstream lobster can run — charly steps are plaincharly taskinvocations) ·doctorengine.go(1199),run.go(355),batch.go(281),refs.go(435),shell.go(162),tty.go(63),cost.go(181)$id.json/$id.stdoutrefs,parallel/for_eachbatching, retry/on_error/timeout_ms, cost limit. Moved fromplugin-pipeline'sexecutor.go/batch.go(R3), not rewritten.gate.go(561),state.go(511)$LOBSTER_STATE_DIR; the resume token is the upstream wire format ({"protocolVersion":1,"v":1,"kind":"workflow-file","stateKey"}) plus a short id. Every state timestamp is stamped from the package-leveltime.Now()instate.go(save,markConsumed,createApprovalIndex) — there is no injectable clock, and the body does not claim one (§2).schedule.go(478).service/.timerunits, idempotent by content hash;OnCalendarconverted from cron.pipeline.go(829)pipeline:surface the engine actually implements —internalStages(pipeline.go:72-77):exec json table where pick head tail sort dedupe map groupBy template state.get state.set diff.last commands.list workflows.list.approveandaskare upstream stages this engine refuses: they sit inexternalStages(pipeline.go:57-58), whichrunPipelineStep(pipeline.go:101-102) checks first, so each is refused by name with a redirect —approve→anapproval:step that persists a resumable token,ask→aninput:step (both messages verbatim in the R4 bullet). The refusal is a redirect, not a stub, and it targets this engine's own gate, so an authored pipeline gets an answerable gate rather than a silently dropped one.lobster.go(656),plugin.go(166)lobster.goports upstream lobster'sload.tsvalidator: the workflow-file grammar plus its own validators' cross-field rules (validateWorkflowTree,validateStep,validateParallel,validateForEach) — unique ids across steps and across aparallelstep's branches, and noapproval/inputinside afor_eachbody or aparallelbranch (rejected by name, since the executor would otherwise drop the gate silently). It does not detect cyclic sub-workflowcomposition, and the body does not claim it does — that is a RUN-time refusal inengine.go'srunFile(engine.go:258-259). Ref handling is two-tier, as upstream: an operand that is entirely$id.pathresolves strictly and errors on an unknown id (resolveInputValue), while a ref inside a templated string leaves an unknown id literal (resolveStepRefs).plugin.goisNewProvider/NewMeta.charly.yml(1123, the repo root)check-lobster-appcomposes this candy plusplugin-task;check-lobster-localis itsdisposable: truelocal:bed (§5b — 12 steps).check-lobster-schedule-app+check-lobster-schedule-localare the systemd-user timer bed (§5c — 6 steps). Each step is acheck:withcontext: [runtime], anid,exit_status/stdout/stderrmatchers, and acommand:running${CHARLY_BIN}; every step is idempotent and scratch state ismktemp -d. Eleven steps declareexit_status: 0and use therc≠0 == FAILshape; the twelfth declaresexit_status: 1, so its diagnostic is inverted relative to theirs — that asymmetry is deliberate and was the5986568983block 2 fix (§2)..github/workflows/ci.yml(+16)cue:genjob — regenerateparams/cue_types_gen.gofromschema/lobster.cueand fail if the tree moves; the §1 reproducibility claim, gated rather than asserted.candy/plugin-lobster/.golangci.yml(+39/-5)default: standard+gofmt) with the sameerrcheckexclusions, plus ONE deliberate deviation: ST1005 OFF — justified below.AGENTS.md(+3/-2),.gitignore(+7).check/ignore entry (R1, found in the043a702pass): this repo runs its two beds from its own root, so a run leaves an untracked.check/tree — charly's and the umbrella's.gitignores already ignore it, so this repo is the one that had drifted.The one gate this module loosens, and why (A1).
candy/plugin-lobster/.golangci.ymlturns ST1005("error strings must not be capitalized") off, and the config file records the reason (
.golangci.yml:5-22):68 of the module's 110 ST1005 hits are upstream lobster's own error text, verbatim —
lobster.goportsupstream
load.ts, whose header states the rule ("the error strings are upstream's, verbatim: they are theoperator's only diagnostic, and a reworded one is a different product"); the rest are the messages of the
engine MOVED from
plugin-pipeline, whose CI never ran a linter, so rewording them inside a move wouldsmuggle a behavioural change into it (R3/R5); and the module's own tests assert the capitalized form
(
strings.Contains(err.Error(), "Unknown command: frobnicate")), so lowercasing would be a product changewith a test break. Everything else in the standard set applies: the rest of staticcheck (
QF*,SA*) on,the six default exclusions listed explicitly, and
gofmtenabled — a per-module allowance charly's ownroot config explicitly permits, and narrower than the baseline (one check off, not a linter off).
Nothing charly-specific is special-cased. Every charly-shaped step runs by invoking
charlyitselfagainst the generated
charly.yml, so a workflow reaches every plugin of every provider class through thenormal core→plugin dispatch.
Consumer order:
plugin-lobsteris the producer here and lands first. The front-end leg that drives ithas since merged (
opencharly/plugin-pipeline#32, squash3d2aee8, taggedv2026.277.2104) — itreaches this engine by provider class, not by a compiled-in require, which is why it could land
independently. What remains after this PR is the charly pin bump, a separate consumer leg.
How tested
Run in
/home/atrawog/Sync/Atrapub/lo/claude/opencharly/.worktrees/workflow-ir/plugin-lobsteron the branch headaca182ee(branchfeat/workflow-ir-3):This head is ONE commit over the predecessor's final head
8baa3f4.aca182eelands all fourfindings of the closing verdict
5986682557in a single commit — the generated-types adoption(B13(d)/R3/SDD), the
lobster.cueuse-map correction (R1/B10), thecondition:fallback (R1/B14(a)), andthe
charly.ymlcount (A1) — and §Supersedes names where each one landed. Nothing is re-argued on theclosed thread; the diff is the answer.
That the change is real is measured, not asserted.
aca182eechanges non-test source(
engine.go,refs.go,gate.go,state.go,cost.go,run.go,batch.go) as well as tests and the CUEcomments, so the plugin really does change, and the witness binary proves it rather than the file list
implying it: rebuilt for
aca182eeit is67234533bytes, sha256b1d5d7c5195b000cf2aaf78778b0cf544b35900baaab0051d4e5ee6d2668428a, against67224889/0ad30562…at8baa3f4. Because the binary moves, both R10 beds were re-run from scratch onaca182eerather thancarried over — R10 requires proof from the final committed tree — and so were all the CI legs,
box validate, and both bed runs below.Block B15 — the branch's commits, and why none of them is a split-work remnant. The branch carries
25 commits over
origin/main, and the landing is a squash (tag-on-merge+ native auto-merge), sothe merged
mainreceives one commit and the intermediate sequence is not part of the product. Thefinal tree is therefore the whole deliverable, and the check that matters is whether anything in it
depends on reaching an intermediate revision: it does not.
git statusis clean with no exception at all(the generated
.check/is now ignored); the diff overorigin/mainis 34 files, all of them either themodule, its candy, its CI/lint config, the root manifest's two beds, or
README/AGENTS/.gitignore—there is no scratch file, no half-migrated leftover, no file present only to make an earlier commit
compile, and no second copy of anything (R3/R5). The one file the second commit touches outside the bed
manifest,
README.md, was corrected because it repeated the parity claim the bed had been laundering —the opposite of leaving a stale half-landed artifact behind.
Both beds and every CI leg were re-run on this exact head, not carried over from any earlier tree —
so nothing in §1 or §5 below rests on a tree a reader cannot fetch. The
.check/directory retainsearlier calvers from this branch's development; the run dirs this body cites are the ones §5b/§5c name,
and each is a run on
aca182eeitself.1. The repo's own committed CI, on the head
.github/workflows/ci.ymlrunsgofmt,golangci-lintv2.13.2,go vet,go test, and acue:genreproducibility step (generate
params/cue_types_gen.gofromschema/lobster.cue, then diff). All five,run here — from
candy/plugin-lobster, the module root, which is theworking-directoryevery CI stepdeclares (
ci.yml:35,42,45,49):Every leg is green, and
-count=1means no line is a stale cache hit.golangci-lintis invoked fromcandy/plugin-lobster— the directory CI uses — because invoking it from the repository root fails thetypecheck yet still prints
0 issues., a green that proves nothing; the module-root invocation is the onethat counts.
Reproducible — the committed generated file is exactly what the schema produces. The
cue:genstep, runwith the CI-pinned
cue v0.16.1(go install cuelang.org/go/cmd/[email protected]):2. The changed path is genuinely executed
The suite is not a compile check:
engine_test.go(890 lines),redo_test.go(284),schedule_test.go(205),
cli_test.go(179),cost_test.go(210),emit_test.go(221),cli_doctor_test.go(137) andtty_test.go(46) drive the engine — the step loop, ref resolution, the redo back-edge, the gate/resumeround-trip, the scheduler's unit rendering, the
cost_limitceiling,doctor, theworkflow-emitop, andthe import/export CLI — in-process against real fixtures. That is the live invocation of the changed runtime
path.
cost_test.go— thecost_limitceiling (cost.go). This engine spends nothing of its own: thepipeline:stdlib refuses the LLM stages, so the ceiling is a read of the_meta.costblock a stepreports plus the workflow's own cap — and that read and cap are the whole of the file's behaviour, so they
are what is pinned: everything recorded off
_meta.cost(model, both token counts, dollars, the per-stepledger and the run total, in step order); the negative control — a step that reported nothing, non-object
JSON, or a
_metawithout acostcontributes no entry and no dollars, so the ledger is a record andnot an estimate; each
actionat the boundary (stopfails naming both figures,warnprints andcontinues, an empty action defaults to
warn, and a total exactly at the cap is not over it); and thetracker's one piece of state —
warnis latched to a single line however many steps push the total higher,while
stopis deliberately not latched.cost.gois 181 lines on this head, seven more than on8baa3f4, becauseaca182eeextracts theprojectCostseam below.cli_doctor_test.go—doctor(cli.go).doctoris an operator's first look at why a step will notrun, so its contract is: report the resolved surface and always exit 0. The tests drive it through the
environment only —
CHARLY_BIN(what a charly step will exec) andLOBSTER_STATE_DIR(where a gatepersists) — and pin both branches of each: an unresolvable
CHARLY_BINwarns AND still exits 0 (adiagnostic that exits non-zero on a diagnosis is a trap in a script), an existing state dir reads
presentwhile a missing one reads
not created yet, and thepipeline stages:line equalsnewRegistry().names()exactly — that is the line telling an operator whether the
pipeline:step in their workflow is supported,so it must be the registry itself and not a hand-kept list. It deliberately does not assert the systemd line: that comes from a real
systemctl --userquery, aproperty of the host, so pinning one outcome would pin the test host — the query is real, its result is
simply not the contract. Both files are in-process and cross no live boundary.
emit_test.go— theworkflow-emitop (run.go'semitWorkflow+plugin.go's dispatch arm). Thisop re-materializes the lowered
(workflow.lobster, charly.yml)pair for inspection — one of the plugin'sfour advertised ops. It is driven through the real provider dispatch (
NewProvider().Invokewith anOpWorkflowEmitenvelope), not by callingemitWorkflowdirectly, because one test then covers both theplugin.goarm and the copy/refusal logic inrun.go. Pinned: the happy path for every advertised format(an entry per format, byte-identical to the lowered source), the empty-
out_dirdefault, and each refusal —no pipeline, no format, a
github-actionsformat that is designed but not built, an unknown format, and arequested file the lowering never produced (a format naming a file that is not there must fail, not answer
with a path to nothing). A fifth test ties
engineCapability().EmitFormatsto the set the op actuallyaccepts, because that list is what the front-end reads to refuse a format before it dispatches — a format
accepted but not advertised (or the reverse) is a contract split, so the two are pinned together. And it
bites, proved by mutation:
This head's fix — the generated
paramsshapes are now the seam, and the count is measured (B13(d)/R3/SDD).The closing verdict's first block was that the engine hand-wrote types mirroring the CUE-generated
paramstypes, leaving the generated result-side types unused. The fix is the gate's own first-listed remedy: use
the generated types where the engine meets the wire. The count is measured with
grepover everynon-generated
.gofile in the module, before and after — the generated file itself is excluded (itdeclares the types; a reference in it says nothing):
11 → 3, and the three that remain are named with their reason in
schema/lobster.cue's header: they arethe field types the generated
LobsterStepstruct itself declares (LobsterStep.Parallel LobsterParallel,LobsterStep.Approval LobsterApproval), used as types even though the engine reads themthrough a field;
#LobsterRunResulthas no consumer at all because the wire reply the engine answers isspec.WorkflowRunReply(run.go), never this authored shape. The mechanics: the ONE true field-for-fieldduplicate,
approvalRequest, is deleted and every site usesparams.LobsterApprovalRequest(
gate.go118/133/237,engine.go213;ApprovalID→ApprovalId),approvalIdentityis likewise replacedby
params.LobsterApprovalIdentity(gate.go229-250,state.go91), the five with a realdivergence became embedding wrappers (
struct { params.LobsterStepResult; … }— the documentedjson:"-"embed-wrapper exception, never a hand-duplicated whole type), andcostTracker.tracknowdecodes
_metathroughparams.LobsterCostMeta(cost.go:95) and hands the generatedparams.LobsterCostSummaryto a namedprojectCostseam (cost.go:109) that readsparams.LobsterStepCostby name (cost.go:114). The generated file is still byte-identical — the seamsmoved, the schema did not.
The
8baa3f4bed fix, proved on both branches — carried into this head unchanged. The engine bed'sclosing step asserts that exporting a pipeline that was never lowered is a named error, so it declares
exit_status: 1, making a non-zero exit its passing case. Its command had nevertheless used the siblingsteps'
rc≠0 == FAILshape, so the[FAIL]branch fired on every passing run. The comparison wasinverted on
8baa3f4; both branches were proved by running the exact step body with the exit code injected,rather than by reasoning about it:
Branch A is the one the finding was about:
step_exit=1matches the declaredexit_status: 1(a PASS), itemits no
[FAIL], and it removes its scratch dir. Branch B is the real bug the step exists to catch: itfails (
exit 2≠ the expected1) with the diagnostic on stderr. The real run agrees — the step passesin §5b and the whole run dir contains zero
[FAIL]lines.3.
charly box validate— it PASSES, and that is a correctioncharly box validateaccepts this candy:(Re-run on the final head
aca182ee, clean tree, against the merged-driver host of §5a; the only warning isthe dev-build notice every §5 command prints, allowlisted in the beds' own config. The accept line is
unchanged from the earlier report.)
This corrects an earlier version of this body, which reported the opposite — stated, not quietly
dropped. When the branch was written, the same command ran against the charly the umbrella pins and failed:
Root cause, measured (R1) — the host's spec pin, not this diff.
workflowis a member of spec's closed#ProviderClassNames, andspec.ProviderClassesis generated Go compiled into the host binary(
spec/schema/candy.cue:553-559); there is no runtime override for it. Measured at three tags:So the bound in the error above is charly's OWN class set, which could not contain
workflowuntil charlyadopted a spec ≥
v0.2026276.0.charly#778landed exactly that adoption and charlyv2026.277.0930carries it, which is why the same command passes today — and why this module's
go.modpinsspec v0.2026277.1407(§Summary): authored against the contract it needs, not against today's charly. Twoolder binaries fail even earlier for unrelated reasons (the installed package's schema predates this repo's,
and the retired
version:stamp ofcharly#754); neither is the blocker and neither is patched.4.
origin/main'sciis red — and this PR is why it turns greenThe push to
mainthat created the skeleton ranci, which failed in thegolangci-lintstep:origin/maincarries 0Gofiles (git ls-tree -r --name-only origin/main | grep -c '\.go$'→0;on this head →
24) — the module is this PR. A linter with nothing to analyse exits 5, so the redmainisthe new-repo bootstrap artifact, and this PR's own CI is the proof: the local run in §1 is the same gate
set.
5. The R10 beds — B2 AND B3 both GREEN on the final tree
aca182ee, against a MERGED driverPer
/charly-check:check'sreferences/beds-and-r10.md, this repo's R10 witnesses are authored in thisbranch:
check-lobster-local(B2) — engine semantics: refs/when, args/env fidelity, retry/on_error,timeout_ms,parallelany/all,for_eachbatching, sub-workflowcomposition incl. the cyclicfailure, approval/input resume, the
pipeline:stdlib, and the import/export round-trip. 12 steps,every one of which can fail (§5b).
check-lobster-schedule-local(B3) — the systemd-user timer path:apply/idempotent/list/run-now/fires/remove. 6 steps (§5c).
5a. The host both beds ran on — the sanctioned dev-tree build, with a MERGED driver
Both beds run the plugin from a host charly binary that must have this candy compiled in. The host is
built by the documented route,
charly/scripts/bootstrap-charly.sh --dev-plugin— the overrideopencharly/charly#788landed and released (v2026.277.1528). For the runs in §5b/§5c theplugin-pipelinevalue is a detached worktree pinned at the merged tag, not a branch worktree,and
plugin-lobsteris this PR's worktree — the binary was rebuilt fromaca182ee, the final head,before either bed ran:
where
$WT=/home/atrawog/Sync/Atrapub/lo/claude/opencharly/.worktrees/workflow-ir. The flag value is theplugin's repo checkout (the generator does
filepath.Join(local, "candy", name));pluginsgenemits aseparate
go.work.devand the build selects it withGOWORK, so the committedgo.work/go.work.sumareuntouched. Nothing in any repository is modified — an earlier revision of this body described a
hand-written
-overlayregistration file, and that is gone, replaced by the supported flag.The binary is rebuilt at every head that moves it.
aca182eechanges non-test source(
engine.go,refs.go,gate.go,state.go,cost.go,run.go,batch.go), so the binary mustmove, and it does:
67224889bytes / sha2560ad30562…at8baa3f4,67234533bytes / sha256b1d5d7c5…ataca182ee. That difference is the measurement that the generated-types adoption is a realcode change and not a comment edit — and it is why both beds were re-run rather than carried over. (The
size is not monotonic in the source: extracting the
projectCostseam moved the linked layout, so thebinary is smaller than the intermediate lint-fix build at
9fc7e4e. The hash is the evidence.)The driver is a MERGED commit, and here is the check that shows it.
go.work.devrecords the twooverridden sources, and the
plugin-pipelinesource is the detached checkout of the merged tag:3d2aee8isopencharly/plugin-pipeline#32's squash commit onmain, andcandy/plugin-pipeline/v0.2026277.2104is the tagtag-on-mergepublished on it. So the front-endcompiled into the binary these beds ran is the merged tree — there is no unmerged sibling anywhere
in either witness.
One measured contract, recorded because it cost time.
--dev-pluginre-points the source, butpluginsgen.moduleVersionstill demands arequirepin for every compiled-in plugin, and a require at aversion Go cannot load defeats the
go.work.devuseoverride — import resolution fails before theworkspace can supply the local dir. Measured against
GOWORK=go.work.dev:v0.0.0→ FAIL (unknown revision), the zero pseudo-version → FAIL (invalid version), requires dropped → rc=0 but not the flag'scontract, and a real released tag + the workspace
use→ rc=0. So the pins name versions Go can loadwhile the
useline decides which source is compiled — which is why the decisive check above reads thecheckout, not the pin.
The witness worktree's
charly/charly.yml,charly/go.mod,plugins_generated.go,plugins_refs_generated.goandgo.work.devare a witness, never a commit — reverted before thissession ends, and belonging to no repository under review.
5b. B2
check-lobster-local— GREEN, 12/12, on the final committed treeaca182eecharly.yml:128defines it as adisposable: truebed(
local: {from: check-lobster-app, host: local, disposable: true, lifecycle: dev}), run end to end —deploy add→bring-up-members→check live→update→cleanup→cleanup-members, every stepok: true:.check/check-lobster-local/2026.278.0154/summary.yml:ok: true,total_seconds: 67(deploy-add4s,bring-up-members0s,check-live41s,update3s,cleanup19s,cleanup-members0s),errors: 0/warnings: 0/advisories: 0,allowlisted: 4, every stepok: true, run exited 0. The only findings arethe allowlisted
dev-worktree-binary-noticeentries (one per step running a child process) — the repo'sown allowlist declares them, with the reason (a dev/worktree charly is not at the FHS location that owns
/usr/lib/charly/plugins, so it skips the installed package's plugins,opencharly/charly#328). This run ison the final committed tree
aca182eewith the merged-driver host of §5a, and the step list is pasted fromthis run's
check-live.log, not carried over. Every one of these 12 steps can fail; none is a declaredskip, and the count is
12 passed, 0 failed, 0 skipped. The last step'sexit=1is its expected code —reached without emitting a
[FAIL]:grep -rc '\[FAIL\]'summed over the entire run dir is 0.A step this bed no longer has, and why (B12). The bed used to end with
lobster-upstream-parity, whichwas to run the exported pair through the upstream lobster binary and diff the envelope. Its verdict
(
5985516031) showed it could not fail:exit_status: 3made exit 3 the step's expected code (a pass) andthe command set
rc=3unconditionally on both branches — including the branch forlobsterbeingpresent, since openclaw/lobster is not vendored here and its invocation was never established. So it never
invoked upstream lobster, asserted nothing, and laundered a permanent skip into a "passed" step. The step
is deleted (R5); a step that cannot fail is not evidence, and upstream parity is simply not asserted by
this repo's beds — the body and
README.mdsay that rather than counting a skip as a pass.This head's fix is exercised by this run. The
refs.goseamaca182eechanges —evaluateWhen'swhen ?? conditionfallback (finding 3) — is exactly whatlobster-refs-when(thewhen:guard, incl. theskipped-step record) drives, and it is
PASSabove on the rebuilt binary; thegate.go/state.goseams(the
params.LobsterApprovalRequest/LobsterApprovalIdentityadoption, finding 1) are whatlobster-approval-resumeandlobster-input-resumedrive, alsoPASS. That is the R10 proof the change ison the executed path, not merely that it compiles.
5c. B3
check-lobster-schedule-local— was a LIE-BY-SKIP, then a real RED; now GREEN onaca182eeThis bed's first run proved nothing while reporting success — every step skipped on an unresolvable
check-variable ref:
Every step computed its unit directory as
u="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user", which is notshell syntax to charly: the check-variable grammar (
sdk/kit/checkvars_expand.go:17) reads a brace-dollarUPPERCASE name as an env-map key, never a shell default — so the ref resolved to the absent key
XDG_CONFIG_HOME:-$HOME/.configand the runner turned it into a skip. Six skips underok: trueisworse than a red bed: a green that proves nothing. Removing that made the bed honest, and the honest bed
was red 6/6 — for two distinct defects, both root-caused and fixed in
e29a519:both root-caused and fixed in
e29a519:${CHARLY_BIN}is an EXPANSION, not an exported env var.StampCharlyBin(
sdk/kit/checkvars_charlybin.go) writesres.Env["CHARLY_BIN"]for textual${CHARLY_BIN}substitution — but the step's child process (the unit's
ExecStart, i.e.charly pipeline run …started by the timer) inherits nothing, so the generated unit named
/usr/bin/charly, whose registry hasno such pipeline. A genuine bed defect: the unit must exec the binary UNDER TEST. All six schedule
steps now
export CHARLY_BIN="${CHARLY_BIN}"beforecharly pipeline schedule …, so the childplugin-lobsterresolvesresolveCharlyBin(env)→ the binary under test; the generated.servicethennames the witness binary's path (read from a standalone reproduction, not guessed).
timeout:key was missing — the never-hang ceiling killed the long step:schedule-firespolls~150 s and the run recorded
probe killed by never-hang ceiling after 2m0.171s. Permarketplace/check/skills/check/SKILL.md(thetimeout:mandate), any step past the ~120 s ceiling mustdeclare one —
timeout: 300swas added toschedule-run-nowandschedule-fires.Re-measured on the final head
aca182eewith the merged-driver host of §5a — 6/6 PASS:and the six steps, verbatim from this run's
check-live.log:.check/check-lobster-schedule-local/2026.278.0156/summary.yml:ok: true,total_seconds: 162(check-live
duration_seconds: 137, deploy-add 4s, update 3s, cleanup 18s, the two members steps 0s),errors/warnings/advisories: 0,allowlisted: 4, every stepok: true, run exited 0. The onlyfindings are the allowlisted
dev-worktree-binary-noticeentries (one per step that runs a childprocess), declared by the repo's own allowlist with the reason (a dev/worktree charly is not at the FHS
location owning
/usr/lib/charly/plugins, so it skips the installed package's plugins,opencharly/charly#328).grep -rc '\[FAIL\]'summed over the whole run dir is 0.Every one of the six steps can fail; none is a declared skip, and the tally is
6 passed, 0 failed, 0 skippedrather than a "passed" count holding a step that never ran. Theschedule-firesstep waits for a real* * * * *timer to fire and that wait is wall-clock, not code — soits duration moves between runs (137 s here, against 147 s and 125 s on this branch, all passing) and the
spread is the host's cron boundary, not the diff. The two
aca182eefixes are on this run's executedpath: the generated-types adoption in
gate.go/state.gois what the schedule CLI builds its resumepayload from, and the
refs.gowhen ?? conditionfallback is what a scheduled step's guard evaluates —both exercised by the
apply/run-now/firessteps above, on a binary rebuilt from this head.The dependency this bed names, and how it is discharged. B3's steps drive
charly pipeline schedule …,and the
scheduleverb belongs to the front-end (plugin-pipeline) — so the run's authority depends onwhich
plugin-pipelinesource the host carries. That is why an earlier review's block stood; it no longerdoes: the front-end leg merged (
opencharly/plugin-pipeline#32, squash3d2aee8) andtag-on-mergepublished
candy/plugin-pipeline/v0.2026277.2104on that commit, which is the clean detached checkout thehost above was built with (§5a, verbatim). Every driver in this witness is in a merged tree: no
maintainer sign-off is claimed and no unmerged sibling stands behind the run.
No R10 exemption is claimed. Both of this repo's beds ran on the final committed tree
aca182eeandboth are green, pasted verbatim above with their run dirs named, against the binary of §5a — rebuilt
from this head, because
aca182eemoves it (measured:67234533bytes /b1d5d7c5…, against67224889/0ad30562…at8baa3f4). This head is ONE commit over8baa3f4, touching seven non-test Go files plustests and CUE comments.
Rulebook compliance
R0 — skills first. Loaded before the first tool call:
/charly-internals:git-workflow(by path — this harness does not resolve the namespaced ref) and/charly-check:checkwithreferences/beds-and-r10.md.R1 — RCA every anomaly. Six, each root-caused where its evidence is pasted, none classified
"pre-existing" or "out of scope": (§3) the
charly box validaterejection was the HOST's compiled-inspec.ProviderClasses, never this diff —workflowenters that set only at specv0.2026276.0, andcharly#778(merged, charlyv2026.277.0930) now carries it, so the command passes today; the earlierrevision of this body that called it a permanent blocker is corrected there. (§4)
origin/main's redciis a linter with no Go files to analyze on the skeleton commit, which this PR's merge fixes.(§1) the host's
cueis v0.17.1 against CI's pinned v0.16.1, so the pinned binary was installed and thereproducibility claim is made against CI's version. (§3) two older charly binaries fail earlier still —
the repo schema and the retired
version:stamp (charly#754) — unrelated and unpatched. (043a702)the committed
charly.ymlnamed a run dir and a SHA while its own header says it names neither; thetokens were removed, not the invariant weakened, and the same pass found
.gitignoremissing.check/.(§2) the engine bed's closing step carried an inverted diagnostic, root-caused to reusing the
siblings'
rc≠0 == FAILshape on the one step whose expected exit is non-zero. The closing verdict'sfour findings are root-caused and answered the same way in §Supersedes.
R2 — prove it. 66 test functions (112
=== RUNlines) execute the engine, and every changed paththe reviews named unproven —
costTracker.checkLimit,cliDoctor,workflow-emit— has tests shownto fail without the code (§1, §2; the emit mutation is pasted). The generated params are proven
reproducible against CI's pinned
cue(§1). This head's fix is proved the measuring way: thegenerated-type reference count is grep-measured 11 → 3, survivors named (§2). The two
8baa3f4fixesare proved the other way, each being a removal or an inversion: the dead field's removal by the whole
gate set staying green without it, the bed step's inversion by running the exact body on all three code
paths (§2).
R3 — no duplication. The executor and batching are moved from
plugin-pipeline(which deletes them in its own PR), not re-implemented. This head is the rule applied to the engine's own types: the hand-written shapes that mirrored the generatedparamstypes are replaced by the generated ones at every seam, so the schema has one Go view, not two (§2).R4 — no workaround. No gate is skipped and none is stubbed: both R10 beds ran to a PASS on the final
tree, and the OpenClaw-only pipeline commands fail hard with "unsupported" rather than being stubbed.
That refusal names a next step for every stage it rejects, and the two that redirect into this engine's
own gates are verbatim:
The one place a workaround was tempting — a hand-written
-overlayregistration file to reach acompiled-in plugin from a dev tree — was removed in favour of the sanctioned
--dev-pluginflag(§5a).
R5 — cutover. Nothing legacy is retained; the module is the only engine. The no-op bed step, the dead engine field, and the duplicated hand-written types were all deleted rather than kept as inert placeholders (R5).
R6 — git safety. No force-push, no hook bypass, no direct push to
main; the push is a fast-forward of this PR's own branchfeat/workflow-ir-3, from8baa3f4toaca182ee—aca182eeis a direct descendant of8baa3f4(git merge-base --is-ancestor 8baa3f4 aca182ee→ 0), so no force-push is involved.R7 — prove the gate. Every command above ran on
aca182ee(this head), from the module root CIitself uses, pasted verbatim with
-count=1; both R10 beds ran on the same committed tree, against awitness binary rebuilt from this head before they ran. This head is ONE commit over
8baa3f4andtouches non-test source (
engine.go,refs.go,gate.go,state.go,cost.go,run.go,batch.go), so it does move the binary — measured67234533bytes / sha256b1d5d7c5…against67224889/0ad30562…at8baa3f4(§5a). Every CI leg and both beds were re-run from scratch; nothingwas argued to be unaffected. (An earlier pass's first gate invocation ran from the repository root and
failed the typecheck — the wrong directory, reported in §1, not quietly re-run.)
R8 — what is asserted is what is emitted. The suite asserts the engine's OWN artefacts, never a
paraphrase: the tool-mode envelope v1 the executor returns, the on-disk generated
(workflow.lobster, charly.yml)pair (emit_test.goasserts the emitted bytes equal the loweredsource), the rendered systemd
.service/.timerunits, and the exact upstream error stringslobster.goports. §3's rejection is the host's own validator text, quoted unedited.
R9 — the binary equals the source. The module's gates (§1) build and run the committed tree;
charly box validate(§3) and both R10 beds (§5) run a charly built by this session fromcharly-witnessofforigin/mainvia the sanctionedscripts/bootstrap-charly.sh --dev-pluginroute —stamped
2026.277.1528, reporting itself aDEV BUILD, local plugin source, and pinned to the tree underreview by its hash (
b1d5d7c5…,67234533bytes). §5a proves which source it carries by readingthe checkout:
plugin-pipelineis a clean detached checkout of the merged tagcandy/plugin-pipeline/v0.2026277.2104(3d2aee8);plugin-lobsteris this PR's worktree ataca182ee. No shared or installed binary is used and no repository is modified — the supported flag, nota hand-written overlay.
R10 — the applicable gates RUN, on the final committed tree, and their results are pasted as they
came. The repo's committed CI is green on the head and the changed paths execute in the suite (§1, §2).
Both R10 beds are authored in this branch and both ran on
aca182eeagainst a binary rebuilt fromthis head: B2
check-lobster-localGREEN —12 steps: 12 passed, 0 failed, 0 skipped,ok: true,total_seconds: 67, 0 warnings, exit 0 (§5b) — and B3check-lobster-schedule-localGREEN —6 steps: 6 passed, 0 failed, 0 skipped,ok: true,total_seconds: 162, exit 0 (§5c). Every step inboth beds can fail; none is a declared skip, and both ran against a host whose
plugin-pipelineis amerged tag, so no witness rests on an unmerged sibling (§5a). B2's count moved 13 → 12 because a step
was deleted (§5b); B3 was a lie-by-skip under
ok: trueand then a real 6/6 red, fixed at bothunderlying bed defects (§5c). No R10 exemption is claimed, and neither bed is waived.
A1 — the one gate this module loosens is stated, and justified.
candy/plugin-lobster/.golangci.ymlturns ST1005 off; the reason (upstream-verbatim messages, the moved plugin-pipeline messages that were
never lint-clean, and this module's own tests asserting the capitalized form) is in the §Summary block.
Every other standard linter,
gofmt, and the rest of staticcheck still apply.Live or skip. No boundary is mocked or stubbed, and no step in either bed is a declared skip — all
12 + 6 executed for real, each against the real
charly, systemd user manager, filesystem and git. Twoexternal boundaries are deliberately not crossed, and neither is a step: the LLM-dependent paths are
exercised only through non-LLM code, and the upstream
lobsterparity is not asserted at all — it usedto be a bed step whose
exit_status: 3let a self-declared skip count as a pass, an earlier review showedit could not fail, and it is now deleted rather than repaired (§5b). This repo's beds therefore do not
prove upstream portability, and the body and
README.mdsay that instead of laundering a skip into green.Change classification
charly.ymlis a project withdiscover: candy, and the candy declaresworkflow:lobster+command:lobster.gofmt+golangci-lintv2.13.2 +go vet+go test+ thecue:genreproducibility check) green on headaca182ee, with 66 testfunctions (112
=== RUNlines) executing the changed runtime path. On top of it, both of this repo'sR10 beds PASSED as
disposable: truebeds on the same committed tree, against a witness binary rebuiltfrom it — B2
check-lobster-local12 steps: 12 passed, 0 failed, 0 skipped,ok: true,total_seconds: 67(§5b) and B3check-lobster-schedule-local6 steps: 6 passed, 0 failed, 0 skipped,ok: true,total_seconds: 162(§5c), both against the merged-driver host of §5a.charly box validatepasses (§3). Nothing here is reported on an edited tree.fully tested and validated— the full gate passed on the final committed tree andthe changed runtime paths executed live with retained output: the module's CI suite, the pinned-
cuegeneration check,
charly box validate, and both assembled R10 beds end to end (bring-up → checklive → update → teardown), including the scheduler writing real systemd-user units, a timer actually
firing, and
removetearing them down. Both bed runs are onaca182ee, pasted verbatim, with their.check/<bed>/<calver>/summary.ymlpaths named. The dependency is discharged, and the discharge ischeckable: B3's steps need the front-end's
scheduleverb, so the host'splugin-pipelinesourcedecides the witness's authority — and that source is a clean detached checkout of the merged tag
candy/plugin-pipeline/v0.2026277.2104(3d2aee8, feat(pipeline)!: the workflow front-end cutover — lifted verb providers, the retired executor, and the resume + schedule legs plugin-pipeline#32), read fromgo.work.devin §5a. No maintainer sign-off is claimed and no unmerged sibling stands behind either run.This PR
Supersedes #2(auto-closed at the 5-verdict threshold; §Supersedes names every finding itcarried and where each landed) and relates to
opencharly/charly#758(the wave),opencharly/plugin-pipeline#32(MERGED 2026-10-04T21:04:52Z as squash3d2aee8, taggedv2026.277.2104— the front-end whose lowered pair this engine executes, and the merged driver §5a's hostwas built against),
opencharly/charly#632(the charly leg that had to adopt spec ≥v0.2026276.0beforeany host could compose this candy — CLOSED;
opencharly/charly#778landed that adoption and charlyv2026.277.0930carries it, so §3's rejection no longer reproduces),opencharly/charly#775(thedev-tree-override issue — CLOSED 2026-10-04T19:54:53Z, resolved by
opencharly/charly#788, MERGED2026-10-04T15:28:14Z and released in
v2026.277.1528; this PR's §5a host uses exactly that--dev-pluginflag),
opencharly/spec#195(the tri-stateapprovethis PR pins),opencharly/sdk#339(theLowerthisplugin consumes), and
opencharly/plugin-task#9(the charly step executor).Agent:
workflow-ir· session7e17b5cf-c349-4032-8da5-2e4e03612780Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)