Skip to content

fix(check): carry a verb's CapturedValue through every dispatch path + pin plugin-command/task (workflow-IR W7) - #786

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

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

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

The charly leg (W7) of the CUE-first workflow-IR wave, tracked in #758. Two things land together, because the second is only provable through the first: the fix that makes a check verb's captured value survive dispatch, and the pin bump to the two producers this wave already merged.

1. The fix — a verb's CapturedValue reached the ledger as "" on every dispatch path

A host-coupled check verb returns spec.CheckVerbResult — Status, Message, and the optional CapturedValue the verb stashed while making its judgement. charly's own spec.CheckResult carries those three plus Op, the resolved verb word, and the timing. Four separate dispatch paths each hand-built that literal with Op/Verb/Status/Message only, so a producer's capture — the entire reason the field exists, and the only thing charly task --output prints — was dropped on every one of them:

path site
kitVerbAdapter.RunVerb charly/check_kit_adapter.go:84
hostVerbResolver.RunVerb, in-proc branch charly/planrun_adapter.go:156
hostVerbResolver.runPluginVerb, generic plugin: fall-through charly/provider_checkenv.go:147
executorReverseServer.InvokeProvider charly/plugin_dispatch_reverse.go:236

There is now one conversion, checkResultFromVerb (new file charly/checkverb_result.go), and all four call it (R3 — one declaration per behaviour; R2 — the same-mechanism siblings are fixed in the same cutover, not one at a time).

The conversion states no capture policy of its own: it copies whatever the verb stashed, and leaving it empty for a verdict that captured nothing stays the producer's decision (a FAIL/SKIP arm leaves it empty on purpose — a failed step's output was never vouched for). The omitempty tag on spec.CheckResult keeps a captureless result byte-identical to the pre-extension wire. The caller passes verb rather than the function deriving it, because the word belongs to the dispatch path, not the verdict: an in-proc verb walks under its Reserved() word, while the generic plugin: fall-through reports "plugin".

This is what made the wave's own bed step red. task-output-captured — the check-task step that reads a task's stdout back through charly task --output — could never pass while the value was being discarded here.

2. The pin bump

Both producers this wave merged are now pinned, at their merged-and-tagged refs:

plugin-command  v0.2026272.26    -> v0.2026277.738   (PR #7 merged 07:38:13Z, tag v2026.277.0738)
plugin-task     v0.2026276.1007  -> v0.2026277.711   (PR #9 merged 07:11:01Z, tag v2026.277.0711)

The candy requires are the sole pin lever: the repo's go.work contains exactly one directive — use ./charly — and no members beyond it (the candy de-submodule cutover, Phase 4, which deleted the use ./candy/... shape), so every compiled-in plugin resolves as a proxy module from its require pin in charly/go.mod. go mod tidy additionally records six // indirect requires — expected, because the new plugin-task is the first candy to import sdk/workflowkit: emicklei/dot, expr-lang/expr, robfig/cron/v3, tidwall/gjson, tidwall/match, tidwall/pretty. charly/go.sum moves 16 insertions / 4 deletions; charly/go.mod moves 8 / 2 (the two pins + the six indirects).

3. The bed this wave is proved on, and the branch's other four commits

charly.yml gains the B5 steps that witness the producer's wave surface, and the fixtures they need are hoisted into the project beside check-task-smoke. The bed now covers:

step id proves
task-output-captured a task's final stdout comes back through charly task --output — the step this PR's fix exists for
task-output-json-exclusive --output --json is the JSON envelope, and --output alone is the raw stdout
task-params-resolved a DEFAULTED param resolves through the task env
task-params-required-named a REQUIRED param that is missing is named in the error
task-helpers-cycle-named a depends_on cycle is detected and the cycle is named
task-stdin-visible both piped-stdin forms (TASK_STDIN, TASK_STDIN_FILE) carry the payload
commit what
276655cf charly.yml — the six B5 bed steps in the table above
851607be charly.yml — hoist two B5 fixtures into the project. They had been written inline in their own step's command: through a heredoc, and kit.ExpandOpVars claims every ${UPPERCASE} token it finds — including one inside that heredoc — so both steps reported unresolved variables: … and SKIPped exactly where they meant to prove something. As real project entities beside check-task-smoke (the same precedent) the invocations carry no ${…} token and cannot skip.
0c62bc1c the fix (§1)
4a91b3f1 drop the dead //nolint:unparam on validateAuthoredPluginInput

The //nolint drop is the same treatment applied to a claim that had gone false (R5, R4a). It claimed "the verb runtime seam (runPluginVerb) is the only caller today", so unparam could fire — but the function now has two distinct non-test class callers, ClassVerb (provider_checkenv.go:121) and ClassKind (provider_kind_invoke.go:90), so the directive is dead; kind:pipeline's cutover added the second. Verified with golangci-lint under charly/.golangci.yml: removing it (and the trailing empty doc-comment line it leaves, which otherwise trips gofmt) surfaces no new finding.

The branch also carries one merge of origin/main, and it is deliberate: the org ruleset sets strict_required_status_checks_policy: true, so the PR head must be level with main at merge. Opening at a head four commits behind would have forced a later gh pr update-branch, changing the head and invalidating the R10 proof bound to it. main's only charly/ change there is charly#785's sdk require re-pin (go.mod 1 line / go.sum 2) — disjoint from this branch's pins, and git merge-tree dry-ran clean. The union changes the module graph, so every number below is re-run on the merged head 7c209012, not on the pre-merge one.

How tested

The R10 bed — check-task, green end to end, in-tree with no -replace

Run from the charly worktree at the final committed head, with the worktree-local CalVer binary built by scripts/bootstrap-charly.sh:

$ ./bin/charly check run check-task
charly check run check-task: [deploy-add] START (charly deploy add; log: .check/check-task/2026.277.0848/deploy-add.log)
charly check run check-task: [deploy-add] PASS after 2m44.166s [allowlisted=1] (log: .check/check-task/2026.277.0848/deploy-add.log)
charly check run check-task: [bring-up-members] START
charly check run check-task: [bring-up-members] PASS after 1ms
charly check run check-task: [check-live] START (charly check live; log: .check/check-task/2026.277.0848/check-live.log)
charly check run check-task: [check-live] PASS after 4m13.872s [allowlisted=1] (log: .check/check-task/2026.277.0848/check-live.log)
charly check run check-task: [update] START (charly update; log: .check/check-task/2026.277.0848/update.log)
charly check run check-task: [update] PASS after 2m22.242s [allowlisted=1] (log: .check/check-task/2026.277.0848/update.log)
charly check run check-task: [cleanup] START (charly remove; log: .check/check-task/2026.277.0848/cleanup.log)
charly check run check-task: [cleanup] PASS after 33.078s [allowlisted=1] (log: .check/check-task/2026.277.0848/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)

summary.yml at .check/check-task/2026.277.0848/summary.yml — the whole file is green:

bed: check-task
calver: 2026.277.0848
total_seconds: 593
diagnostics:
  errors: 0
  warnings: 0
  advisories: 0
  allowlisted: 4
ok: true

allowlisted: 4 is the dev-worktree-binary-notice — the dev-build warning charly emits once per process when it is not at the FHS path that owns /usr/lib/charly/plugins (issue #328). It is informational and allowlisted in this bed, and warnings: 0 counts it as suppressed, not as a pass.

The eight assertion steps inside check-live, verbatim

.check/check-task/2026.277.0848/check-live.log:

  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
  PASS  check command=charly task --output prints the FINAL step's captured stdout RAW on stdout, the human report diverted to stderr (the hand-off a workflow `$id.stdout` ref reads)  [task-output-captured]  exit=0
  PASS  check --output and --json are rejected TOGETHER with the NAMED error (never a silent precedence, never a half-formatted stdout)  [task-output-json-exclusive]  exit=1
  PASS  check a task's params — the defaulted one AND the supplied one — resolve through the task env (the same self-check FAILS on a wrong value and SKIPS on an unresolved name, so a pass is never vacuous)  [task-params-resolved]  exit=0
  PASS  check a MISSING required param is still the NAMED error the moved workflowkit helper produces (never a silent empty value the step runs with)  [task-params-required-named]  exit=1
  PASS  check a depends_on CYCLE is still the NAMED error naming the WHOLE chain (the moved workflowkit closure helper) — never a hang, never a silent truncation to a shorter order  [task-helpers-cycle-named]  exit=1
  PASS  check piped stdin reaches a task's steps as TASK_STDIN and as the TASK_STDIN_FILE path — both ALWAYS defined in non-TTY mode, both carrying the piped bytes  [task-stdin-visible]  exit=0

8 steps: 8 passed, 0 failed, 0 skipped

task-output-captured is the step this PR's fix exists for; before it, the value it asserts on was being discarded in charly's own dispatch seam, so the step could not pass at any plugin version.

Three of the steps assert a non-zero exit (exit=1) and pass — that is the point of them: --output --json together, a missing required param, and a depends_on cycle must each be the named error, so the matcher is on the error text, not on a zero exit. A silent failure would not pass them.

The dispatch-regression bed — check-plugin-requires-local, green

check-task's plugins are all compiled in, so it does not reach the out-of-process arms of the dispatch seam this PR edits. check-plugin-requires-local does: its fixture candy declares two peers in its manifest — one compiled in (verb:externalprobe) and one served out-of-process (verb:exampledispatchpeer, candy/plugin-example-dispatch) — and peer-invokes both over the host broker, which is the reverse channel (charly/plugin_dispatch_reverse.go, the fourth converted site):

$ ./bin/charly check run check-plugin-requires-local
charly check run check-plugin-requires-local: [deploy-add] START (charly deploy add; log: .check/check-plugin-requires-local/2026.277.0902/deploy-add.log)
charly check run check-plugin-requires-local: [deploy-add] PASS after 2m40.034s [allowlisted=1] (log: .check/check-plugin-requires-local/2026.277.0902/deploy-add.log)
charly check run check-plugin-requires-local: [bring-up-members] START
charly check run check-plugin-requires-local: [bring-up-members] PASS after 1ms
charly check run check-plugin-requires-local: [check-live] START (charly check live; log: .check/check-plugin-requires-local/2026.277.0902/check-live.log)
charly check run check-plugin-requires-local: [check-live] PASS after 2m4.836s [allowlisted=1] (log: .check/check-plugin-requires-local/2026.277.0902/check-live.log)
charly check run check-plugin-requires-local: [update] START (charly update; log: .check/check-plugin-requires-local/2026.277.0902/update.log)
charly check run check-plugin-requires-local: [update] PASS after 2m19.393s [allowlisted=1] (log: .check/check-plugin-requires-local/2026.277.0902/update.log)
charly check run check-plugin-requires-local: [cleanup] START (charly remove; log: .check/check-plugin-requires-local/2026.277.0902/cleanup.log)
charly check run check-plugin-requires-local: [cleanup] PASS after 34.694s [allowlisted=1] (log: .check/check-plugin-requires-local/2026.277.0902/cleanup.log)
charly check run check-plugin-requires-local: [cleanup-members] START
charly check run check-plugin-requires-local: [cleanup-members] PASS after 0s
charly check run check-plugin-requires-local: PASS (steps=6)

summary.yml at .check/check-plugin-requires-local/2026.277.0902/summary.yml:

bed: check-plugin-requires-local
calver: 2026.277.0902
total_seconds: 459
diagnostics:
  errors: 0
  warnings: 0
  advisories: 0
  allowlisted: 4
ok: true

Its single assertion step, and the retained evidence that the out-of-process peer really connected — note it is connected although no plan references its word, so only the load-time declaration could have done it:

  PASS  check the examplerequire verb dispatches and PEER-INVOKES both declared peers (verb:externalprobe, compiled in; verb:exampledispatchpeer, connected on demand from the authored declaration) over the host broker — the bed's own load resolved the declaration first (a non-optional miss would have failed it loud), and the run log's plugin-example-dispatch served line shows the gate connected the out-of-process peer although NO plan references its word  [examplerequire-dispatches]

1 step: 1 passed, 0 failed, 0 skipped
plugin github.com/opencharly/plugin-example-dispatch/candy/plugin-example-dispatch: served from /home/atrawog/.cache/charly/plugins/github.com_opencharly_plugin-example-dispatch_candy_plugin-example-dispatch-3375e2850f9fce19 (build stamp 2c6ba3c2e9435b9c); source /home/atrawog/.cache/charly/repos/github.com/opencharly/[email protected]/candy/plugin-example-dispatch

Why these two and not a wider roster

check-commands-local is the obvious-looking third, and it is not a match: it composes plugin-{clean,settings,candy,box,authoring,status,substrate}, none of which is a bumped pin or a converted dispatch site, so it cannot fail on this change. Running it would be ceremony, and the matrix is explicit that a gate which cannot fail on the change proves nothing. The two beds above are the ones whose kind matches a touched code path — one for the in-proc arms and both pins, one for the out-of-process arm.

Core Go gate

$ pwd   # the charly module root
/home/atrawog/Sync/Atrapub/lo/claude/opencharly/.worktrees/workflow-ir/charly/charly
$ git rev-parse --short HEAD
7c209012
$ git status --porcelain
(clean)

$ go vet ./...
vet rc=0

$ go test ./...
ok  	github.com/opencharly/charly/charly	144.896s
ok  	github.com/opencharly/charly/charly/internal/pluginsgen	64.933s
test rc=0

The R5 claim-keyed grep self-test

The fix is a de-duplication, so the sweep that matters is: does any hand-built CheckResult literal survive that would still drop a verb verdict's capture?

$ grep -rn 'spec\.CheckResult{' charly/ --include='*.go' | grep -v '_test.go'
charly/checkrun.go:46:	return spec.CheckResult{Op: c, Status: spec.StatusPass, Message: msg}
charly/checkrun.go:50:	return spec.CheckResult{Op: c, Status: spec.StatusFail, Message: fmt.Sprintf(format, args...)}
charly/checkrun.go:54:	return spec.CheckResult{Op: c, Status: spec.StatusSkip, Message: msg}
charly/checkrun_act.go:81:		return spec.CheckResult{}, false
charly/planrun_adapter.go:138:		return spec.CheckResult{}, false
charly/planrun_adapter.go:142:		return spec.CheckResult{}, false
charly/checkverb_result.go:32:	return spec.CheckResult{
charly/provider_checkenv.go:72:	res := spec.CheckResult{Verb: "plugin"}
charly/provider_checkenv.go:164:	res := spec.CheckResult{}

The surviving literals fall into three groups, and none of them can drop a verb verdict's capture:

  • checkrun.go:46, :50, :54 — the passf/failf/skipf message-only helpers. They build a result from a format string with no CheckVerbResult behind them at all, so there is nothing to lose.
  • checkrun_act.go:81, planrun_adapter.go:138, :142, provider_checkenv.go:164 — zero-values, used as a not-found sentinel or as the starting point for a result the caller then fills in.
  • provider_checkenv.go:72 — the synthetic pre-dispatch result, built as spec.CheckResult{Verb: "plugin"} and completed by three StatusFail returns (an unresolved word, a plugin_input marshal error, and an authored-input validation failure), all of them before any verb runs. No verb verdict exists on that path, so there is no capture to drop.

provider_checkenv.go:164 deserves its own note, because it is a real dispatch path and it does not go through the new function: invokeVerbProvider fills res from the ops.OpRun wire result, and that wire form (pluginCheckResult) is deliberately status + message only — the protocol carries no captured value at all. CapturedValue is a contract of the CheckVerbResult seam (the in-proc kit verbs and the reverse-channel broker), and every path that reaches that seam now goes through checkResultFromVerb.

R7 — the new test fails without the change

$ git rev-parse --short HEAD
7c209012

# 1. Against the pre-fix literal: ONLY line 84 reverted to the old hand-built
#    literal; `git status` was clean otherwise before the run.
$ git diff -- charly/check_kit_adapter.go
diff --git a/charly/check_kit_adapter.go b/charly/check_kit_adapter.go
index 5ed3d964..0915dd0b 100644
--- a/charly/check_kit_adapter.go
+++ b/charly/check_kit_adapter.go
@@ -81,7 +81,7 @@ func (a kitVerbAdapter) Reserved() string { return a.kv.Reserved() }

 func (a kitVerbAdapter) RunVerb(ctx context.Context, h *hostVerbResolver, op *spec.Op) spec.CheckResult {
 	res := a.kv.RunVerb(ctx, hostCheckContext{h: h}, op)
-	return checkResultFromVerb(op, a.kv.Reserved(), res)
+	return spec.CheckResult{Op: op, Verb: a.kv.Reserved(), Status: res.Status, Message: res.Message}
 }

 // kitVerbActAdapter is the kitVerbAdapter variant for a host-coupled verb candy whose

$ go test -count=1 -run TestKitVerbAdapterCarriesCapturedValue -v .
=== RUN   TestKitVerbAdapterCarriesCapturedValue
    check_kit_adapter_test.go:38: captured_value = "", want the verdict's capture carried through
--- FAIL: TestKitVerbAdapterCarriesCapturedValue (0.00s)
FAIL
FAIL	github.com/opencharly/charly/charly	2.417s
FAIL
TEST RC=1

# 2. The fix restored (the committed content): the worktree is byte-identical
#    to the committed tree again, and the same test now passes.
$ git status --porcelain
(empty)

$ go test -count=1 -run 'TestKitVerbAdapter|TestCheckResultFromVerb' -v .
=== RUN   TestKitVerbAdapterCarriesCapturedValue
--- PASS: TestKitVerbAdapterCarriesCapturedValue (0.00s)
=== RUN   TestCheckResultFromVerbKeepsACapturelessVerdictEmpty
--- PASS: TestCheckResultFromVerbKeepsACapturelessVerdictEmpty (0.00s)
PASS
ok  	github.com/opencharly/charly/charly	2.291s
TEST RC=0

R9 — binary equals source

$ git rev-parse --short HEAD
7c209012
$ git status --porcelain
(clean)

$ ./scripts/bootstrap-charly.sh
bootstrap-charly: regenerating compiled-in plugin wiring
bootstrap-charly: building bin/charly
bootstrap-charly: built ./bin/charly (2026.277.0842)
bootstrap rc=0

$ ./bin/charly version
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.
2026.277.0842

$ git status --porcelain   # after the pluginsgen run
(clean = pluginsgen byte-identical)

Rulebook compliance

  • R0 — skills first. The dispatcher selects /charly-internals:git-workflow for any git/PR action and /charly-check:check for any bed run, and both were loaded in this session before the actions they govern: this session's worktree (<umbrella>/.worktrees/workflow-ir/charly) and its feat/workflow-ir branch are the git-workflow model's product, and the check skill was read by path (marketplace/check/skills/check/SKILL.md plus its references/beds-and-r10.md) — this harness cannot resolve the namespaced form, which is R0's own escape hatch. /charly-internals:plugin covers the dispatch-seam fix.
  • R1 — RCA every anomaly. The anomaly was the task-output-captured step: captured_value was "" in the ledger although the producer had stashed a value. The RCA is the four hand-built literals above; the root fix is the single conversion, not a patch to the one path the bed happened to exercise. The stale //nolint dropped in 4a91b3f1 is the same treatment applied to a claim that had gone false.
  • R2 — finish the whole cutover. All four same-mechanism siblings are fixed in one phase; none is deferred to a follow-up.
  • R3 — no duplication. Four copies of one conversion collapse into checkResultFromVerb in the same commit that introduces the fifth caller.
  • R4 — no workarounds. No sleep, no retry, no suppression, no serialization hiding a race. The dropped field is carried, not worked around.
  • R4a — fix the product, not the prose. The //nolint removal deletes a false claim rather than restating it.
  • R5 — delete legacy completely. The four hand-built literals are deleted, not left alongside the new function; the claim-keyed grep self-test above is the evidence that no surviving path re-introduces the behaviour. CHANGELOG entries naming the old pin are history and are untouched.
  • R6 — git safety. Everything landed on feat/workflow-ir; no force-push, no hook bypass, no direct push to main. main is untouched.
  • R7 — prove behaviour, not compilation. TestKitVerbAdapterCarriesCapturedValue fails against the old literal (captured_value = "", pasted below) and passes after; TestCheckResultFromVerbKeepsACapturelessVerdictEmpty pins the other half — that the conversion invents no capture policy and a captureless verdict stays byte-identical. The changed path also runs live in both beds above.
  • R7a — live or skip. Both beds are real charly check run invocations against real disposable deploys; nothing about them is stubbed or mocked, and no live-service boundary is faked anywhere in this change. Every step asserted, none skipped: 8 steps: 8 passed, 0 failed, 0 skipped.
  • R8 — preserve emitted artifacts. The generated wiring (charly/plugins_generated.go, charly/plugins_refs_generated.go) is unchanged: scripts/bootstrap-charly.sh runs pluginsgen before the build, and after the pin bump it emits byte-identical output — neither producer added a provider word. git status --porcelain after that rebuild is empty.
  • R9 — binary equals source. See above; the binary is the worktree-local CalVer-stamped one, never installed as a shared binary.
  • R10 — fresh disposable proof. Both beds above are complete fresh rebuilds from the final committed tree (7c20901), each run on an explicit disposable: true target, in-tree with no -replace override. summary.yml is at .check/check-task/2026.277.0848/summary.yml; no tracked file was written while either bed ran, so both certified exactly 7c209012.

Change classification

  • Change class: runtime — charly's check-dispatch seam changes behaviour (a captured value now survives), plus a no-op pin bump. Not documentation-only.
  • Verification gate: the two R10 beds above (check-task — the in-proc arms and both bumped pins; check-plugin-requires-local — the out-of-process arm), each disposable: true on host: local and each run from the final committed tree, plus the core Go gate (go test ./..., go vet ./...) and bin/charly version.
  • Attribution tier: fully tested and validated

Agent: workflow-ir · session 7e17b5cf-c349-4032-8da5-2e4e03612780
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

aitrawog and others added 6 commits October 4, 2026 04:13
…inInput

The suppression claims 'the verb runtime seam (runPluginVerb) is the only caller
today', so unparam could fire. That is no longer true: validateAuthoredPluginInput
now has two distinct non-test class callers — ClassVerb (provider_checkenv.go:121)
and ClassKind (provider_kind_invoke.go:90) — so unparam cannot fire on it. Verified
with golangci-lint v2.13.2 under charly/.golangci.yml: removing the line (and the
trailing empty doc-comment line it leaves, which otherwise trips gofmt) surfaces no
new finding.

The stale justification was invalidated by this wave's plugin-pipeline cutover: the
kind seam now validates a kind:pipeline body against #PipelineValue through this same
function, so the comment's 'only caller today' premise is false.
Six steps appended to `check-task` — the only R10 witness of the compiled-in
`charly task` surface (candy/plugin-task). They are the executable form of the
behaviour plugin-task's wave changes, so the wave's plugin-task leg has a bed to
run the moment `charly#762` lets a charly carry the new plugin in.

Each assertion is anchored to the artifact that produces it, verified verbatim
against the source on plugin-task's `feat/workflow-ir-w3` head:

- `task-output-captured` / `task-output-json-exclusive` — `--output` (the hand-off
  a workflow `$id.stdout` ref reads): the FINAL step's CapturedValue raw on
  stdout with the human report diverted to stderr (cli.go:44-48, printCapturedValue
  cli.go:227-239, printResultText cli.go:201-219), and the named refusal of the
  `--output`+`--json` pair (cli.go:167).
- `task-params-resolved` / `task-params-required-named` — the param helpers MOVED
  to sdk/workflowkit: a declared default and a supplied `--param` both resolve into
  the task env the plan's `${NAME}` references expand against (the mechanism the
  existing `check-task-smoke` fixture already documents), and a missing required
  param is still `required parameter "WHO" not supplied (--param WHO=VALUE)`
  (workflowkit/args.go:30, wrapped by cli.go:64). The positive half is not vacuous:
  the fixture's own check would FAIL on a wrong value and on a name that never
  resolved.
- `task-helpers-cycle-named` — the moved closure helper: a `depends_on` cycle is the
  named `task dependency cycle: cycle-a -> cycle-b -> cycle-a`
  (workflowkit/closure.go:28, join " -> " over the visit stack), never a hang and
  never a truncated order.
- `task-stdin-visible` — both stdin forms the runner defines in non-TTY mode carry
  the piped bytes: `TASK_STDIN` and `TASK_STDIN_FILE` (runner.go:240-296, contract
  asserted in runner_test.go).

Every fixture is a `kind:task` entity in a `mktemp -d` project, parsed and checked
here: all four embedded fixtures load, every step key is `check` (the plan grammar),
and `params`/`depends_on`/`vars` are the `#Task` keys spec/schema/task.cue declares
(`#TaskParamSpec.description` is optional, so the fixtures' `description`-less
params gate cleanly).

Authored and statically verified; NOT yet RUN. The bed composes the plugin candy,
so it needs a charly that compiles the new plugin in, which the pin incoherence
`charly#762` blocks. The run rides the charly leg's pin-bump PR.
…he D2 SKIPs)

Two of the B5 bed steps wrote their fixture INSIDE their own step `command:`
text, through a heredoc. Neither ever ran: the check walk runs
kit.ExpandOpVars over the op's OWN string fields, and TestVarRefPattern
(`${NAME}` / `${NAME:arg}`) claims every ${UPPERCASE} token it finds — including
one inside a heredoc. An unresolved name is a legitimate SKIP, so both steps
SKIPPED with

  task-params-resolved  unresolved variables: GREETING, WHO
  task-stdin-visible    unresolved variables: TASK_STDIN, TASK_STDIN_FILE

i.e. a bed reporting SKIP exactly where it meant to prove something. A skipped
step is not a passing step and must never be read as one.

task-params-fixture and task-stdin-fixture now live in this project's charly.yml
beside check-task-smoke — the same precedent, and the same reason: they must be
real project entities. The three steps are plain invocations, so no check op's
text carries a ${UPPERCASE} token any more and neither step can SKIP.

task-helpers-cycle-named was NOT affected (its fixture text carries no ${...}
token) and is unchanged.

Verified on this tree:

  $ ./bin/charly box validate
  charly box validate: OK — checked 609 candies, 125 boxes, 45 deploys, 7 distros, 7 builders; 0 warnings, 0 errors

Each fixture invoked directly, the way its step will run it:

  $ ./bin/charly task task-params-fixture --param WHO=world </dev/null
  task task-params-fixture: 1 step(s), 0 failed
    [pass] check — the defaulted param and the supplied param both reached the step

  $ ./bin/charly task task-params-fixture </dev/null
  charly: error: command "task": task "task-params-fixture": required parameter "WHO" not supplied (--param WHO=VALUE)

  $ printf '%s' 'PIPE-PAYLOAD' | ./bin/charly task task-stdin-fixture
  task task-stdin-fixture: 1 step(s), 0 failed
    [pass] check — both stdin forms carry the payload

Exit codes 0 / 1 / 0 respectively, and the middle one carries the exact
stderr text its step asserts.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
…(D1)

`charly task --output` printed nothing because the captured stdout a verb
stashed in its verdict never reached the ledger. The producer (plugin-command's
PASS arm) set `spec.CheckVerbResult.CapturedValue` correctly; charly then built
its own `spec.CheckResult` from that verdict by hand, in four separate places,
copying only Op/Verb/Status/Message — so the value was dropped on every one of
them. The `check-task` bed's `task-output-captured` step measured the result:
`stdout: expected to contain "TASK-SMOKE-OK" (got: )`.

Four in-proc sites, one mechanism, now one function:

  - check_kit_adapter.go        kitVerbAdapter.RunVerb (a compiled-in kit verb)
  - planrun_adapter.go          hostVerbResolver.RunVerb (an in-proc CheckVerbProvider)
  - plugin_dispatch_reverse.go  the inprocProvider arm of the reverse dispatch
  - provider_checkenv.go        the plugin: fall-through's inprocProvider arm

`checkResultFromVerb` is the single conversion (R3 — the four literals were the
same declaration four times, which is exactly how the field came to be dropped
in all of them and noticed in none). It states no capture policy of its own:
whether a verdict captures is the PRODUCER's decision, so whatever the verb
stashed rides through and a captureless verdict stays byte-identical to before,
pinned by a test.

Both new tests fail against the old literal:
TestKitVerbAdapterCarriesCapturedValue reports `captured_value = ""` — the
bed's symptom, in a unit test.

NOT fixed here, and reported rather than half-fixed: the OUT-OF-PROCESS leg
loses the value one layer earlier, in the producer — sdk's ServeCheckVerb
returns `ResultJSON(status, message)`, which has no captured_value field at all,
and charly's `pluginCheckResult` wire struct has none either, so its decoder
could not carry one if it were sent. Fixing only the decoder would be a change
with no producer and no witness; the pairing is filed separately.
…277.0711 (W7)

Both wave producers are merged and tagged; this is the charly leg's pin bump.

  plugin-command  v0.2026272.26    -> v0.2026277.738
  plugin-task     v0.2026276.1007  -> v0.2026277.711

The candy requires are the sole pin lever: charly/go.work has no members
beyond ./charly (the candy de-submodule cutover, Phase 4), so every
compiled-in plugin resolves as a PROXY module from charly/go.mod.

go mod tidy additionally records six indirect requires, because the new
plugin-task is the first candy to import sdk/workflowkit: emicklei/dot,
expr-lang/expr, robfig/cron/v3, tidwall/gjson, tidwall/match,
tidwall/pretty. charly/go.sum moves 16 insertions, 4 deletions.

The generated wiring is unchanged and verified so: scripts/bootstrap-charly.sh
runs pluginsgen (charly/plugins_generated.go, charly/plugins_refs_generated.go)
before the build, and after the pin bump it emits byte-identical output --
neither producer added a provider word. Only go.mod and go.sum move.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
…rkflow-ir

Brings the branch level with main so the PR opens NOT behind, under the org
ruleset's strict_required_status_checks_policy — a BEHIND head would have to be
recovered with `gh pr update-branch` and would invalidate the R10 proof bound to
the pre-merge head.

The only main change touching charly/ is main's sdk require re-pin (#785; go.mod
1 line, go.sum 2). It is disjoint from this branch's own pin bump (plugin-command
+ plugin-task), so the merge is clean and `git merge-tree` reports no conflict.

