Repository navigation
docs(spec): correct CheckVerbResult.CapturedValue's contract (R1/R5) - #203
Conversation
#194: the field's comment named a `capture:` op gate that exists nowhere in the schema. Re-derived on origin/main before editing: no `capture?:` or `capture_extract?:` key survives anywhere in schema/, and the `ScenarioContext.Captures` stash it fed is gone too (ScenarioContext now carries only CurrentStepID/Backgrounds/Results) -- the check-engine cutover removed both. Only CHANGELOG history and one orphaned charly test docstring still mention them, so the comment was describing a mechanism nothing produces. The comment now states the contract the operator ruled for opencharly/charly#780 (JSON-encoded in both directions): the value is a JSON document the verb itself decided to capture while making its judgement, empty when it captured nothing, carried on the wire as ops.resultWire's `captured_value` raw JSON so a consumer addresses a field of it by dotted path without the contract naming any verb's shape. Comment-only: no behaviour, no generated artifact, no schema edit, no version coupling (#SchemaVersion and the charly.yml version: stamp were deleted). Closes #194 Refs opencharly/charly#780 Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
Review — PASSHead SHA: Security screen: PASS — comment-only edit; no secrets/egress, no guardrail weakening, no supply-chain or self-modifying-security change; PR content treated as data (no embedded directives). Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
spec.CheckVerbResult.CapturedValue's comment read "value stashed undercapture:(recorded only on PASS)" — a mechanism that exists nowhere. Re-derived onorigin/mainbefore touching it: nocapture?:/capture_extract?:key survives anywhere inschema/, and theScenarioContext.Capturesstash it fed is gone as well (ScenarioContextnow carries onlyCurrentStepID/Backgrounds/Results); the check-engine cutover removed both. OnlyCHANGELOG/history and one orphaned docstring incharly/checkspec_test.gostill name them — so the field's own contract comment was describing a gate nothing produces and nothing consumes.The comment now states the contract the operator ruled for opencharly/charly#780 (JSON-encoded in both directions): the value is a JSON document the verb itself decided to capture while making its judgement, empty when it captured nothing, carried on the wire as
ops.resultWire'scaptured_valueraw JSON so a consumer addresses a field of it by dotted path without the contract naming any verb's shape.Files (1):
spec/checkcontext.go— a comment-only edit inside a hand-written (NOT generated) contract file;CheckVerbResultis an in-process value struct, SDD-audited REVIEWED-INTENTIONAL (spec/checkcontext.goheader), so no CUE source and nocharly task cue-genrun is implicated, and no generated artifact moves.Closes #194
Refs opencharly/charly#780
The runtime legs of this same contract cutover follow producer-first in their own repos and their own PRs:
sdk(ServeCheckVerbencodes the capture it currently drops) →charly(decode throughops.ParseResultJSONFull, delete the hand-rolledpluginCheckResult, thread the value throughcheckResultFromVerb, and sweep the orphanedcapture_extract:/capture:docstring). This PR is the contract module's leg and carries only prose.The claim-keyed sweep (R5), on this head
The deleted claim is "a
capture:gate exists and stashes a value". The sweep is claim-keyed, not identifier-keyed:The two remaining surfaces outside this repo are named, not hidden:
sdk/CHANGELOG/2026.187.0747.md(historical record — permitted) andcharly/checkspec_test.go:328-332(an orphaned docstring for a deleted test, in another repo; it dies in that repo's own leg of this cutover, the charly PR, since a cross-repo cutover lands one PR per repo).How tested
Contract/library module: its own committed CI is the change-class gate (
spec/AGENTS.md:GOWORK=off go build ./...+go test ./..., with the repo's CI additionally runninggofmt -landgolangci-lint). All of it, executed on this head (19bea59):git status --shortis empty after the commit and the commit carries exactly the one intended file (git show --stat→spec/checkcontext.go | 13 ++++++++++---).Stated honestly: this is a comment-only change, so no behavioural test can fail without it — the proof that the change is complete is the claim-keyed sweep above (zero live
capture:gate references in the committed tree, and the two out-of-repo surfaces named rather than implied absent). The runtime proof for this contract belongs to thesdk/charlylegs, each with its own gate.Rulebook compliance
/charly-internals:go(SDD: which files are generated vs hand-written) and/charly-build:validate//charly-internals:plugin(the CUE-schema contract) for this step, and/charly-internals:git-workflow+ its pre-validator self-audit before the push.origin/mainbefore editing, not assumed: thecapture:/capture_extract:keys and theScenarioContext.Capturesstash are provably gone, so the comment was the stale side and the code was right to be changed by comment only. No warning or failure is left standing.charly/checkspec_test.go's orphaned docstring is routed to the charly leg of this same cutover (a cross-repo cutover lands one PR per repo); thesdkCHANGELOG mention is permitted history. No "pre-existing"/"unrelated" carve-out.ops.resultWire,spec.CheckResult) is untouched.#SchemaVersion/version:no longer exist to bump (CHANGELOG/0.2026270.938.md), so no migration is owed by a comment-only edit.feat/c9-captured-value-docoff freshorigin/main(b8c348a), no force-push, no rebase; the tree is clean after the commit; no submodule's tracked checkout was touched.capture:gate references) is backed by the pasted grep and its exit code, and the two out-of-repo survivors are named explicitly.charly task cue-genis not implicated because the edited type is hand-Go (SDD-audited REVIEWED-INTENTIONAL), which the paste of the file's own header establishes.spec/AGENTS.md), not a bed: a fresh disposable venue would exercise nothing this diff touches. The non-runtime standards all passed on the final tree (pasted above).Change classification
git diff --stat $(git merge-base origin/main HEAD)..HEAD→ one file, comments only), never from intent.gofmt -l+GOWORK=off go build ./...+go vet ./...+GOWORK=off go test ./...+golangci-lint fmt --diff+golangci-lint run ./...— all green on this head; plus the claim-keyed sweep.documentation reviewed(the tier for a comment-only change whose non-runtime standards all pass; runtime tiers are forbidden for prose-only work).Agent: wire-types · session 80a2525e-6107-4143-94c4-795f317c71d3
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)