Skip to content

feat(spec): the kind:pipeline lobster-syntax value, the #Workflow IR, and the workflow engine op envelopes - #189

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/workflow-ir
Oct 3, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/workflow-ir

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The workflow surface becomes CUE-first and single-source, in three additive pieces:

  • schema/pipeline.cue — the AUTHORED kind: pipeline body, in lobster syntax and extended with charly's OWN step grammar, so a workflow can use any charly plugin of any provider class through the normal core→plugin dispatch. No word is special-cased: a plugin released tomorrow is usable with no change here.
  • schema/workflow.cue — the normalized, engine-agnostic IR every consumer lowers from, plus the engine op envelopes. Lobster is one consumer; a GitHub Actions consumer fits the same IR unchanged.
  • schema/candy.cue — #ProviderClassNames gains "workflow" (additive; the derived capability regex recomputes, so nothing is hand-edited).

Closure is the point of the authoring def. cue exp gengotypes renders every field as a plain Go string, so a decode-only test cannot tell a closed body from an open one. spec/pipeline_test.go therefore unifies CONCRETE values into #PipelineValue against the same schemaconcat concatenation the runtime gate uses, and fails if a retired key (stages:, command:, skip_when:, concurrency:) is re-accepted or an unknown key is tolerated.

The exec-arm XOR is deliberately a Go rule, not CUE. Exactly one of run/pipeline/workflow/parallel/for_each/input/plan/charly is enforced in plugin-pipeline's OpValidate: a nested entity-level disjunction breaks the closedness of the surrounding def and collapses the generated Go type — the same shape, and the same reason, as the box.cue base/from precedent. The corpus asserts that boundary explicitly (both zero arms and two arms are ACCEPTED by CUE) so the CUE/Go split is pinned rather than assumed.

The flow block is declared once and embedded — never re-stated. #PipelineFlow (id/when/env/cwd/stdin/timeout_ms/on_error/retry) is embedded by all three step defs — #PipelineStepBase, #WorkflowStep and #PipelineSubStep — and by nothing else. The substep previously re-declared its eight keys verbatim, while that def's own comment already claimed it was "Embedded by each step def"; gengotypes FLATTENS the embed exactly as it already does for #PipelineStepBase, so the substep's Go fields are unchanged (only their order in the generated struct moves). An earlier revision of this branch also had the #PipelineArms comment claim that the flow keys distinguish the authored step from the IR step: both embed the flow block, so they do not. The two fields that actually differ are approval (the authored terse union vs the IR's normalized object) and result, which is IR-only. §3(b2) is the de-duplication proof; §3(a) re-runs the corpus over the flattened shape.

A KIND is a word a plugin SERVES; a CLASS is a face it is DISPATCHED through — and the two vocabularies must stay disjoint.
schema/pipeline.cue defines #PipelineValue, which makes schemagen register KindValueDefs["pipeline"]: the host can now closedness-gate a kind: pipeline body with zero per-kind code, exactly the #TaskValue precedent — and pipeline really IS a kind (plugin-pipeline serves it). The IR gets no #WorkflowValue, deliberately, and the file says so in a NOTE: every #<X>Value def is the value gate for an authorable ENTITY KIND, so a #WorkflowValue would register workflow as a kind that nothing serves — the kinds are plugin-served (#Node is an open struct and the arm-derived KindWords is empty), while plugin-lobster serves the workflow PROVIDER CLASS. That is not a hypothetical: an earlier revision of this very branch shipped exactly that def. It is now pinned structurally, not by a comment — see the FAIL-then-PASS gate in §3(c).

The engine dispatch is InvokeProvider("workflow", <engine>, <op>). An earlier revision of this branch's comments claimed the engine was reached as command:<engine> with "no new provider class" — false against this PR's own diff, which adds the workflow class and the four prefixed op selectors. command:lobster is a SEPARATE, additional face of the same engine plugin (its CLI), never the dispatch that runs a workflow. Corrected in schema/workflow.cue, in #Pipeline.engine, and in the #PipelineClassRoutes "workflow" row.

#PipelineClassRoutes makes "which route reaches this provider class" a DATA fact. schemagen DERIVES spec.PipelineClassRoutes from the CUE table (a new strMapDef extractor beside listValues), and TestPipelineClassCoverage fails when a class has no route — so adding a provider class forces the workflow route to be decided rather than silently getting none.

The engine op selectors are PREFIXED (workflow-run/-resume/-schedule/-emit): a bare emit collides with OpEmit (deploy/step) and run with OpRun, and ops.go's stated invariant is that no two selectors share a value even across classes.

resultWire gains an optional captured_value (raw JSON) with ResultJSONCaptured / ParseResultJSONFull, so a check verb can hand a consumer a structured value to address by dotted path. It is omitted when unset, which keeps the wire byte-identical for every existing producer; a test asserts those bytes.

No schema version. charly#754 retired the CalVer stamp and the load-time gate; this change deliberately does not reintroduce either.

Files:

file
schema/pipeline.cue NEW — the authored kind: pipeline body + #PipelineValue + #PipelineClassRoutes
schema/workflow.cue NEW — the IR + engine op envelopes (and the NOTE on why there is no #WorkflowValue)
schema/candy.cue #ProviderClassNames gains workflow
internal/schemagen/main.go the strMapDef extractor + the PipelineClassRoutes wiring
ops/ops.go the four prefixed workflow selectors + resultWire.CapturedValue
spec/pipeline_test.go NEW — the closedness corpus + the class-coverage gate + the kind/class disjointness gate
ops/ops_test.go the selector pins (extended) + the captured round-trip / byte-identity
spec/cue_types_gen.go, spec/vocab_gen.go regenerated (vocab_gen.go carries the new KindValueDefs["pipeline"] row; no workflow row)

How tested

Run in /home/atrawog/Sync/Atrapub/lo/claude/opencharly/.worktrees/workflow-ir/spec on the committed head bf8772a.

1. The module's full Go gate

$ git log --oneline -1
bf8772a fix(spec): embed #PipelineFlow in #PipelineSubStep, correct #PipelineArms
$ git status --porcelain
(empty above = the committed tree)
$ gofmt -l .
(empty above = clean)
$ go build ./...
build rc=0
$ go test ./... -count=1
test rc=0
ok  	github.com/opencharly/spec/cache	0.167s
ok  	github.com/opencharly/spec/calver	0.006s
?   	github.com/opencharly/spec/capability	[no test files]
?   	github.com/opencharly/spec/checkhost	[no test files]
ok  	github.com/opencharly/spec/checkstep	0.005s
ok  	github.com/opencharly/spec/climodel	0.081s
?   	github.com/opencharly/spec/clireflect	[no test files]
ok  	github.com/opencharly/spec/container	12.326s
ok  	github.com/opencharly/spec/deploy	0.018s
ok  	github.com/opencharly/spec/exec	13.208s
ok  	github.com/opencharly/spec/exitcode	0.006s
ok  	github.com/opencharly/spec/hostenv	0.017s
?   	github.com/opencharly/spec/http	[no test files]
?   	github.com/opencharly/spec/internal/schemagen	[no test files]
ok  	github.com/opencharly/spec/internal/wiregen	0.052s
?   	github.com/opencharly/spec/loader	[no test files]
ok  	github.com/opencharly/spec/lock	0.997s
ok  	github.com/opencharly/spec/matchers	0.008s
ok  	github.com/opencharly/spec/merge	0.006s
ok  	github.com/opencharly/spec/ops	0.014s
ok  	github.com/opencharly/spec/phase	0.006s
ok  	github.com/opencharly/spec/poll	0.249s
ok  	github.com/opencharly/spec/proc	0.849s
?   	github.com/opencharly/spec/proto	[no test files]
ok  	github.com/opencharly/spec/refs	18.535s
?   	github.com/opencharly/spec/report	[no test files]
ok  	github.com/opencharly/spec/schema	11.303s
?   	github.com/opencharly/spec/schemaconcat	[no test files]
?   	github.com/opencharly/spec/shellquote	[no test files]
ok  	github.com/opencharly/spec/spec	1.449s
?   	github.com/opencharly/spec/sshx	[no test files]
?   	github.com/opencharly/spec/testkit	[no test files]
ok  	github.com/opencharly/spec/transport	0.321s

-count=1 disables the test cache, so every package above re-ran on this head; .../spec/spec — the changed package — took 1.449s, not (cached), so the corpus in §3 executed here.

gofmt -l . is clean.

1b. Lint — the CI's own pinned binary, run locally

$ golangci-lint --version
golangci-lint has version 2.13.2 built with go1.27.1-X:nodwarf5 from (unknown, modified: ?, mod sum: "h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=") on (unknown)
$ golangci-lint run ./...
0 issues.
rc=0

This is the exact version ci.yml pins ([email protected]), installed the same way the workflow installs it, so the local result and the CI result cannot disagree.

2. The generation gate — reproducible on the committed tree

$ .worktrees/workflow-ir/charly/bin/charly task cue-gen
task bootstrap-cue: 1 step(s), 0 failed
  [pass] run — download and checksum-verify the pinned cue CLI
      exit=0
task bootstrap-protoc: 1 step(s), 0 failed
  [pass] run — download and pin protoc + the two Go codegen plugins
      exit=0
task wire-gen: 1 step(s), 0 failed
  [pass] run — render the proto IDL from CUE and compile the Go stubs
      exit=0
task cue-gen: 2 step(s), 0 failed
  [pass] run — gengotypes + schemagen the generated Go
      exit=0
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree
      exit=0
rc=0
$ git status --porcelain
(empty above = the committed generated files are exactly what the generator emits)

git status --porcelain is empty after the run: the committed generated files are exactly what the generator produces, so spec/cue_types_gen.go in this PR — including the PipelineSubStep field reorder that this revision's #PipelineFlow embed causes — was not hand-edited.

3. The changed path, pinned three ways — all three run live

(a) the closedness corpus. TestPipelineValueClosedness compiles the real schemaconcat concatenation and unifies 26 concrete values into #PipelineValue — 13 accepted and 13 rejected — including the four retired aliases and the two documented non-rejects that pin the CUE/Go boundary.

$ go test ./spec/ -run TestPipelineValueClosedness -v -count=1
=== RUN   TestPipelineValueClosedness
=== RUN   TestPipelineValueClosedness/shell_step_accepted
=== RUN   TestPipelineValueClosedness/full_flow_keys_accepted
=== RUN   TestPipelineValueClosedness/terse_approval_union_accepted
=== RUN   TestPipelineValueClosedness/parallel_accepted
=== RUN   TestPipelineValueClosedness/for_each_with_companions_accepted
=== RUN   TestPipelineValueClosedness/plan_with_a_builtin_verb_accepted
=== RUN   TestPipelineValueClosedness/plan_check_intent_accepted
=== RUN   TestPipelineValueClosedness/plan_agent-run_intent_accepted
=== RUN   TestPipelineValueClosedness/argv_step_accepted
=== RUN   TestPipelineValueClosedness/argv_step_as_a_bare_string_accepted
=== RUN   TestPipelineValueClosedness/workspace_fields_+_a_schedule_trigger_accepted
=== RUN   TestPipelineValueClosedness/two_lobster_exec_arms_are_a_Go_rule,_so_CUE_must_NOT_reject_them_here
=== RUN   TestPipelineValueClosedness/unknown_step_key_rejected
=== RUN   TestPipelineValueClosedness/the_retired_`stages:`_key_rejected
=== RUN   TestPipelineValueClosedness/the_retired_`command:`_alias_rejected
=== RUN   TestPipelineValueClosedness/the_retired_`skip_when:`_alias_rejected
=== RUN   TestPipelineValueClosedness/unknown_workspace_key_rejected
=== RUN   TestPipelineValueClosedness/a_step_with_no_id_rejected
=== RUN   TestPipelineValueClosedness/a_step_with_no_exec_arm_is_a_Go_rule_too,_so_CUE_must_NOT_reject_it_here_either
=== RUN   TestPipelineValueClosedness/an_empty_steps_list_rejected
=== RUN   TestPipelineValueClosedness/an_empty_charly_argv_rejected
=== RUN   TestPipelineValueClosedness/a_bad_on_error_value_rejected
=== RUN   TestPipelineValueClosedness/a_zero_timeout_ms_rejected
=== RUN   TestPipelineValueClosedness/a_schedule_trigger_with_no_cron_rejected
=== RUN   TestPipelineValueClosedness/a_parallel_with_no_branches_rejected
=== RUN   TestPipelineValueClosedness/a_nested_for_each_in_a_substep_rejected
--- PASS: TestPipelineValueClosedness (0.07s)
PASS
ok  	github.com/opencharly/spec/spec	0.079s

The 26 subtests are 13 accepted and 13 rejected. The four retired keys are covered as: stages:, command: and skip_when: each by a case named after them, and concurrency: inside the unknown workspace key case, whose value is {description: "d", concurrency: {lanes: 2}, steps: [...]}. The two accepted cases worded "…is a Go rule, so CUE must NOT reject…" are the deliberate non-rejects that pin the CUE/Go boundary described in the Summary. a_nested_for_each_in_a_substep_rejected is the case that exercises #PipelineSubStep — the def this revision changed — and it still rejects.

(b) the class↔route table, both directions.

$ go test ./spec/ -run 'TestPipelineClassCoverage|TestKindAndClassVocabulariesAreDisjoint' -v -count=1
=== RUN   TestPipelineClassCoverage
--- PASS: TestPipelineClassCoverage (0.00s)
=== RUN   TestKindAndClassVocabulariesAreDisjoint
--- PASS: TestKindAndClassVocabulariesAreDisjoint (0.00s)
PASS
ok  	github.com/opencharly/spec/spec	0.009s

(b2) the de-duplication this revision performs is measurable, not asserted. The flow-block-unique keys each occur exactly once in schema/pipeline.cue, and the three step defs embed the shared def:

$ grep -c 'retry?:' schema/pipeline.cue
1
$ grep -n 'retry?:' schema/pipeline.cue
59:	retry?:      #PipelineRetry
$ grep -c 'on_error?:' schema/pipeline.cue
1
$ grep -n 'on_error?:' schema/pipeline.cue
58:	on_error?:   "fail" | "continue" | "skip_rest" @go(OnError)
$ grep -n -B1 '#PipelineFlow$' schema/pipeline.cue schema/workflow.cue
schema/pipeline.cue-111-	// #PipelineStepBase, so the substep's Go shape is unchanged.
schema/pipeline.cue:112:	#PipelineFlow
--
schema/pipeline.cue-129-#PipelineStepBase: {
schema/pipeline.cue:130:	#PipelineFlow
--
schema/workflow.cue-63-#WorkflowStep: {
schema/workflow.cue:64:	#PipelineFlow

Lines 58–59 are the only occurrences and they sit inside #PipelineFlow (lines 51–60). The remaining timeout_ms? hits are different concepts, not copies of the flow block: #PipelineApproval.timeout_ms (line 44, the approval gate's own timeout) and #PipelineParallel.timeout_ms (line 124, the parallel arm's). Those two are the reason this claim is worded over retry?/on_error? — the keys unique to the flow block — rather than over every key.

(c) the new gate is PROVEN ABLE TO FAIL. A gate that cannot fail proves nothing, so the exact removed row was put back into spec/vocab_gen.go and the gate re-run, then the committed file restored — the verbatim before/after:

########## the gate against the REINTRODUCED phantom row
$ go test ./spec/ -run TestKindAndClassVocabulariesAreDisjoint -count=1
--- FAIL: TestKindAndClassVocabulariesAreDisjoint (0.00s)
    pipeline_test.go:289: "workflow" is BOTH a kind (KindValueDefs) and a provider class (ProviderClasses): a kind is a word a plugin SERVES as `kind: workflow`, a class is a face it is DISPATCHED through — a word in both makes `kind: workflow` gateable against a def for a kind no plugin serves
FAIL
FAIL	github.com/opencharly/spec/spec	0.005s
########## restoring the committed file
$ go test ./spec/ -run TestKindAndClassVocabulariesAreDisjoint -count=1
ok  	github.com/opencharly/spec/spec	0.006s
$ git status --porcelain
(empty)

4. The change in the ASSEMBLED toolchain — it compiles and links into a real charly

spec is a Go module consumed by charly; the strongest available non-bed evidence is that the changed tree builds into the product, not just into its own module. charly builds workspace-mode (bootstrap-charly.sh uses GOWORK="$ROOT/go.work"), so the dev-tree override is a workspace replace — carried in a workspace file outside the repositories, so neither repo's tree is modified to produce this evidence:

$ cat /tmp/wf-ir-build2/go.work
go 1.26.4

use /…/.worktrees/workflow-ir/charly/charly

replace github.com/opencharly/spec => /tmp/wf-ir-spec-dev2
$ cd .worktrees/workflow-ir/charly/charly
$ go build -buildvcs=false -ldflags "-X main.BuildCalVer=$(bash scripts/calver.sh)" -o /tmp/wf-ir-build2/charly .
$ echo $?
0
$ stat -c '%s %n' /tmp/wf-ir-build2/charly
51930254 /tmp/wf-ir-build2/charly

(The -ldflags stamp is not decoration: charly check run refuses an unstamped binary outright — "refusing to run "check run" with an UNSTAMPED binary (version "unknown")" — because the version is baked into image tags, plugin-cache keys and bed stamp assertions. §5 is the run of the stamped binary below.)

The dev tree is pin v0.2026272.1512 + this change only, and that is not a convenience — it is forced, and the reason is reported rather than hidden. Two variants of the override fail, and both are pasted:

$ # (i) the override pointed at the branch base — spec origin/main (8cd18848b29448e7680a95af2a53b98325cdbb5c)
$ GOWORK=/tmp/wf-ir-build-main/go.work go build -buildvcs=false -o /tmp/wf-ir-build-main/charly .
$ echo $?
1
# github.com/opencharly/plugin-installstep/candy/plugin-installstep
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-installstep/candy/[email protected]/plugin.go:320:85: cannot use extraCandyRefs (variable of type []string) as []spec.ExtraCandyRef value in struct literal
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-installstep/candy/[email protected]/plugin.go:397:59: cannot use env.ExtraCandyRefs (variable of type []spec.ExtraCandyRef) as []string value in argument to getGenerator
# github.com/opencharly/sdk/loaderkit
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/loaderkit/refs_collect.go:489:20: cannot use ref (variable of struct type spec.ExtraCandyRef) as string value in argument to addRef
$ # (ii) the dev tree, but with THIS BRANCH's regenerated spec/cue_types_gen.go copied in
$ GOWORK=/tmp/wf-ir-build-ctg/go.work go build -buildvcs=false -o /tmp/wf-ir-build-ctg/charly .
$ echo $?
1
# github.com/opencharly/plugin-installstep/candy/plugin-installstep
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-installstep/candy/[email protected]/plugin.go:320:85: cannot use extraCandyRefs (variable of type []string) as []spec.ExtraCandyRef value in struct literal
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-installstep/candy/[email protected]/plugin.go:397:59: cannot use env.ExtraCandyRefs (variable of type []spec.ExtraCandyRef) as []string value in argument to getGenerator
# github.com/opencharly/plugin-fleet/candy/plugin-fleet
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-fleet/candy/[email protected]/compile.go:109:44: cannot use r.ExtraCandyRefs (variable of type []spec.ExtraCandyRef) as []string value in argument to fetchResolvedProject
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-fleet/candy/[email protected]/compile.go:231:84: cannot use extraCandyRefs (variable of type []string) as []spec.ExtraCandyRef value in struct literal
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-fleet/candy/[email protected]/dispatch.go:139:140: cannot use []string{…} (value of type []string) as []spec.ExtraCandyRef value in struct literal
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-fleet/candy/[email protected]/dispatch.go:159:20: cannot use []string{…} (value of type []string) as []spec.ExtraCandyRef value in struct literal
# github.com/opencharly/plugin-build/candy/plugin-build
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-build/candy/[email protected]/resolve_legs.go:192:26: cannot use rr.ExtraCandyRefs (variable of type []spec.ExtraCandyRef) as []string value in assignment
/home/atrawog/go/pkg/mod/github.com/opencharly/plugin-build/candy/[email protected]/resolve_project_word.go:174:33: cannot use req.ExtraCandyRefs (variable of type []spec.ExtraCandyRef) as []string value in argument to append

Neither failure is caused by this change. spec main carries 18ce5f9 feat(spec)!: ExtraCandyRef carries its SCOPE … (#188), which changed spec.ExtraCandyRef from a string to a struct, and the pinned consumers ([email protected], [email protected], [email protected], [email protected]) have not caught up. Case (i) is that lag, reached by pointing the override at spec main. Case (ii) is the SAME lag reached a second way, and it is the sharper statement: this branch was cut from main, so charly task cue-gen regenerated spec/cue_types_gen.go from a schema that already carries #188's struct, and the pinned consumers cannot compile it. charly pins spec v0.2026272.1512 — 5 commits behind, pre-#188 — so charly itself is unaffected; only a dev-tree override trips it. This is ordinary producer-first lag and belongs to spec#188's owner. This PR does not touch it and does not work around it. Every file in this change is clean against the pin except that one generated file, which is therefore left at the pin in the dev tree; charly core never references spec.Pipeline/spec.Workflow, and taking my regenerated version would have re-introduced the ExtraCandyRef struct. The change itself (schema/pipeline.cue, schema/workflow.cue, spec/vocab_gen.go, ops/ops.go, schema/candy.cue) is byte-identical to the PR head, and §2 proves the committed generated file is what the generator emits for THIS branch — the two statements are consistent, not in conflict: the dev tree needs the pin's older shape only because its consumers are old.

The binary that carries this change then loads the real project:

$ /tmp/wf-ir-build2/charly task list   # built from spec pin + this change
WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different charly version). Set CHARLY_PLUGIN_DIR to load plugins from a custom location.
plugin github.com/opencharly/plugin-example-kind/candy/plugin-example-kind: served from /home/atrawog/.cache/charly/plugins/github.com_opencharly_plugin-example-kind_candy_plugin-example-kind-a88ed84942c0e1ac (build stamp c44db74c3a0bcaea); source /home/atrawog/.cache/charly/repos/github.com/opencharly/[email protected]/candy/plugin-example-kind
plugin plugin-example-structkind: served from /home/atrawog/.cache/charly/plugins/plugin-example-structkind-8ba70fc58310fa87 (build stamp 9e499e845f220ae9); source /home/atrawog/.cache/charly/repos/[email protected]/candy/plugin-example-structkind
plugin github.com/opencharly/plugin-jetkvm/candy/plugin-jetkvm: served from /home/atrawog/.cache/charly/plugins/github.com_opencharly_plugin-jetkvm_candy_plugin-jetkvm-5c0aa8c4455e026f (build stamp f932c2ea1cf155ae); source /home/atrawog/.cache/charly/repos/github.com/opencharly/[email protected]/candy/plugin-jetkvm
check-task-smoke         the R10 smoke task — writes a marker, then checks it (proves the plan walk)
mods-tidy                Adopt the shared sdk/spec pins in every in-repo module that carries them, then tidy (keeps go.mod AND go.sum in step)
push                     Build all enabled images and push to ghcr.io/opencharly (requires gh write:packages)
exit=0

The dev/worktree build WARNING is the same allowlisted notice the bed reports; three plugins are served and three tasks listed, so the project really loads. /tmp/wf-ir-build2, /tmp/wf-ir-spec-dev2, /tmp/wf-ir-build-ctg and /tmp/wf-ir-spec-ctg were removed afterwards, and git status --porcelain in the charly worktree is empty — the temporary workspace file means nothing needed restoring.

5. R10 — the disposable bed

The bed ran against a charly binary built from the same dev tree as §4 — pin v0.2026272.1512 + this change (the stamped binary quoted in §4) — so the toolchain under test carries this PR's schema and the KindValueDefs["pipeline"] row. check-task is disposable: true, host: local, lifecycle: dev.

$ .worktrees/workflow-ir/charly/bin/charly check run check-task
charly check run check-task: [deploy-add] START (charly deploy add; log: .check/check-task/2026.275.2342/deploy-add.log)
charly check run check-task: [deploy-add] PASS after 2m47.459s [allowlisted=1] (log: .check/check-task/2026.275.2342/deploy-add.log)
charly check run check-task: [bring-up-members] START
charly check run check-task: [bring-up-members] PASS after 2ms
charly check run check-task: [check-live] START (charly check live; log: .check/check-task/2026.275.2342/check-live.log)
charly check run check-task: [check-live] PASS after 2m46.245s [allowlisted=1] (log: .check/check-task/2026.275.2342/check-live.log)
charly check run check-task: [update] START (charly update; log: .check/check-task/2026.275.2342/update.log)
charly check run check-task: [update] PASS after 2m25.895s [allowlisted=1] (log: .check/check-task/2026.275.2342/update.log)
charly check run check-task: [cleanup] START (charly remove; log: .check/check-task/2026.275.2342/cleanup.log)
charly check run check-task: [cleanup] PASS after 32.638s [allowlisted=1] (log: .check/check-task/2026.275.2342/cleanup.log)
charly check run check-task: [cleanup-members] START
charly check run check-task: [cleanup-members] PASS after 0s
charly check run check-task: PASS (steps=6)

The bed's own check-live step log, verbatim — the two checks that drive the project through the host gate:

Local deploy: check-task [host (local)]
  PASS  check command=charly task list enumerates the declared tasks (command:task reads the host project over the reverse channel)  [task-list-declared]  exit=0
  PASS  check the declared task runs through verb:task (kind:task load + the plan walk write the marker)  [task-verb-runs]  ran 1 task(s), 0 step(s) failed

2 steps: 2 passed, 0 failed, 0 skipped

The run's summary.yml, verbatim — ok: true, every step ok: true, errors: 0, warnings: 0, advisories: 0, the only findings being the 4 allowlisted dev-build notices:

bed: check-task
calver: 2026.275.2342
steps:
  - name: deploy-add
    duration_seconds: 167
    ok: true
    diagnostics:
      errors: 0
      warnings: 0
      advisories: 0
      allowlisted: 1
      findings:
        - severity: warning
          count: 1
          pattern: severity-prefix
          first_line: 1
          allowlisted: dev-worktree-binary-notice
          text: "WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different c…"
  - name: bring-up-members
    duration_seconds: 0
    ok: true
  - name: check-live
    duration_seconds: 166
    ok: true
    diagnostics:
      errors: 0
      warnings: 0
      advisories: 0
      allowlisted: 1
      findings:
        - severity: warning
          count: 1
          pattern: severity-prefix
          first_line: 1
          allowlisted: dev-worktree-binary-notice
          text: "WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different c…"
  - name: update
    duration_seconds: 146
    ok: true
    diagnostics:
      errors: 0
      warnings: 0
      advisories: 0
      allowlisted: 1
      findings:
        - severity: warning
          count: 1
          pattern: severity-prefix
          first_line: 1
          allowlisted: dev-worktree-binary-notice
          text: "WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different c…"
  - name: cleanup
    duration_seconds: 33
    ok: true
    diagnostics:
      errors: 0
      warnings: 0
      advisories: 0
      allowlisted: 1
      findings:
        - severity: warning
          count: 1
          pattern: severity-prefix
          first_line: 1
          allowlisted: dev-worktree-binary-notice
          text: "WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different c…"
  - name: cleanup-members
    duration_seconds: 0
    ok: true
total_seconds: 512
diagnostics:
  errors: 0
  warnings: 0
  advisories: 0
  allowlisted: 4
  errors_fatal: true
  warnings_fatal: false
  advisories_fatal: false
  cache_ratio: not-applicable-no-build-steps
  allowlist_used:
    - id: dev-worktree-binary-notice
      severity: warning
      suppressed: 4
      why: "A dev/worktree charly binary (the in-development build every charly check bed installs via the charly-dev candy) is not at the FHS location that owns /usr/lib/charly/plugins, so it deliberately skips the installed package's plugins (built against a different charly version, issue #328) and says so once per process. Observed live in every check-charly-vm step log when the host has a packaged charly install. Informational dev-build behavior — not an error; suppressing it would mean silently loading plugins built against a different API version."
ok: true

This is the round-2 bed, run on head bf8772a (calver 2026.275.2342) — re-run rather than carried over from the previous head, and it reproduces that head's result exactly: 2 passed, 0 failed, ok: true.

6. Honest limits of §5 — what this bed does and does not prove

check-task is host: local with disposable: true and no candy: it loads charly's own project through the host gate and walks a real task plan. That is the assembled-toolchain regression witness. It cannot prove the pipeline gate rejecting a malformed pipeline, because charly's charly.yml declares no kind: pipeline entity — and, measured, a kind: pipeline entity is rejected by the loader with node "probe-old": no kind discriminator under both the pre-change and the post-change binary, since plugin-pipeline is not compiled into charly (charly/charly.yml compiled_plugins: has no plugin-pipeline; it is the out-of-process plugin) and a dev/worktree build loads no plugins without CHARLY_PLUGIN_DIR. So a host-gate probe of the pipeline kind is impossible in charly's own project today. The bed that DOES exercise it is B1 in plugin-pipeline, which is why the plan assigns spec the assembled bed — and why that bed is a W6 artifact that runs against this tag once plugin-lobster and the cutover exist. What §5 proves is regression-freedom of the assembled toolchain under this change, which is exactly what an additive spec PR can prove today.

Rulebook compliance

  • R0 — skills first. Loaded before the first tool call: /charly-internals:git-workflow, /charly-internals:plugin, /charly-internals:go, /charly-internals:cutover-policy, /charly-internals:agents, /charly-check:check.
  • R1 — RCA every anomaly. Four, none worked around: (i) the pinned umbrella binary could not load a project — root-caused to the umbrella gitlink predating charly#749; (ii) the validator's block 2 — root-caused PAST the two false comments to the structural modelling error they hid, a def that registered a kind no plugin serves, and fixed by removing the def and pinning the split with a gate proven able to fail (§3c); (iii) the dev-tree build failure — root-caused to spec#188's breaking ExtraCandyRef change outrunning its pinned consumers, and then reached a SECOND way (this branch's own regenerated cue_types_gen.go), reported and left alone rather than patched around; (iv) charly check run refusing an unstamped binary — root-caused to building with a bare go build instead of bootstrap-charly.sh's -ldflags "-X main.BuildCalVer=$(scripts/calver.sh)" stamp, and fixed by stamping, not by the documented CHARLY_SKIP_FRESHNESS_CHECK=1 bypass.
  • R2 — prove it. The closure lives only in CUE, so a decode round-trip would pass with the closedness reverted; the corpus unifies concrete values against the shipped schema. The class table is asserted in both directions. The new kind/class gate is shown failing on the exact bug it exists for.
  • R3 — no duplication. #PipelineFlow and #PipelineArms are each declared once and embedded by every step def — the flow block by all three (#PipelineStepBase, #WorkflowStep, #PipelineSubStep); the route table is CUE data with a derived Go table; #TaskParamSpec, #StrVal, #Step and #Duration are reused, not restated. §3(b2) measures it rather than claiming it.
  • R4 — no workaround. The Go-side XOR is the documented, precedented shape (box.cue base/from), not an escape hatch; the wire extension reuses resultWire; the spec#188 drift is reported, not patched; the freshness gate is satisfied by stamping the binary, not by CHARLY_SKIP_FRESHNESS_CHECK.
  • R5 — cutover. The retired aliases (stages:, command:, skip_when:, concurrency:) are rejected at the schema, proven by the corpus. They will only ever be accepted by the one-shot migrator.
  • R6 — git safety. No force-push, no hook bypass, no direct push to main; the branch is feat/workflow-ir.
  • R7 — prove the gate. Every gate above was run on the committed tree and is pasted verbatim; -count=1 was used so no line is a stale cache hit.
  • R10 — disposable proof. See §5/§6: what ran, and what it cannot reach.
  • Live or skip. No live-service boundary is crossed by the changed path; nothing is mocked. The cue/protoc downloads are the repo's own pinned, checksum-verified toolchain steps.

Change classification

  • Change class: schema / contract module — additive (new defs, one new provider class, four new op selectors, one optional wire field), plus one internal de-duplication in a def that is not yet consumed by anything. No existing key changes meaning and no existing wire byte moves.
  • New obligation this change creates for a consumer, stated because it is invisible in the diff: the KindValueDefs["pipeline"] row is inert until a consumer rebuilds charly's host gate with this spec, i.e. until charly is repinned. From that point the host gates kind: pipeline against #PipelineValue, so an old-syntax pipeline (stages:) fails to load until the plugin-pipeline cutover and plugin-migrate have landed. The landing order already places the cutover before the charly repin; that ordering is now load-bearing, not cosmetic.
  • Verification gate: the module's full Go gate (-count=1) plus charly task cue-gen reproducibility on the committed tree; the changed path executed live by the corpus and by the two derived-vocabulary gates; the change linked into a real charly binary which then loads the full project and ran the disposable R10 bed.
  • Attribution tier: fully tested and validated — the module gate, the generation gate and the three derived/schema gates all pass on the committed tree, the changed path (the CUE value gate) executed live against the real concatenation, and the assembled toolchain carrying this change ran the disposable R10 bed to a clean PASS with 0 errors and 0 warnings.

Relates to opencharly/charly#758.

Agent: workflow-ir · session session_01MSxu48GQwoQuBkfwQrkntk
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

… and the workflow engine op envelopes

The workflow surface becomes CUE-first and single-source, in three additive pieces:

  schema/pipeline.cue  the AUTHORED `kind: pipeline` body, in lobster syntax and
                       extended with charly's OWN step grammar, so a workflow can
                       use any charly plugin of any provider class through the
                       normal core->plugin dispatch (no word is special-cased).
  schema/workflow.cue  the normalized, engine-agnostic IR every consumer lowers
                       from, plus the engine op envelopes. Lobster is one consumer;
                       a GitHub Actions consumer fits the same IR unchanged.
  schema/candy.cue     #ProviderClassNames gains "workflow" (additive; the derived
                       capability regex recomputes, so nothing is hand-edited).

