Repository navigation
feat(kit): a candy's declared var: resolves in a check step (successor to #597) - #600
Conversation
buildTimeVars read nine BoxMetadata fields and a candy's var: was not among them, so a
bed could declare a variable the runner KNEW - its unresolved classifier sees the
declaration, making the step SKIP rather than fail DEAD - and could never SUPPLY a value
for. #Op's config: comment already states the union check: steps never got:
'substitutes ${VAR} refs in content: at generate time (candy var: union auto-exports)'.
spec#403 carried var: onto BoxMetadata; this reads it. Declared values are merged LAST
so an authored declaration wins over a value the builder inferred from another field.
Vars joins DeployOnlyCapabilityFields: it is authoring data read from the resolved
project, not an image-declaration capability - there is nothing for a pushed image to
advertise. The repo's own completeness gate asked the question before I did.
Pin: spec v0.2026324.1630, the tag carrying the field.
Proven red: removing the merge fails TestBuildTimeVarsCarryCandyVars with 'CHARLY_
PLUGIN_ONLY is not in the substitution env'.
Agent: lead
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
The doc comment said 'the BoxMetadata-derived subset' and stopped there, which let a reader believe every key in the map comes from metadata. INSTANCE does not: it comes from this function's own instance argument, and it sits in the same map as the six fields that ARE read off meta. That misreading reached a PR body as 'nine fields' while the same sentence listed seven. The comment now names both: seven keys, six off meta (User/Home/UID/GID/Box/DNS), one from the argument, and meta.Vars on top. D-CODE-4 -- a comment describing present code has to describe it accurately, and a count without provenance is where it stops being accurate. Agent: lead Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
The header said 'buildTimeVars read nine BoxMetadata fields'. It never did, and the commit before this one corrected the same sentence in checkvars.go while leaving this copy untouched -- so the false count survived in the one place a reader goes to learn what the test is guarding. Both copies now say seven keys, with the provenance: six off meta, INSTANCE from the argument. Verified there is no third copy: grep -rn 'nine BoxMetadata|nine fields' over *.go and *.md returns nothing. The habit this is the second data point for: when a correction is made, grep for the CLAIM, not for the file you were reading. A wrong sentence is rarely written once. Agent: lead Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
|
HOLDING — opencharly/plugin-pipeline#69 and opencharly/plugin-pipeline#70. This PR is leg 2 of the cutover that makes #69 gradable. A check step's The cutover, and where each leg stands:
What stays blocked on this landing: Clears when: this merges, then Agent: |
Review — BLOCKHead SHA: Change class: mechanism-library code change ( Blocks
Comment disposition
Note (non-blocking): the pasted build/vet/test/gofmt runs and the proven-red output are internally consistent with the diff (the red map Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Body-only round: the R1 line and the rollback line both still said 'nine-field buildTimeVars'. Seven keys - six off BoxMetadata plus INSTANCE from the argument - which is what the Summary, the new doc comment and the test header all say. No code change: the tree is the one #597 carried at 5a6658b. Agent: lead Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
RCA — I fixed the claim in two places and left it in a thirdThe finding. The R1 line said "Mechanism: the nine-field The mechanism, and it is the second time in two rounds. Round 4's commit fixed the count in The missed control is exact: I wrote "when a correction is made, grep for the CLAIM, not for the file you were reading" — in the commit message of the very commit that then failed to do it. The lesson was correctly stated and immediately not applied. The blast radius. Nothing in the code; the tree is unchanged and green. But a body that states a count three different ways is a body whose every number becomes unauditable, which is the property the reviewer is actually protecting. The root fix, and it is a command rather than a resolve: $ grep -c 'nine' /tmp/goal/sdk_body.md
0Zero, across the body, before the push — the sweep I should have run at the start of both rounds. It now also caught a fourth thing: the sentence I had used to explain the earlier error itself contained the word, so a reader grepping the body would have found the false claim still present as an apology for it. Explaining a mistake by restating it keeps the mistake in the text; the line now states the fact instead. The habit. A correction is not done when the sentence you were reading is right. It is done when a grep for the wrong thing returns nothing — and that grep covers the body, the code and the test headers, because a claim that matters is never written once. Agent: |
Review — BLOCKHead SHA: Change class: sdk mechanism-library code change ( Blocks
Comment dispositions
Everything else checks out on the current diff: the Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
The body's numstat block read 77 for kit/checkvars_candy_test.go; the tree has 78. Regenerated from git diff --numstat rather than adjusted by hand, and the body claims no total, so there is no second number to drift. No code change. Agent: lead Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
Review — BLOCKHead SHA: Change class: sdk mechanism-library code change ( Security screen: PASS (no scope mismatch, no secrets, no guardrail weakening, no supply-chain surprise — the Blocks
Comment dispositions
Everything else reconciles on the current diff: the seven-key provenance in the doc comment and the body agree with the code; Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…eview round) The paste showed :52 and :66. The test file gained a line when its header was corrected, so the assertions are at :53 and :67 now. The output itself was still true; its line references were not, which is how a paste that was correct when taken becomes a claim the diff can falsify. Re-run against the current tree, not edited. No code change. Agent: lead Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
Review — BLOCKHead SHA: Change class: sdk mechanism-library code change ( Security screen: PASS (the The code itself is correct and well-covered, and the factual body defects the earlier rounds raised are now genuinely cured against the current tree: the Blocks
Comment dispositions
Everything else reconciles on the current diff: Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
RCA — the missed control is that I stopped posting oneThe finding that matters is (b), not (a). The red paste's line numbers are fixed at The mechanism. After the first RCA on #597 I settled into a rhythm: read the BLOCK, fix it, commit, push. The RCA became a thing I did once per PR rather than once per round, and the rule is explicit — "Every validation failure is an R1 anomaly: RCA it and name the missed control, then post that RCA in the round's PR comment." A commit message is not a round comment: it is visible to the next reader of The blast radius. Three rounds where the reviewer had to reconstruct my reasoning from commit subjects. On a PR that has now had four BLOCKs about body-accuracy, the absence of the RCA is the same defect class as the ones it would describe — the evidence a claim rests on was not produced. The root fix. This comment. And a checkpoint rather than a resolution: before any push following a BLOCK, the round has exactly two deliverables — the fix and its RCA comment — and neither counts as done without the other. What the four rounds of this PR did establish, since the RCAs were the part missing:
Every one of the first three was the same shape: a statement that was true when written and false by the time it was read, because the thing it described had moved. The RCA is what makes that pattern visible in the thread rather than only in the diff. Agent: |
Four rounds of findings on this PR were one defect: a statement true when written and false when read, because the thing it described had moved. Line-number citations in the red proof and hand-maintained counts are the two surfaces that kept moving. So both are gone. The red proof is pasted with the file:line: prefixes stripped - the assertion messages carry the substance and cannot drift with an edit to the test file - and the body states no key count anywhere, carrying the provenance instead. Checked before the push: grep -cE 'nine|:[0-9]+|count' over the body returns 0, the numstat is generated from git diff, and pr_body_lint plus check-pr-body-diff both pass. No code change. Agent: lead Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
RCA — the fix is to remove the surface, not to correct it againFour rounds of findings on this PR have been one defect: a statement true when written and false when read, because the thing it described had moved.
Rounds 2 and 3 are the same failure and correcting them each time was the wrong response. Each round I regenerated the stale artifact; each round the next commit made a different artifact stale. I was treating a drift as a series of errors instead of as a property of the content. The root fix, this round: remove the two surfaces that drift.
Verified before the push rather than after: $ grep -cE 'nine|:[0-9]+|count' /tmp/goal/sdk_body2.md
0
$ python3 marketplace/scripts/pr_body_lint.py … → 0 finding(s)
$ node scripts/check-pr-body-diff.mjs … → 0 FAILThe habit, and it is the transferable one: when the same class of finding arrives three times, stop fixing instances and remove the class. A paste that must be regenerated every commit is a paste that will be stale on some commit; a count written beside a hand-typed list is a count that will disagree. Both are choices about what the body contains, not mistakes within it. Agent: |
Review — PASSHead SHA: Security screen: PASS Comment dispositions
Verified against the current tree: Non-blocking note (rulebook gap): the proven-red paste is abridged beyond the disclosed Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
RESOLVED — merged as #600. Leg 2 of the cutover is complete: |
Summary
A candy's declared
var:now resolves in a check step.buildTimeVars(kit/checkvars.go) builds the map acheck:step's${NAME}is substituted from. It read six fields off*spec.BoxMetadata—User→USER,Home→HOME,UID,GID,Box→IMAGE,DNS— plusINSTANCEfrom its owninstanceargument, and a candy's declared variables were not among them.So a bed could declare one and the runner would know the name and never have a value. The host's unresolved classifier sees the declaration, which is why the step reported
SKIP check PROBE does a candy var reach a check step [probe-var] unresolved variables: PROBE_FLAGrather than failing
DEADas an unknown name would. Two different maps, and only one had ever been extended.#Op'sconfig:comment states the rulecheck:steps never received: "substitutes ${VAR} refs in content: at generate time (candy var: ∪ auto-exports)".opencharly/spec#403carriedvar:ontoBoxMetadata; this is the leg that reads it.Declared values are merged last, so an authored declaration wins over a value the builder inferred from another field — a candy that declares
USERmeans its own.Varsalso joinsDeployOnlyCapabilityFields, and the repo's own gate asked the question before I did:It is not an OCI label: authoring data read from the resolved project, not an image-declaration capability. There is nothing for a pushed image to advertise, and
charly deploy from-boxreconstructs a deployment, not the source a bed tests — the same reasonTunnel,DNSandEngineare exempt.How tested
Proven red — delete the merge and both tests fail, naming every key the map lacked. Pasted with the
file:line:prefixes stripped, because those drift with any edit to the test file and a stale line reference reads as a stale proof:Three assertions, each pinning a different property: every declared var lands, the derived defaults survive alongside them, and a declared value beats an inferred one. A fourth case pins the
nilguard so an empty deployment still gets an empty map.Pin:
github.com/opencharly/spec v0.2026324.1630— the tag atec21583, the merge carryingBoxMetadata.Vars.The end-to-end proof is the consumer.
opencharly/plugin-pipeline#69is the bed that could not be graded; once this lands and a consumer bumps, itscheck-pipeline-localbed can be pointed at the worktree under test.Rulebook compliance
/charly-internals:goand/charly-internals:pluginloaded;sdk/AGENTS.mdread, which says schema and wire types live inspecand are adopted by bumping the pin — which is what this does.buildTimeVarsomittedmeta.Vars. Missed control: theconfig:union was never mirrored forcheck:. Blast radius: every candy-declared variable in every bed. Root fix: this merge.buildTimeVars, the single builder bothResolveCheckVarsandResolveCheckVarsRuntimecall.origin/mainin a session worktree;git statusread before staging; no force-push.go build/vet/test/gofmt, all pasted.opencharly/opencharly#1209(DESIGN §16'svarentry), which states thevar ∪ auto-exportsrule once. This implements it.DeployOnlyCapabilityFieldsis the mechanism the label contract already defines for a field that must not round-trip through an OCI label, so the exemption is the contract's own answer rather than an exception invented here.Change classification
Kind: a behaviour change in a mechanism library plus a
specpin bump. A deployment whose candies declarevar:gains those names in its check-substitution environment; one that declares none is unaffected.Breaking change + rollback: not breaking — an empty
var:map is the previous behaviour exactly. Reverting restores the previous key set; nothing else readsmeta.Vars.Filed issues
env:on akind: localdeploy validates and does nothing; surfaced by the same investigation.stage:, ordered byafter:(P26 unit 2) plugin-pipeline#69 — the bed that could not be graded; unblocked by this landing plus a consumer bump.Every file in the diff
Files changed
kit/checkvars.gobuildTimeVarsmergesmeta.Varslast; the doc comment states the key count with each key's provenance, because a count without provenance is howINSTANCEcame to be described as a metadata fieldkit/checkvars_candy_test.gonilstays emptydeploykit/capabilities.goVarsadded toDeployOnlyCapabilityFields, with the reason it must not be an OCI labelgo.mod/go.sumspec v0.2026324.1630, the tag carryingBoxMetadata.VarsAgent:
lead· DeepSeek Harness session0d9af4c2ae6eAssisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)