Skip to content

feat(schema): admit the pooled fan-out arm (lanes:) on #PipelineArms - #264

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/pipeline-lanes-arm
Oct 21, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/pipeline-lanes-arm

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

#PipelineArms is a CLOSED struct, so a kind: pipeline step could not carry the lanes: arm that
opencharly/plugin-lobster#8 serves — a pooled fan-out over a runtime collection, with batch_size as
the pool width. The width was already authorable; the arm key was not, and the refusal is the CUE gate,
before any engine is reached (opencharly/spec#263). The two cue vet runs under How tested are
that exact refusal and its removal, on one fixture and one command.

What this change is:

  • schema/pipeline.cue — #PipelineArms gains lanes?: string & !="" @go(Lanes) beside for_each,
    sharing the companion defs that already exist (item_var, index_var, batch_size, pause_ms,
    steps); the companion group's comment names both arms. #PipelineSubStep deliberately does NOT
    gain it: a lane body is non-recursive by the same rule a for_each body is, and a case below pins
    that.
  • spec/cue_types_gen.go — regenerated by charly task cue-gen. The Go is generated from the CUE,
    never hand-written, and a second run on the committed tree changes nothing.
  • spec/pipeline_test.go — the closedness corpus gains the accept case (a lanes: step with its
    companions), a reject case for lanes inside a non-recursive substep, and a reject case for an
    empty operand. The accept case fails on the base schema with the exact error the field produced.
  • The schema header named plugin-pipeline's OpValidate as the home of the exec-arm XOR. That rule
    lives in sdk/workflowkit.ValidatePipeline (plugin-pipeline calls it before lowering); the header
    now says so, corrected while the arm list it enumerates was being changed. No behaviour depends on
    the sentence.

Diff: 3 files, 33 insertions, 7 deletions, one commit, head 78fc451.

Scope: this admits the AUTHORED surface only. sdk/workflowkit.ValidatePipeline is a SECOND gate over
the same words — its execArms list and its loop co-field rules know for_each and not lanes, so a
lowered step is still refused there. That is a different module, measured under How tested and filed
as opencharly/sdk#439; it is not in this diff.

How tested

The change class's gate for this repo is build + go test + gofmt -l empty + golangci-lint v2
(spec carries no candy and no check bed). All four, on the committed tree:

$ go build ./... ; echo rc=$?
rc=0
$ go test ./... 2>/dev/null | tail -6 ; echo rc=${PIPESTATUS[0]}
ok  	github.com/opencharly/spec/schemaretag	(cached)
?   	github.com/opencharly/spec/shellquote	[no test files]
ok  	github.com/opencharly/spec/spec	3.310s
?   	github.com/opencharly/spec/sshx	[no test files]
?   	github.com/opencharly/spec/testkit	[no test files]
ok  	github.com/opencharly/spec/transport	0.267s
rc=0
$ gofmt -l . ; echo rc=$?
rc=0
$ ~/go/bin/golangci-lint run ./... ; echo rc=$?
0 issues.
rc=0

The regeneration is a no-op. charly task cue-gen on the COMMITTED tree — it regenerates
spec/cue_types_gen.go and spec/vocab_gen.go and re-runs the repo's own TestGenReproducible step.
The last line is git status --porcelain | wc -l after the run:

$ git status --short ; charly task cue-gen > /tmp/cuegen.log 2>&1 ; echo rc=$? ; tail -4 /tmp/cuegen.log ; git status --porcelain | wc -l
rc=0
  [pass] run — gengotypes + schemagen the generated Go
      exit=0
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree
      exit=0
0

Zero changed paths after a full regeneration: the committed spec/cue_types_gen.go IS what the
generator produces from the committed schema/pipeline.cue.

Negative control — one fixture, base schema vs this branch. The fixture is one pipeline body whose
only fan-out key is lanes:. Both schema files are compiled from package spec + every schema/*.cue
with the same concatenation schemaconcat gives the runtime: /tmp/base-schema.cue from a detached
origin/main worktree, /tmp/lanes-schema.cue from this branch. /tmp/fixture-spec.cue is identical
in both runs.

$ cue vet /tmp/base-schema.cue /tmp/fixture-spec.cue 2>&1 | head -4 ; echo rc=${PIPESTATUS[0]}
_fixture.steps.0.lanes: field not allowed:
    ../fixture-spec.cue:7:3
rc=1
$ cue vet /tmp/lanes-schema.cue /tmp/fixture-spec.cue 2>&1 | head -4 ; echo rc=${PIPESTATUS[0]}
rc=0

The repo's own host gate — #PipelineValue, the def the loader closedness-gates an authored
kind: pipeline with — gives the same verdict. The branch's test file, run against the base worktree:

$ cd /tmp/wt-spec-base263 && cp /tmp/wt-spec-lanes/spec/pipeline_test.go spec/pipeline_test.go && GOWORK=off go test ./spec/ -run "TestPipelineValueClosedness/(lanes|an_empty_lanes|a_nested_lanes)" -v > /tmp/tb.log 2>&1 ; echo rc=$? ; head -16 /tmp/tb.log
rc=1
=== RUN   TestPipelineValueClosedness
=== RUN   TestPipelineValueClosedness/lanes_with_the_pooled_fan-out_companions_accepted
    pipeline_test.go:257: REJECTED a valid value: #PipelineValue.steps.0.lanes: field not allowed
        {description: "d", steps: [{
        				id: "s1", lanes: "$prev.json.items",
        				item_var: "it", index_var: "i", batch_size: 2,
        				steps: [{id: "inner", run: "echo $it"}],
        			}]}
=== RUN   TestPipelineValueClosedness/a_nested_lanes_in_a_substep_rejected
=== RUN   TestPipelineValueClosedness/an_empty_lanes_operand_rejected
--- FAIL: TestPipelineValueClosedness (0.11s)
    --- FAIL: TestPipelineValueClosedness/lanes_with_the_pooled_fan-out_companions_accepted (0.00s)
    --- PASS: TestPipelineValueClosedness/a_nested_lanes_in_a_substep_rejected (0.00s)
    --- PASS: TestPipelineValueClosedness/an_empty_lanes_operand_rejected (0.00s)
FAIL
FAIL	github.com/opencharly/spec/spec	0.128s

and the same three cases on this branch:

$ GOWORK=off go test ./spec/ -run "TestPipelineValueClosedness/(lanes|an_empty_lanes|a_nested_lanes)" -v > /tmp/tl.log 2>&1 ; echo rc=$? ; head -12 /tmp/tl.log
rc=0
=== RUN   TestPipelineValueClosedness
=== RUN   TestPipelineValueClosedness/lanes_with_the_pooled_fan-out_companions_accepted
=== RUN   TestPipelineValueClosedness/a_nested_lanes_in_a_substep_rejected
=== RUN   TestPipelineValueClosedness/an_empty_lanes_operand_rejected
--- PASS: TestPipelineValueClosedness (0.10s)
    --- PASS: TestPipelineValueClosedness/lanes_with_the_pooled_fan-out_companions_accepted (0.00s)
    --- PASS: TestPipelineValueClosedness/a_nested_lanes_in_a_substep_rejected (0.00s)
    --- PASS: TestPipelineValueClosedness/an_empty_lanes_operand_rejected (0.00s)
PASS
ok  	github.com/opencharly/spec/spec	(cached)

The second gate, measured and not fixed here. A throwaway module with spec replaced by this
branch and sdk v0.2026294.615, decoding one lanes: step and running the validator
plugin-pipeline calls before lowering:

$ GOWORK=off go run . ; echo rc=$?
decoded steps=1 lanes="$seed.items" batch_size=2
ValidatePipeline: step "lane": no execution arm — set exactly one of run/pipeline/workflow/parallel/for_each/input/plan/charly/approval
step "lane": steps/item_var/batch_size only apply alongside for_each
exit status 1
rc=1

execArms and the loop co-field rules live in opencharly/sdk (workflowkit/validate.go), filed as
opencharly/sdk#439. Until that module carries the word, this branch makes the arm authorable and
makes the host's closedness gate accept it — which is what spec#263 asks for — and cannot by itself
make a lowered lanes step run.

Diff.

$ git diff --numstat origin/main...HEAD
4	3	schema/pipeline.cue
6	2	spec/cue_types_gen.go
23	2	spec/pipeline_test.go

Rulebook compliance

R0: /charly-internals:go (SDD and the schema → generated-code pipeline) and
/charly-internals:git-workflow were loaded before the first tool action; spec/AGENTS.md was read
first for the repo-specific rules (edit schema/*.cue, regenerate, never hand-write the generated Go).

R1: no anomaly was left unfixed. One finding surfaced — the second gate in sdk/workflowkit — and
it is non-blocking for THIS change (the change's claim, that the authored surface accepts the arm, is
proven above), genuinely separable (another module, another repo, its own tag line), and filed as
opencharly/sdk#439 with the measurement. Every gate above has zero warnings.

R2: one definition, one place. The arm is admitted in #PipelineArms only; no per-plugin copy of
the authored grammar, and #PipelineSubStep keeps its non-recursive subset rather than restating the
full arm list.

R3: no workaround. No shim, no alias, no fallback branch and no magic value: the key the engine's
arm already carries is declared once, and the closedness gate then accepts it.

R4: the product is fixed, not the prose. The one prose correction in the diff (the header naming
where the exec-arm XOR lives) describes code that lives in sdk/workflowkit.ValidatePipeline, and the
sentence was adjusted while the arm list it enumerates was being changed.

R5: nothing is renamed or retired here, so there is no legacy path to delete and no claim-keyed
grep to paste.

R6: git status was checked before the worktree was created (both $ git status --short pastes above
are empty); the work landed in a throwaway worktree branched off fresh origin/main, as ONE commit,
with no force-push, no push to main, no hook bypass, and no other session's worktree touched.

R7: behaviour is proven, not compiled. The new accept case FAILS on the base schema with the exact
user-visible error and PASSES here (both pasted); the two reject cases pin the non-recursive and
non-empty rules; the emitted artifact (spec/cue_types_gen.go) is validated at its real boundary —
the repo's own regeneration, twice, the second time a no-op.

R8: no live service is involved in this change; nothing was mocked and nothing was skipped.

R9: this repo ships no binary and no charly source changed; charly task cue-gen ran the repo's
pinned, checksum-verified toolchain (bootstrap-cue provisions ./bin/cue) rather than a host install.

R10: the change-class gate ran on the committed tree that will be pushed — build, go test ./...,
gofmt -l empty, golangci-lint v2.13.2 0 issues — with zero warnings. This repo has no check-*
bed (no candy, no box, no substrate), so R10's assembled-bed leg has no target here; the changed path
itself (the CUE closedness gate over an authored kind: pipeline) was executed live in both directions.

Change classification

config — a CUE schema def (schema/pipeline.cue), the Go generated from it
(spec/cue_types_gen.go), and the closedness corpus (spec/pipeline_test.go). No runtime Go, no
behavioural Go, no pin, no gitlink. Gate: build + go test + gofmt -l + golangci-lint v2, plus the
regeneration-reproducibility step this repo ships.

Tier: fully tested and validated — the change-class gate passed on the final tree, and the changed
path executed live in both directions (accept on this tree, reject on the base).

Filed issues

  • opencharly/sdk#439 — workflowkit.ValidatePipeline knows for_each but not lanes, so a lowered
    pooled fan-out step is refused with no execution arm and a stray-companion error. Non-blocking for
    this diff (separate module, separate gate); blocking for opencharly/plugin-lobster#8.

Closes opencharly/spec#263.

Agent: charly

Runtime identity (A3)

The tier above is the harness/model that produced this work, per opencharly/opencharly#538, pasted
from this session's own record rather than asserted:

$ zstd -dc ~/.dsh/sessions/*/$DSH_SESSION_ID/session.v4.jsonl.zstd | sed -n 2p
{"type":"subagent/descriptor","seq":0,"time":1792574321287,"data":{"version":3,"mode":"continuable","provider":"spawn","label":"Unblock leg 3 via spec 263 and pipeline 45","agentProvider":"ollama-cloud","agentModel":"deepseek-v4.1-flash"}}

Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)