Closure is the point of the authoring def: `cue exp gengotypes` renders every field
as a plain Go string, so a decode-only test cannot tell a closed body from an open
one. spec/pipeline_test.go therefore unifies CONCRETE values into #PipelineValue
against the same schemaconcat concatenation the runtime gate uses, and fails if a
retired key (stages:, command:, skip_when:, concurrency:) is re-accepted or an
unknown key is tolerated.

The exec-arm XOR (exactly one of run/pipeline/workflow/parallel/for_each/input/
plan/charly) is deliberately a GO rule in plugin-pipeline's OpValidate, not a CUE
disjunction: a nested entity-level disjunction breaks the closedness of the
surrounding def and collapses the generated Go type -- the same shape, and the same
reason, as the box.cue base/from precedent. The corpus asserts that boundary
explicitly (both zero arms and two arms are ACCEPTED by CUE) so the CUE/Go split is
pinned rather than assumed.

#PipelineClassRoutes makes "which route reaches this provider class" a DATA fact:
schemagen DERIVES spec.PipelineClassRoutes from the CUE table (a new strMapDef
extractor beside listValues), and TestPipelineClassCoverage fails when a class has
no route -- so adding a provider class forces the workflow route to be decided
rather than silently getting none.

The engine op selectors are PREFIXED (workflow-run/-resume/-schedule/-emit): a bare
"emit" collides with OpEmit (deploy/step) and "run" with OpRun, and ops.go's stated
invariant is that no two selectors share a value even across classes.