The union changes the module graph, so the full gate — bootstrap, the core Go
gate, and both R10 beds — is re-run on this merged head before the push; the PR
body records that head, not the pre-merge one.

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

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 7c209012b9341ad570656d107950e16c24e307ad (branch: feat/workflow-ir)

Security screen: PASS (no scope mismatch, secrets, weakened guardrails, or supply-chain anomaly; the four dispatch sites are converted, nothing hidden; //nolint drop is a lint directive, not a security gate).

Checklist: All applicable rules PASS or NA.

  • A1–A3: body accounts for all 10 files, supplies pasted evidence (two bed summary.ymls + logs, go vet/go test, charly version), ends with the correct AI-form *Assisted-by: …* line; fully tested and validated is justified — task-output-captured executes the changed conversion live.
  • B4–B13: R1 RCA (four hand-built literals), R2 same-cutover siblings, R3 single checkResultFromVerb, R5 grep self-test with pasted output, R7 counterfactual test (captured_value = "" → PASS), R8 wiring byte-identical, R9 binary==source, R10 fresh disposable beds.
  • B16 placement: CORRECT — the change is a pure de-duplication of an existing core dispatch seam (no capability moved into core, no alias growth, no new sdk-kit import).
  • B17/B18: disposable target asserted on the pre-existing beds; no gofmt/lint-visible defect in the diff.
  • Cross-checks: go.mod 8/2 and go.sum 16/4 arithmetic, bed step counts (8 passed, allowlisted: 4), grep line numbers, and checkverb_result.go:32 all reconcile with the diffs. B15: five non-merge commits + one deliberate main merge — no partial/split work, squash-collapsible.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 4, 2026 09:29
@github-actions
github-actions Bot merged commit d1156f4 into main Oct 4, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 4, 2026
aitrawog pushed a commit that referenced this pull request Oct 4, 2026
Conflicts were confined to charly/go.mod and charly/go.sum, and they are
a pin union, not a disagreement: each side advanced a DIFFERENT module,
so neither supersedes the other.

  plugin-command v0.2026277.738   — from #786 on main
  plugin-distro  v0.2026276.1457  — this branch (the #765 fix pin)

Every other line of both files is #786's own and is taken as-is.
go.sum carries both pairs (the superseded plugin-command v0.2026272.26
and plugin-distro v0.2026272.29 lines are kept; Go errors on a MISSING
go.sum line, never an extra one). charly.yml auto-merged: #786's own
additions and this branch's nested-member re-indentation both survive.

This absorbs #786's check-dispatch change (checkverb_result.go,
check_kit_adapter.go, planrun_adapter.go, plugin_dispatch_reverse.go,
plugin_loader.go, provider_checkenv.go), so the six-bed evidence must be
re-earned on THIS head — it is no longer evidence for this tree.
aitrawog pushed a commit that referenced this pull request Oct 4, 2026
`go mod tidy` on this branch's tree deletes exactly four lines and nothing
else:

  plugin-command/candy/plugin-command v0.2026272.26 (h1: + /go.mod)
    superseded by v0.2026277.738, which main's #786 pinned and tidied;
    this branch's merge of origin/main unioned the old pair back in.

  plugin-distro/candy/plugin-distro v0.2026272.29 (h1: + /go.mod)
    the version this PR's own plugin-distro bump (to v0.2026276.1457)
    replaced — the bump added the new pair without removing the old one.

Neither version resolves: neither appears in go.mod or go.work, and tidy's
module graph reports no use of either.

Verified: `go mod tidy -diff` prints exactly these four deletions and no
other change; applying `go mod tidy` yields exactly this diff (4 deletions,
1 file).
github-actions Bot pushed a commit that referenced this pull request Oct 5, 2026
…eploy-del twin and the #771 teardown delta (#762)

* fix(beds): nest intended in-guest members inside the vm kind body (#748)

Members authored as a sibling of the vm: kind key are deploy-level
(alongside) per sdk/loaderkit BuildResourceMemberChildren, so
BringUpMembers deployed them on the host running charly instead of
inside the disposable guest. Move each member whose stated intent is
"inside the guest" into the kind body (in-substrate). Indentation only.

Refs #748

Assisted-by: Claude Code Anthropic Claude Opus 5.5 (syntax check only)

* fix(charly): gate the node's own kind value via EntityBodyJSON (#748)

The closed #<Kind>Value gate (validateKindValueCUE) read the RAW authored body —
the one body consumer that does not strip the parser-classified member children.
Its siblings (discValue / EntityBodyJSON) both delete the pn.Children names, so
the member path and this gate disagreed about the same node: an in-body member
key survived into the value the closed CUE schema was unified against, and the
rejection was the symptom reported as #748.

Read the stripped body here too. R3 single-codepath form: the gate now consumes
exactly what its siblings consume, with no new mechanism.

* fix(deps)!: adopt the typed ExtraCandyRef across charly core (spec#188 consumer)

spec#188 made an ExtraCandyRef carry its SCOPE, so every ExtraCandyRefs field is
[]spec.ExtraCandyRef{Ref, Scope}, not []string. The sdk main charly now pins
consumed it (sdk#325), so charly's OWN core has to follow — the pin bump alone
does NOT build (measured: 5 build errors in github.com/opencharly/charly/charly,
plus 3 test-only sites that only the test compile reaches, since `go build` does
not compile test files).

The PIN and the ADOPTION are one commit, because neither half stands alone:

- github.com/opencharly/sdk  v0.2026272.1813 -> v0.2026276.48  (the leg-1 tag)
- github.com/opencharly/spec v0.2026272.1512 -> v0.2026273.203 (forced by that
  sdk's own go.mod:16, which requires the spec release carrying the type change)
- the three compiled-in plugin candies, which charly resolves as module pins from
  the proxy, so the same type change lands in them too. Measured: with ONLY the
  sdk+spec pins moved, the build fails in 7 sites across all three —
    [email protected]  plugin.go:320, :397
    [email protected]       resolve_project_word.go:174
    [email protected]       compile.go:109, :231; dispatch.go:139, :159
  so they move in the SAME commit:
    plugin-build/candy/plugin-build             v0.2026272.2040 -> v0.2026276.438
    plugin-fleet/candy/plugin-fleet             v0.2026272.2039 -> v0.2026276.526
    plugin-installstep/candy/plugin-installstep v0.2026272.244  -> v0.2026276.440

Every ExtraCandyRefs site now states WHERE its refs belong, through the spec's own
constructors:

- collectOverlayCandies tags each add_candy ref with the overlay's BOX
  (spec.ScopedExtraCandyRefs(spec.BoxScope(box))), and takes the box as a parameter.
- deployNodePluginContext tags a deploy node's authored add_candy refs with the
  DEPLOY's box — the deploy IS the box (update_deploy_dispatch.go's
  "deployName := c.Box") — and gives an injected PROVIDER ref the EMPTY scope: a
  capability connect, not a composition, which the arbiter treats as silent.
- hostBuildDeployPluginsConnect converts the wire's authored []string ONCE, at the
  boundary, with the same box scope.
- connectPluginByWordRef's capability-connect scan: empty scope, same reason.

None of them is a CONSTANT. A constant label is exactly the #739 defect (~724 false
conflicts across the project); a bare string cannot carry a scope at all, which is
why the field is typed rather than re-derived at the consumer.

The plugin-word collector KEEPS its []string signature: it needs only the ref WORD
for perf-scoping, so it is fed spec.ExtraCandyRefStrings(...) — the projection
spec/resolve_opts.go names for this very consumer.

* fix(tools): adopt the shared sdk/spec pins in the lockstep tools modules

The leg-3 pin bump moved the SHARED sdk/spec pins in `charly/go.mod`
(sdk v0.2026272.1813 -> v0.2026276.48, spec v0.2026272.1512 -> v0.2026273.203),
but the in-repo `tools/*` modules carry their own `go.mod` and were left on the
old pair. `tools/gomod-canonical`'s `TestContractPinsMatchShared` anchors on
core's requires and asserts every lockstep module matches, so the CI `go` job's
"Test tools modules" step failed on the pushed head:

  gomod_canonical_test.go:117: ../../tools/generate-packages/go.mod: requires sdk
  v0.2026272.1813, but the shared sdk pin is v0.2026276.48 - run `charly task mods-tidy`
  (likewise spec, and tools/golden-cloudinit + tools/golden-compile)

Root cause: `tools/*` are separate GOWORK=off modules that are not workspace
members, so `go test ./charly/...` - and a local `go test ./...` inside the
charly module - never reach them. That is the exact detection hole ci.yml's
"Test tools modules" comment records for `main`.

Fixed with the sanctioned task rather than a hand-edit:

  $ ./bin/charly task mods-tidy
  task mods-tidy: 2 step(s), 0 failed
    [pass] run - adopt the shared pins and tidy every lockstep module
    [pass] check - every lockstep module now carries the shared pins

Six files: the three `tools/*/go.mod` requires and their `go.sum` hashes.
`charly/go.mod` is untouched - it is the anchor the task reads.

* fix(charly): the teardown of a nested member keeps its venue (charly#765)

`charly deploy del <root>.<member>` lost the member's venue. The del dispatch
shipped the node but no ancestor context, so runDeployNodeDelDispatch resolved
the target and called Del with nothing to re-derive the parent executor chain
from — the plugin's resolveRootExecutor fell through to
specexec.RootExecutorForDeployNode(node), THE OPERATOR'S HOST for an
in-substrate member with no `host:` field, and replayed the member's reversible
ops (`pacman -R` for a `package:` list) on the workstation while its `add` had
landed correctly in the guest.

This is the del twin of runResolveTargetAdd, and it is deliberately the same
move: reconstruct the ancestor chain host-side with spec.ReconstructParentExec
over the registry-coupled deriveChildExecutorForPath, then hand the resulting
executor to the target as its venue. A live executor still never crosses the
wire — only the root-first ancestor path/node lists do, and this half re-derives
from them.

applyDelParentExec writes t.exec AND t.venueJSON, sharing venueJSONFor with
applyParentExecOverride so the two halves can never disagree about what a venue
IS (that extraction is a pure refactor — the add path's observable behaviour,
including its nil-on-undescribable return, is unchanged). It carries the same
hasLifecycle guard for the same reason: a vm/pod composes its own nested venue
inside PrepareVenue and reports it back on the teardown-executor op.

Del's channel differs from Add's, and that is why this one must WRITE
t.venueJSON rather than return a descriptor: Del builds its request from
spec.DeployTargetDelOpts, which carries no venue, so t.venueJSON is the only
place dispatch can pick one up.

An empty ancestor list (a top-level or synthetic target) leaves the previous
RootExecutorForDeployNode behaviour exactly as it was.

The third variant of the #627/#680 mechanism. A check bed's cleanup step forks a
FRESH `charly deploy del` process, so the in-process venue carry between add and
del never applied there either.

Refs #765

* feat(charly)!: supply the per-format present_template queries + prove the teardown delta (charly#771 leg 3)

Leg 3 of #771: the per-format `present_template` queries
(pac/deb/rpm — never apk, see #772) as siblings of `uninstall_template:` in
charly/charly.yml, plus the R10 fixture's declared-minus-installed witness
(`curl`, present on the eval-host-vm guest by cloud-init; `charly` is not).
Each query emits STRIPPED names on stdout and exits 0 by construction.

go.mod pins: spec v0.2026272.1512 -> v0.2026276.1337 (leg 1,
opencharly/spec#191), plugin-installstep v0.2026272.244 -> v0.2026276.1353
(leg 2, opencharly/plugin-installstep#8); `go mod tidy` also advanced the
indirect sdk pin to v0.2026276.48, forced by spec 1337.

BLOCKED — this tree does not build or validate standalone, on two
dependencies the brief did not anticipate (root-caused, see hand-back report):
  1. spec >= v0.2026273.203 (which 1337 includes) carries the breaking typed
     ExtraCandyRef change; charly cannot compile until the adoption in the
     open PR #762 (head 9588d18) lands.
  2. plugin-distro's self-contained schema/distro.cue `#DistroInput`/`#DsFormat`
     does not declare `present_template`; no released plugin-distro version
     (newest v0.2026272.29) accepts it, so `charly box validate` rejects the
     field. A plugin-distro schema release is required.

(cherry picked from commit d71569c45f30861d749296c5aceae88c4a0186f6)

* chore(charly)!: bump the compiled-in plugin-distro pin to the present_template release (charly#771)

plugin-distro v2026.276.1457 mirrors spec's #Format.present_template, which charly's embedded
defaults already declare. Without it the compiled-in provider rejected EVERY project load:
  #DistroInput.format.pac.present_template: field not allowed
The tools/* lockstep modules move with the shared pins (charly task mods-tidy).

* build(#762): record the checksums for the plugin-distro v0.2026276.1457 bump

The conflict resolution kept this branch's plugin-distro pin (required by
#771's present_template change, which #778 does not carry) while adopting
#778's spec v0.2026276.1636 / sdk v0.2026276.1822. The module checksum was
left behind by that resolution: charly/go.mod required .1457 while
charly/go.sum still held only .29, so the CI build mode (GOWORK=off, ci.yml)
failed with 'missing go.sum entry for module providing package
github.com/opencharly/plugin-distro/candy/plugin-distro'.

charly task mods-tidy does not repair this: it ran green (2/2 steps) with
GOWORK=off in the environment and left charly/go.sum untouched, because it
tidies with the workspace on. The two checksum files were therefore brought
in step with the standard Go toolchain in CI's own mode:
  cd charly && GOWORK=off go mod tidy
  cd charly && GOWORK=off go build ./...   # exit=0
The workspace checksum follows from the same build.

* fix(#762): tidy charly/go.sum — drop the two superseded pin pairs

`go mod tidy` on this branch's tree deletes exactly four lines and nothing
else:

  plugin-command/candy/plugin-command v0.2026272.26 (h1: + /go.mod)
    superseded by v0.2026277.738, which main's #786 pinned and tidied;
    this branch's merge of origin/main unioned the old pair back in.

  plugin-distro/candy/plugin-distro v0.2026272.29 (h1: + /go.mod)
    the version this PR's own plugin-distro bump (to v0.2026276.1457)
    replaced — the bump added the new pair without removing the old one.

Neither version resolves: neither appears in go.mod or go.work, and tidy's
module graph reports no use of either.

Verified: `go mod tidy -diff` prints exactly these four deletions and no
other change; applying `go mod tidy` yields exactly this diff (4 deletions,
1 file).

---------

Co-authored-by: atrawog <[email protected]>
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