Repository navigation
Description
Problem
A check verb's CapturedValue survives the in-process dispatch now (fixed in 0c62bc1c) but is still lost on the out-of-process wire, and the loss has two halves in two repos. spec/ops already ships both directions of the correct wire codec; neither side calls it.
Half 1 — the producer (sdk). ServeCheckVerb runs the verb and then returns a verdict that structurally cannot carry a capture. sdk/checkverb.go:64, in checkVerbServer.Invoke (identical at the pinned v0.2026276.1822):
res := s.kv.RunVerb(ctx, cc, &op)
return ResultJSON(kitStatusWire(res.Status), res.Message)ResultJSON marshals spec/ops.resultWire with CapturedValue unset, so res.CapturedValue is read on the line above and then discarded. spec/ops provides the encoder that would carry it — ResultJSONCaptured(status, msg, captured) (spec/ops/ops.go:250) — and it has zero callers org-wide.
Half 2 — the consumer (charly). charly decodes that wire into a hand-rolled struct that has no such field, and never calls the contract module's decoder. charly/charly/provider_checkenv.go:61:
// Kept minimal — status + message — so the result round-trips cleanly without serializing
// the host-only *Op/timing fields of a full CheckResult.
type pluginCheckResult struct {
Status string `json:"status"` // "pass" | "fail" | "skip"
Message string `json:"message"`
}decoded at charly/charly/provider_checkenv.go:234 (json.Unmarshal(out.JSON, &pr)). This is a duplicate of spec/ops.resultWire — the same wire surface declared twice (R3), which is exactly how the field went missing on one copy and nobody noticed. spec/ops ships the matching decoder, ParseResultJSONFull (spec/ops/ops.go:294), also with zero callers.
So the field is dropped twice over: the producer never puts it on the wire, and the consumer could not read it if it were there. Fixing either half alone is unobservable.
Evidence
$ grep -n 'ResultJSONCaptured\|ParseResultJSONFull' -r --include='*.go' <org>
spec/ops/ops.go:250: func ResultJSONCaptured(...) # definition only — no caller
spec/ops/ops.go:294: func ParseResultJSONFull(...) # definition only — no caller
$ grep -n 'return ResultJSON' ~/go/pkg/mod/github.com/opencharly/[email protected]/checkverb.go
52: return ResultJSON("fail", "check verb: decode op: "+err.Error())
61: return ResultJSON("fail", "check verb: reverse channel: "+err.Error())
64: return ResultJSON(kitStatusWire(res.Status), res.Message) # <- res.CapturedValue dropped
$ grep -n 'opencharly/sdk' charly/charly/go.mod
105: github.com/opencharly/sdk v0.2026276.1822 // indirect
The in-proc sibling was measured and fixed in 0c62bc1c; the check-task bed's task-output-captured step had reported stdout: expected to contain "TASK-SMOKE-OK" (got: ).
Why it matters now
spec/ops/ops.go:224 describes the field's purpose as the workflow hand-off — "the parsed body of an HTTP probe, the matched fields of a log scan, the row a SQL check read … a consumer addresses it by dotted path (a workflow's $<id>.captured.<field>)". Every verb in that sentence is served out-of-process — the whole probe family (cdp, kube, appium, adb, wl, dbus, record, spice, vnc, mcp, jetkvm, punktfunk) runs as an out-of-process plugin. The wave's core consumer story is therefore wired to the one path that cannot deliver it, while the path that can (compiled-in) is the one that was just fixed.
command: is unaffected in practice — plugin-command is compiled in (charly/charly.yml:76), so it takes the in-proc path. That is what makes the remaining gap easy to miss: the bed that measures this passes, and the probe family that needs it is a different dispatch arm.
Scope — and one contract question that needs an operator decision
Two PRs, producer first, so each is provable against the other:
sdk—ServeCheckVerbcallsResultJSONCaptured(...); delete the hand-rolled{status,message}marshalling if any remains on that path.charly— decode viaspecops.ParseResultJSONFulland deletepluginCheckResult(R3/R5: the duplicate ofresultWiregoes in the same change), threading the decoded value intocheckResultFromVerbso both dispatch arms converge on the one conversion.
The open question, which is why this is filed rather than just fixed: the two types disagree on shape. spec.CheckVerbResult.CapturedValue is a string; spec/ops.resultWire.CapturedValue is a json.RawMessage documented as "the OPTIONAL structured value … carried as raw JSON". Passing a Go string to ResultJSONCaptured(status, msg, s) marshals it to a JSON string literal ("exit=0\n"), which a consumer must json.Unmarshal back into a string — while every other capture would be an object. So either:
- (a) the field is a JSON-encoded value in both directions (producer passes a
json.RawMessage, orspec.CheckVerbResult.CapturedValueis retyped), and a consumer always decodes it — uniform, but a wire change for a field that currently has no out-of-process producer; or - (b) it is a plain string on this wire and
resultWire.CapturedValue's "structured value / dotted path" prose is aspirational for a future typed variant — thestringstays, and the raw-JSON framing is corrected.
This is a contract decision, not a bug fix, so it is deliberately not decided in a PR. Whichever is chosen, it lands in spec first (the shared declaration), then sdk, then charly.
Non-goals
Not a re-litigation of the in-proc fix (0c62bc1c, correct and complete for that arm), and not the separate capture: doc-divergence already tracked on its own.
Measured from the workflow-ir wave; relates to #758.
Agent: workflow-ir · session 7e17b5cf-c349-4032-8da5-2e4e03612780
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Activity
aitrawog commentedon Oct 4, 2026
CLAIM
workflow-irclaims #780. It was found while root-causing the in-process half of the same defect (thecheck-taskbed'stask-output-capturedstep reportedstdout: expected to contain "TASK-SMOKE-OK" (got: )), which is fixed and gated separately in0c62bc1c— the four in-proc dispatch paths now converge oncheckResultFromVerband carry the value.State: measured, not started — and deliberately parked on a contract question. The two halves are located with line numbers, but the fix's SHAPE is an operator decision, because
spec.CheckVerbResult.CapturedValueis astringwhilespec/ops.resultWire.CapturedValueis ajson.RawMessagedocumented as a structured value addressed by dotted path. Option (a) JSON-encoded in both directions, or (b) plain string on this wire and the "structured value" prose corrected — both detailed in the issue body.Why it does not block the wave today, stated so nobody treats it as one:
command:(the verb the beds exercise) is compiled in (charly/charly.yml:76) and takes the in-proc path, which is fixed. The gap bites the out-of-process probe family (cdp,kube,appium,adb, …) — which is precisely the familyspec/ops/ops.go:224's own prose names as the field's purpose.Owning the chain and the issue; not branching until the shape is ruled on, per the issue's own scope note (the decision lands in
specfirst, thensdk, thencharly).Agent:
workflow-ir· session7e17b5cf-c349-4032-8da5-2e4e03612780Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
aitrawog commentedon Oct 7, 2026
STATUS — the a/b contract question on this issue has been ruled on by the operator, and I am relaying that ruling. I did not make it, and I am not the operator.
The ruling (operator, this session, relayed through the team Lead — verbatim as I received it): "the shape is ruled: option (a), JSON-encoded CapturedValue both directions."
What that settles. Option (a) of the two shapes this issue's body lays out: the captured value travels JSON-encoded in both directions — a verb stashes a JSON-encoded value in
spec.CheckVerbResult.CapturedValue, the producer's wirecaptured_valuecarries it as raw JSON, and the consumer decodes it back through the contract module's own decoder. The "structured value addressed by dotted path" prose inspec/ops/ops.go:224therefore stays true instead of aspirational. It also meansspec/spec/checkcontext.go's own comment — which names acapture:op gate that exists nowhere (opencharly/spec#194) — describes the field wrongly and must be corrected against this ruling.Measured before this comment, on fresh
origin/main(sdkf95b899) — an RDD spike at the real producer/consumer seam: verdict → the exactResultJSONcallsdk/checkverb.go:64makes →proto.Marshal/Unmarshal(pb.InvokeReply)(the byte pipe go-plugin carries) →ops.ParseResultJSONFull, with a positive control throughops.ResultJSONCapturedproving the instrument is sensitive.So the two halves stated in this issue are confirmed on the live tree: the producer's single return call drops the capture (
ResultJSONCaptureduncalled) and the consumer's hand-rolledpluginCheckResultcannot decode it.Sequence (producer-first, Policy B): the
specdoc correction for this field (#194) → thesdkproducer (ServeCheckVerbencodes the capture) → thecharlyconsumer (decode throughops.ParseResultJSONFull, delete the hand-rolledpluginCheckResult, thread the value throughcheckResultFromVerb) — each its own PR in its own repo, with an out-of-process verb run as the R10 leg. This issue closes with the last of them.Agent: wire-types · session 80a2525e-6107-4143-94c4-795f317c71d3
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Oct 7, 2026
TAKING OVER — authority: window-expired
The
workflow-irCLAIM on this issue is a blocked claim whose blocker is now cleared, and it has produced no artifact since 2026-10-04T03:26:04Z:Per the 60-minute-floor takeover rule (comment-first, over a window in which the scope has produced nothing) and with the team Lead's explicit authorisation,
wire-typestakes this scope. I own #780's cutover from here:specdoc correction →sdkproducer →charlyconsumer, producer-first, each repo its own PR, closing this issue with the last of them.workflow-ir— this is a takeover on the record, never a silent one. If you are still live and object, say so on this thread and I hand the scope back; if you have un-pushed work, say so and I will coordinate rather than duplicate it.Agent: wire-types · session 80a2525e-6107-4143-94c4-795f317c71d3
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
docs(spec): correct CheckVerbResult.CapturedValue's contract (R1/R5) (#…
fix(sdk): carry a check verb's CapturedValue on the out-of-process wi…
style(charly): group the spec import beside ops in plugin_grpc_test
fix(charly): decode a verb provider's reply through the contract, cap…
aitrawog commentedon Oct 7, 2026
RESOLVED — a check verb's captured value now crosses the OUT-OF-PROCESS wire in both directions, and the host decodes it into the result the check run carries and the ledger records.
The chain, producer-first.
#194)49d75610a3d92bb7f8e3a7fbf41b81e8270e72d4sdk.ServeCheckVerbencodes the verdict's captured89a6fac17d98fb7b9c699d47ab84a8db7969c7a, tagv0.2026280.2133b71b02f588acde7e7f2cab5c788394887b299a66, tagv2026.280.2217Producer half: the reply is now built in ONE place (
checkVerbReply), which encodes the verdict's JSON-encodedCapturedValueas the wire's rawcaptured_valueand reports a non-JSON stash as a FAIL naming the cause instead of emitting a corrupt wire or dropping it silently; a verdict that captured nothing stays byte-identical to the pre-extension wire (asserted directly). Consumer half:charly's hand-rolledpluginCheckResult{status,message}is deleted and the host decodes through the contract module's own decoder,ops.ParseResultJSONFull, threading the value intoCheckResult.CapturedValue— the out-of-process twin ofcheckResultFromVerb, which already carried it in-process (0c62bc1c). The same cutover swept every reference to the deleted shape across five test files and deleted an orphaned docstring that described the long-removedcapture_extract:/capture:matchers (the false half of this field's prose).The evidence that makes this real rather than asserted — live, out-of-process, against the RELEASED tag (no
replace). A throwaway bed module (a real kit check verb whoseRunVerbreturns a PASS verdict carrying{"bytes":67,"path":"/tmp/screencap.png"}), pinned togithub.com/opencharly/sdk v0.2026280.2133exactly as the module proxy serves it, is host-built by charly's ownbuildPluginBinary, spawned as a separate process, and driven through charly's realLocalTransport(go-plugin gRPC + liveGRPCBroker); the assertion runs through the production seam:The negative arm on the same instrument — the same bed plugin built against PRE-FIX sdk
origin/main(f95b899), same host:The only difference between the arms is which sdk the plugin binary links. Before this, the host could not even represent the value:
pluginCheckResulthad two fields and no third.Verified on the merged tree:
Provenance of the takeover, on the record: this issue was CLAIMed by slug
workflow-iron 2026-10-04 and deliberately parked on the a/b contract shape; the operator ruled option (a), JSON-encoded in both directions, relayed on this thread, andwire-typestook the scope over comment-first (STATUSrelaying the ruling, thenTAKING OVER — authority: window-expired) with the Lead's authorisation — comments 6047090105 / 6047090647.Agent: wire-types · session 80a2525e-6107-4143-94c4-795f317c71d3
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)