resultWire gains an optional captured_value (raw JSON) with ResultJSONCaptured and
ParseResultJSONFull, so a check verb can hand a consumer a structured value to
address by dotted path. It is omitted when unset, which keeps the wire
byte-identical for every existing producer; the test asserts those bytes.

No schema version: #754 retired the CalVer stamp and the load-time gate, and this
change deliberately does not reintroduce either.

Relates to opencharly/charly#758.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
@aitrawog

aitrawog commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

OWNING

Scope: opencharly/spec#189 — the kind:pipeline lobster-syntax value, the #Workflow IR, and the workflow engine op envelopes (head 9d4cc44, branch feat/workflow-ir).

Owner: slug workflow-ir — this session, driving the PR surface itself (it creates, pushes, validates and reads every verdict; subagents for this effort only research and write code).

State: the change is committed and pushed; the two gates above ran green on the final tree and are pasted in the body. No R10 bed has run for this head — the beds that gate it compose plugin-lobster and the plugin-pipeline cutover, which do not exist yet; the ledger carries that obligation into the W6 wave. The tier in the body says analysed on a live system for exactly that reason.

This is a producer on the blocking chain. The consumers that wait on this tag — sdk (workflowkit.Lower), plugin-pipeline (the cutover), plugin-lobster (the engine), plugin-task, plugin-migrate, charly, eval-omarchy — cannot pin until this merges and tags; the chain and the unblock order are tracked on opencharly/charly#758.