`#PipelineArms` is CLOSED, so a `kind: pipeline` step could not carry the
`lanes:` arm that opencharly/plugin-lobster#8 serves (a pooled fan-out over a
runtime collection). The width was already authorable (`batch_size`), the arm
key was not: `charly box validate` rejected it with
`pipeline: steps.1.lanes: field not allowed`, which is the CUE gate, not the
engine.

`lanes?: string & !=""` now sits beside `for_each`, sharing the companions that
already exist (`item_var`, `index_var`, `batch_size`, `steps`), and the
companion group's comment names both arms. `#PipelineSubStep` deliberately does
NOT gain it: a lane body is non-recursive by the same rule a `for_each` body is.

`spec/cue_types_gen.go` is regenerated by `charly task cue-gen` (CUE first, the
Go is generated, never hand-written); a second run is a no-op. The schema
header now names `sdk/workflowkit.ValidatePipeline` as the home of the exec-arm
XOR — `plugin-pipeline`'s `OpValidate` no longer holds that rule (it was stale
prose, corrected while the list it describes was being changed).

The closedness corpus gains the accept case for a `lanes:` step with its
companions, plus two reject cases (a `lanes` inside a substep, an empty
operand). The accept case fails on the base schema with the exact error above.

Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 78fc45194daf2ee38872ae15aac3008a0a41841a (branch: fix/pipeline-lanes-arm)

