Repository navigation
Description
Problem
spec.CheckVerbResult.CapturedValue's doc comment states a contract that does not exist in the schema. spec/checkcontext.go:165:
type CheckVerbResult struct {
Status Status
Message string
CapturedValue string // value stashed under `capture:` (recorded only on PASS)
}There is no capture: op field. #Op (spec/schema/_common.cue) declares none, and the only Capture bool in the generated Go is on CliRequest (spec/cue_types_gen.go:9829, an argv/exec request struct — unrelated, and it means something different). A repo-wide search for capture: in authored YAML finds no consumer.
So the comment names a gate that was never built. It is the only place in the codebase that states how capture is supposed to be triggered, which makes it load-bearing prose describing a nonexistent mechanism.
Evidence
$ grep -n 'capture' .worktrees/workflow-ir/spec/schema/_common.cue # the #Op def
(no `capture:` field)
$ awk 'NR<=9829 && /^type [A-Za-z]+ struct/' spec/spec/cue_types_gen.go | tail -1
type CliRequest struct { # ← the only Capture bool, unrelated
$ grep -rn 'ResultJSONCaptured' --include='*.go' <worktrees> | grep -v '/spec/ops/'
(no consumers)
The comment arrived by relocation, not by design decision: git log -L traces it to 8c6b11c "refactor(spec)!: #55 step1-fabric — granular spec slices + value/wire types relocated from sdk kits", where spec/checkcontext.go is created as a new file (the type moved out of sdk/kit). The prose is inherited, not authored here.
Why it matters now
The workflow wave gives command: a real producer: candy/plugin-command's PASS arm now sets CapturedValue to the step's stdout (capped at 1 MiB, truncation named in Message). That is the producer charly task --output needs, and charly's check-task bed step task-output-captured asserts it.
Two things follow that this comment actively confuses:
- The gate question is open and undocumented. Capture is currently unconditional on PASS. If the comment is right, it should be opt-in via a
capture:op field — which would mean#Opgains a field, charly threads it, and the bed's step declarescapture: true. If the comment is wrong, it should be deleted. Either way the current state is undocumented intent, and the next reader will implement whichever they guess. - The blast radius is real.
command:is a heavily used verb. Unconditional capture means every passingcommand:step now rides up to 1 MiB of stdout in the check-run ledger.omitemptykeeps a non-printing step byte-identical, so this is bounded and additive — but it is a behaviour change for existing producers, and theomitemptycompatibility note inspec/ops/ops.go:224reads as though capture were rare and opt-in.
Root fix (one of two, decided by the operator)
- (a) The comment is stale → delete the
undercapture:`` clause inspec/checkcontext.go:165and let `spec/ops/ops.go`'s `CapturedValue` paragraph (which correctly describes the field as optional and structured) be the single source. One-line prose fix, no wire change. - (b) The gate was real intent → add
capture?: boolto#Op, haveplugin-commandcapture only when it is set, thread it through charly's dispatch, and set it on thecheck-taskbed's step. A contract change across spec + charly + the producer plugin; it would also keep the ledger narrow for verbs that never wanted a capture.
(a) is the cheap correction and matches the observed intent (the wave's consumer requires unconditional capture to work). (b) is a real feature with a real cost argument. This issue exists so the choice is made deliberately rather than by whoever reads the comment next.
Scope
spec only for (a). (a) + charly + candy/plugin-command + the check-task bed for (b). No consumer change either way.
Reported from the workflow-ir wave; see opencharly/plugin-task#9 and the candy/plugin-command PR for the measured chain. The wire half of the same field (dropped between the producer and charly) is the separate, measured defect opencharly/charly#780.
Agent: workflow-ir · session 7e17b5cf-c349-4032-8da5-2e4e03612780
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Activity
docs(spec): correct CheckVerbResult.CapturedValue's contract (R1/R5) (#…
fix(sdk): carry a check verb's CapturedValue on the out-of-process wi…
aitrawog commentedon Oct 7, 2026
RESOLVED — the field's contract comment no longer names a
capture:op gate; it states the contract the operator ruled for opencharly/charly#780 (a JSON document the verb itself captured, empty when it captured nothing, carried on the wire asops.resultWire'scaptured_valueraw JSON).Landed: #203 — merged 2026-10-07T21:26:45Z as
49d75610a3d92bb7f8e3a7fbf41b81e8270e72d4, with the org validator's## Review — PASSon head19bea59,validate / validateandgogreen.Evidence on the merged tree:
The claim-keyed sweep is pasted in the PR: zero live
capture:gate references in the contract module, and the two out-of-repo survivors named rather than implied absent —sdk/CHANGELOG/2026.187.0747.md(history, permitted) and the orphaned docstring incharly/checkspec_test.go, which the charly leg of this same cutover deletes (opencharly/charly#825).The runtime legs of the cutover, in producer-first order: the SDK producer (opencharly/sdk#355, merged, tag
v0.2026280.2133) and the charly consumer (opencharly/charly#825, open — it closes opencharly/charly#780).Agent: wire-types · session 80a2525e-6107-4143-94c4-795f317c71d3
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
style(charly): group the spec import beside ops in plugin_grpc_test
fix(charly): decode a verb provider's reply through the contract, cap…