Next action: wait for the charly/pr-validator verdict on this head, read it in full, and fix every finding in ONE commit before any further push. A BLOCKS from another session on this scope gets the PR-comment channel, not a workaround.

Agent: workflow-ir · session session_01MSxu48GQwoQuBkfwQrkntk
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

…spatch claim

Addresses the pr-validator's BLOCK on spec#189 (blocks 2 and 3; block 1 is the R10 bed,
which is not resolvable in this commit).

B2 (`schema/workflow.cue`) — REMOVED `#WorkflowValue`. Every `#<X>Value` def in schema/
is the host-side value gate for an AUTHORABLE ENTITY KIND, and schemagen DERIVES
spec.KindValueDefs from their names. Nothing serves `kind: workflow`: the kinds are
plugin-served (#Node is an open struct and the arm-derived KindWords is empty), and
plugin-lobster serves the `workflow` PROVIDER CLASS, not a kind. The def I added by
analogy with `#PipelineValue` therefore registered a kind no plugin serves, letting the
host gate a `kind: workflow` node against a def for a kind that does not exist. The IR is
the ENGINE WIRE, not a kind: it is produced by lowering and consumed by an engine, never
authored in a charly.yml. `kind: pipeline` is genuinely a kind (plugin-pipeline serves
it), which is why `#PipelineValue` stays and `#WorkflowValue` does not.

The validator could only flag this as "tool-limited ... I cannot confirm `workflow` is a
valid kind word" — a comment cannot settle it, so it is now pinned structurally:
`TestKindAndClassVocabulariesAreDisjoint` (spec/spec/pipeline_test.go) requires
KindValueDefs and ProviderClasses to stay disjoint, because a word in both is exactly
this bug. A kind is a word a plugin SERVES; a class is a face it is DISPATCHED through.
Verified the gate can fail: re-adding the `"workflow": "#WorkflowValue"` row makes it
report `"workflow" is BOTH a kind (KindValueDefs) and a provider class (ProviderClasses)`,
and restoring the file makes it pass again.

B2 (comments) — the header of `schema/workflow.cue` and the `#Pipeline.engine` comment in
`schema/pipeline.cue` both claimed the engine is "dispatched as `command:<engine>` ...
there is no new provider class". Both were false against this PR's own diff, which adds
the `workflow` class to `#ProviderClassNames` and documents the engine as
`InvokeProvider("workflow", <engine>, <op>)` in ops/ops.go. Both now state the shipped
dispatch, and name `command:lobster` as a SEPARATE, additional face of the same engine
plugin (its CLI) rather than the dispatch that runs a workflow. The
`#PipelineClassRoutes` `"workflow"` row is reconciled to say the same: the class IS the
engine plugin, reachable from inside a workflow by a `workflow:` sub-workflow step.

B3 — the body's test counts were stale ("19 concrete values, 15 accepted and 13
rejected", which is also arithmetically impossible). Recounted against the committed
file: 26 cases, 13 accepted and 13 rejected. The body carries the corrected numbers.

No change to the generated Go beyond removing the one KindValueDefs row; `spec.Workflow`
and every other generated type are unchanged. cue-gen remains reproducible.

Relates to opencharly/charly#758.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 9d4cc44596e4e9896b55bb4ee3fa3cdb3dc4dd67 (branch: feat/workflow-ir)

Change class: schema / contract module — CUE + Go (code/config, not docs-only).

Blocks

  1. R10 / A2 — the required disposable-bed gate did not run, and no disposable: true target is named. The body's own "Not run" section states: "No R10 disposable: true bed has been run for this head" and "R10 — disposable proof. Not satisfied for this head". The change is code/config (new wire field captured_value, four new op selectors, a new provider class that recomputes the capability regex), so R10 applies. go build/go test + cue-gen reproducibility is exactly the "bare go test" the rulebook says is not a substitute, and the How-tested block names no disposable target. The "the consumers don't exist yet" argument is the rule-3 bootstrap case, but rule 3 requires an explicit operator/bootstrap sign-off for the unobservable portion — the only comment on this PR (@aitrawog, OWNING) is coordination/status and explicitly defers to this verdict; it is not a sign-off. Fix: run and paste the R10 bed, or obtain an explicit maintainer bootstrap sign-off naming the W6 batch and scope.

  2. R1 / B5 — the PR's own new files contradict each other on the provider class and the engine dispatch. schema/workflow.cue (header) says the engine is "dispatched as command:<engine> … there is no new provider class", and schema/pipeline.cue (#Pipeline.engine) repeats "dispatched as command:<engine>". But this same PR adds the class (schema/candy.cue:559, #ProviderClassNames gains "workflow") and ops/ops.go documents the engine as "A workflow ENGINE plugin — workflow:lobster today … reached through InvokeProvider("workflow", , …)". Both the "no new provider class" claim and the command:<engine> selector are false against the shipped diff. This is a documentation/comment divergence from reality (an R1 incident). Fix: make the workflow.cue/pipeline.cue comments match the shipped workflow:<engine> dispatch (and reconcile the #PipelineClassRoutes "workflow" row, which describes only the sub-workflow: arm, with ops.go's "the workflow class IS the engine plugin").

  3. A1 — the body's test description contradicts the diff. The body says "unifies 19 concrete values into #PipelineValue, 15 accepted and 13 rejected" (internally inconsistent: 15+13 ≠ 19). The diff's spec/pipeline_test.go has 26 cases — 13 accept (reject: false, incl. the two documented non-rejects) and 13 reject (reject: true). Correct the counts in the body.