Security screen: PASS (schema/generated-Go/test-only diff; no secrets, no weakened guardrails, no supply-chain edits, no embedded directives).

Checklist: All applicable rules PASS or NA.

  • Change class: config (CUE schema + generated Go + closedness corpus) — gate match correct (build + go test + gofmt -l + golangci-lint, all pasted, rc=0, zero warnings). No bed in this repo (no candy/box/substrate) — consistent.
  • A1/A3: Summary accounts for all 3 files + header prose correction; How tested names gate, fresh regen, changed path executed live both directions, with pasted output; tier fully tested and validated justified (accept case fails on base, passes here; regeneration no-op git status --porcelain | wc -l = 0); Assisted-by line is last and matches the pasted agentProvider/agentModel.
  • SDD: schema/pipeline.cue and spec/cue_types_gen.go change in the same commit; no @go(-), no hand-written wire types; one CUE def edit propagating to PipelineArms+PipelineStepBase (flattened) is consistent with the no-op regeneration, and #PipelineSubStep correctly excluded (pinned by the nested-lanes reject case).
  • R1/CONC: the only surfaced finding (second gate in sdk/workflowkit.ValidatePipeline) is genuinely separable (separate module/repo), does not falsify this change's authored-surface claim, and is FILED as opencharly/sdk#439 — legitimate fix-or-file, not a parking phrase.
  • R2–R10, PIL (RDD/ADE/SDD), ARCH (spec = wire-shape/CUE-first, correct placement), DISP (N/A), QUAL (clean, aligned, gofmt-clean), COORD (no contended/blocks claim requiring a BLOCKS comment): PASS/NA.

No comment thread to disposition (0 comments). No stale prior claims to inherit.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 21, 2026 09:28
@github-actions
github-actions Bot merged commit 625e361 into main Oct 21, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 21, 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.

2 participants