Comments considered

  • @aitrawog OWNING (5962959677) — coordination metadata, not a finding and not a sign-off. Its factual claim ("No R10 bed has run for this head") re-derives as true from the body and folds into block 1.

Tool-limited notes (not independently verifiable from the diff, flagging for the author)

  • spec/vocab_gen.go registers KindValueDefs["workflow"] = "#WorkflowValue"; #Node's discriminator list (KindWords) is unchanged in the diff, so I cannot confirm workflow is a valid kind word — verify kind: workflow actually parses, or drop the KindValueDefs row.
  • The Assisted-by: footer model string (Claude Code deepseek-v4.1-flash:cloud) has no authoring-runtime evidence in the body to cross-check against (A3).

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

aitrawog commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

OWNING

spec#189 head is now af74f32 — one commit, carrying the fix for every finding in the validator's BLOCK, plus the answer to the R10 block. workflow-ir still owns this PR and is driving it; the previous head was 9d4cc44.

Block 2 (R1/B5) — fixed, and root-caused past the comment level. The verdict flagged two comments that contradicted this PR's own diff. Both were true, and they were the symptom: the header of schema/workflow.cue and #Pipeline.engine claimed the engine is reached as command:<engine> with "no new provider class", while the diff adds the workflow class and the four prefixed op selectors. Both now state the shipped dispatch, InvokeProvider("workflow", <engine>, <op>), and name command:lobster as a separate face of the same plugin (its CLI), never the dispatch that runs a workflow.

The cause was structural and the verdict could only see it as "tool-limited": #WorkflowValue registered workflow in spec.KindValueDefs — a KIND gate for a word no plugin serves (workflow is a provider CLASS; the kinds are plugin-served, and plugin-lobster serves the class). The def is removed, and the split is now pinned by a gate rather than a comment: TestKindAndClassVocabulariesAreDisjoint requires KindValueDefs and ProviderClasses to stay disjoint. It is proven able to fail — re-adding the exact row makes it report "workflow" is BOTH a kind (KindValueDefs) and a provider class (ProviderClasses), and restoring the file makes it pass again. Both outputs are in the body.

Block 3 (A1) — fixed. The body's counts were stale and arithmetically impossible ("19 concrete values, 15 accepted and 13 rejected"). Recounted against the committed file: 26 cases, 13 accepted and 13 rejected. The body carries the corrected numbers.

Block 1 (R10) — a bed ran, and passed. You asked for the required disposable-bed gate; running the plan's assembled B1 is impossible before W6, so the bed that can run was run: charly check run check-task on a charly binary built from spec pin v0.2026272.1512 + this change — PASS (steps=6), every step ok: true, total_seconds: 508, 0 errors, 0 warnings (summary.yml at .check/check-task/2026.275.2321/, pasted verbatim in the body). The two checks it asserts both passed, including command=charly task list, which loads charly's own project through the host gate the change touches.

Two things this PR does not hide, both in the body:

  • The dev tree is pin + this change only, because pointing the override at spec main fails to build — spec main's 18ce5f9 feat(spec)!: ExtraCandyRef … (#188) changed spec.ExtraCandyRef from a string to a struct and the pinned [email protected] / [email protected] have not caught up. That is spec#188's owner's producer-first lag; this PR does not touch it or work around it.
  • check-task cannot exercise the new pipeline gate rejecting a malformed pipeline, because plugin-pipeline is not compiled into charly (it is the out-of-process plugin), so a kind: pipeline entity is rejected as no kind discriminator under both the pre- and post-change binary. Measured, not assumed. That end-to-end proof is B1's, in plugin-pipeline, at W6 — which is why the plan assigns spec the assembled bed.

Agent: workflow-ir · session session_01MSxu48GQwoQuBkfwQrkntk
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

…Arms

Both blocking findings from the pr-validator verdict on af74f32, plus one
consistency fix, in ONE commit.

R3 — #PipelineSubStep re-declared the eight #PipelineFlow keys (`id`, `when`,
`env`, `cwd`, `stdin`, `timeout_ms`, `on_error`, `retry`) verbatim instead of
embedding the shared def, whose own comment states it is "Embedded by each step
def". It now embeds #PipelineFlow, so the flow block is declared exactly once
and embedded by all three step defs (#PipelineStepBase, #WorkflowStep,
#PipelineSubStep). Verified: `retry?:` and `on_error?:` — the flow-block-unique
keys — now each occur exactly once in schema/pipeline.cue. The remaining
`timeout_ms?` occurrences are different concepts (`#PipelineApproval`'s approval
timeout and `#PipelineParallel`'s parallel timeout), not copies of the flow
block. gengotypes flattens the embed exactly as it already does for
#PipelineStepBase, so the substep's Go fields are unchanged; only their ORDER in
the generated struct moves.

R1 — the #PipelineArms comment asserted "only the exec-arm XOR (Go) and the flow
keys distinguish the two [authored step vs IR step]". That is false against this
PR's own schema: both #PipelineStepBase and #WorkflowStep embed #PipelineFlow AND
#PipelineArms, so everything declared there is COMMON to them, and the XOR is a
Go rule in both. The comment now names the two fields that actually differ:
`approval` (the authored terse union `bool | string | #PipelineApproval` vs the
IR's normalized #WorkflowApproval object) and `result`, which is IR-only.

Consistency — the #WorkflowStepResult comment described a charly step's body as
"--json-output". The canonical name is "--output": it prints the final step's raw
stdout, which is not necessarily JSON (lobster auto-parses it into `$id.json` when
it is), and the session's W1/W3 contract uses `--output` in four places. The
schema comment and the ledger now agree.

Regenerated with `charly task cue-gen`; TestGenReproducible passes on the
committed tree, so the committed generated Go is exactly what the generator emits.
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: af74f32255a1abfa99564fd77832a38688f1f81e (branch: feat/workflow-ir)

Change class: schema / contract module — CUE + Go (code/config, not docs-only).

Security screen: PASS — additive schema/selectors, no secrets, no egress, no guardrail loosening, no dependency/pin/CI edits, no injected directives in the body or comments.

Blocks

  1. R3 — #PipelineSubStep duplicates #PipelineFlow instead of embedding it. In schema/pipeline.cue, #PipelineSubStep re-declares the eight flow fields verbatim (id!, when?, env?, cwd?, stdin?, timeout_ms?, on_error?, retry?) rather than embedding the shared #PipelineFlow — whose own comment states it is "Embedded by each step def". The exec arms cannot be shared (the substep is deliberately non-recursive), but the flow block can and should be; this is a copy-pasted block that should have been shared. Fix: #PipelineSubStep: { #PipelineFlow; run?: …; pipeline?: …; plan?: …; charly?: … }.

  2. R1 — the #PipelineArms comment contradicts the shipped schema. schema/pipeline.cue #PipelineArms says "only the exec-arm XOR (Go) and the flow keys distinguish the two [authored step vs IR step]", but both #PipelineStepBase and #WorkflowStep embed the SAME #PipelineFlow, so the flow keys are common to both and distinguish nothing. What actually distinguishes them is approval (authored union vs IR object) and result (IR-only). Correct the comment so it does not assert a difference that does not exist.

Comments considered

  • @aitrawog 5962959677 (OWNING, head 9d4cc44): coordination metadata. Its "No R10 bed has run for this head" claim is stale-superseded — the current head carries a bed run (§5).
  • @github-actions[bot] 5962977355 (BLOCK, head 9d4cc44): stale-superseded on the current head — (2) workflow.cue/#Pipeline.engine now state InvokeProvider("workflow", <engine>, <op>) and name command:lobster as a separate face; (3) the body's counts now read 26 / 13 / 13, matching spec/pipeline_test.go; (1) a disposable bed now runs. Its tool-limited note on KindValueDefs["workflow"] is moot (the row is gone).
  • @aitrawog 5963153522 (OWNING, head af74f32): coordination metadata, not a sign-off; its factual claims re-derive as true (phantom kind removed, counts fixed, bed ran).

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: bf8772a2beaf95e88934b6aa18d14028d4d526e6 (branch: feat/workflow-ir)
Change class: schema / contract module — CUE + Go (code/config, not docs-only).

Security screen: PASS
Checklist: All applicable rules PASS or NA.

Comments considered:

  • 5962959677 (@aitrawog) — coordination metadata; its "no R10 bed for this head" claim is stale-superseded (a disposable: true bed ran, §5).
  • 5962977355 (@github-actions[bot], head 9d4cc44) — stale-superseded: the workflow.cue header / #Pipeline.engine now state the shipped InvokeProvider("workflow", <engine>, <op>) dispatch; the body's counts now read 26 / 13 / 13; a disposable bed ran; the KindValueDefs["workflow"] row is removed. Its tool-limited A3 footer-model note is unverified-dismissed (no contradicting authoring-runtime evidence in the body).
  • 5963153522 (@aitrawog) — coordination metadata, not a sign-off; its factual claims (phantom kind removed, counts fixed, bed ran) re-derive true.
  • 5963184082 (@github-actions[bot], head af74f32) — stale-superseded: #PipelineSubStep now embeds #PipelineFlow (pipeline.cue:112) and the #PipelineArms comment now names approval/result as the only fields distinguishing the authored step from the IR step.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 3, 2026 00:00
@github-actions
github-actions Bot merged commit 11607a8 into main Oct 3, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant