Skip to content

fix(bundle,envelope)!: --add-candy ref not threaded into the resolved-project envelope - #101

Merged
atrawog merged 4 commits into
mainfrom
feat/k1-alpha-addcandy-envelope
Jul 24, 2026
Merged

atrawog merged 4 commits into
mainfrom
feat/k1-alpha-addcandy-envelope

Conversation

@atrawog

@atrawog atrawog commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

Fixes a K1-alpha blocking regression (charly superproject task #13):
--add-candy <remote-ref> / a deploy's add_candy: [<remote-ref>] failed at
TWO independent resolved-project envelope fetch sites for a candy never
reachable from any box's own image closure (e.g.
@github.com/opencharly/charly/candy/pod-addcandy-marker:vTAG):

  • The STANDARD --add-candy compile path: candy/plugin-bundle's compile
    handler re-fetches the resolved-project envelope independently via
    HostBuild("resolved-project"), using only the project directory — never
    the add-candy ref the host's own scanCandiesForRef already widened its
    own scan with. Error: bundle compile: candy "<name>" not in resolved-project envelope.
  • The add_candy-ON-POD-OVERLAY deploy path (deploy-key != image-name, e.g.
    check-addcandy-pod): candy/plugin-installstep's getGenerator (used to
    render HOST-COUPLED build-emit words during an overlay build) makes its
    OWN separate resolved-project re-fetch, again without the add-candy ref
    the host's overlay Generator already widened with. Error:
    OCITarget.Emit(<name>): candy "<name>" not found.

Concrete edits:

  • #ResolvedProjectRequest (schema/resolvedproject.cue) gains
    extra_candy_refs?: [...string] @go(ExtraCandyRefs).
  • #DeployCompileRequest (schema/seam.cue) gains the same
    extra_candy_refs?: [...string] @go(ExtraCandyRefs) field.
  • #BuildEnv (schema/buildwire.cue) gains the same field, for the
    overlay-build's host-coupled step-emit dispatch.
  • spec/cue_types_gen.go regenerated via task cue:gen (three intended
    fields only).
  • CHANGELOG/2026.205.2010.md (placeholder CalVer) covers both fixes with
    pasted verification.

All three new fields mirror the EXISTING ResolveOpts.ExtraCandyRefs
contract (already used elsewhere, e.g. a check bed's own add_candy:) — no
new mechanism invented, R3.

Change class

Cross-repo. This is the sdk (producer) leg — a pure wire-shape addition
(three new optional CUE-sourced fields, no behavior of its own). The
consumer leg is the charly superproject (feat/k1-unblock-wave1, commits
a9dc2c7c + 067940bd), which threads these fields through
hostBuildResolvedProject / compileDeployPlans / compileSelectionViaPlugin
(standard path) and dispatchOCIStep / plugin-installstep's getGenerator
(overlay path), and is the one that actually proves the fix via the
check-addcandy-pod / check-stepkind-emit-pod disposable beds. Landing
order: this sdk PR merges first; the charly consumer's sdk gitlink then
repoints from the unmerged commit to the merged/tagged one.

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: a schema-only sdk producer leg has no
    runtime bed of its own (per /charly-internals:git-workflow B6 "New candy" /
    cross-repo landing note: a producer's gate is the standalone battery; the
    REAL gate is the consuming image/build, which for a cross-repo wire-shape
    change is the charly-side consumer leg's own bed run). The gate actually
    run HERE is the sdk standalone battery: GOWORK=off go build/vet/test ./...
    • the task cue:gen reproducibility check.
  • Eval beds run: N/A for this sdk-only leg — no sdk package has its own
    disposable bed; the two beds this fix targets (check-addcandy-pod,
    check-stepkind-emit-pod) live in the charly superproject / box/fedora
    submodule and are run against the CONSUMER leg (feat/k1-unblock-wave1),
    owned by the K1-alpha orchestrator (team-lead), not this sdk PR. That
    consumer-leg bed proof is the actual R10 evidence for the fix's runtime
    correctness; this PR's own gate is the standalone battery below.
  • Fresh rebuild: N/A — sdk ships no binary of its own; charly version
    / binary-freshness applies only to the charly consumer leg.
  • Did the CHANGED code path execute live? The new fields are read by
    Go code that ONLY exists in the CONSUMER (charly) repo — this sdk repo's
    own code has no reader of ExtraCandyRefs on these three structs (they
    are pure data-carrier additions). So "live execution of the changed path"
    is, by construction, entirely the consumer leg's proof. This PR's own
    verification is limited to: the fields marshal/unmarshal correctly
    (implicit in go build/go test passing with the regenerated types) and
    the schema is reproducible.
  • Concurrency: N/A — no shared-state/loader/ledger/lock code touched.
$ GOWORK=off go build ./...
(clean, no output)
$ GOWORK=off go vet ./...
(clean, no output)
$ GOWORK=off go test ./...
ok  	github.com/opencharly/sdk	0.168s
ok  	github.com/opencharly/sdk/agentkit	0.047s
ok  	github.com/opencharly/sdk/buildkit	(cached)
ok  	github.com/opencharly/sdk/deploykit	0.446s
ok  	github.com/opencharly/sdk/enginekit	(cached)
?   	github.com/opencharly/sdk/internal/schemagen	[no test files]
ok  	github.com/opencharly/sdk/internal/wiregen	(cached)
ok  	github.com/opencharly/sdk/kit	(cached)
ok  	github.com/opencharly/sdk/loaderkit	(cached)
ok  	github.com/opencharly/sdk/proclifecycle	(cached)
?   	github.com/opencharly/sdk/proto	[no test files]
?   	github.com/opencharly/sdk/schema	[no test files]
?   	github.com/opencharly/sdk/schemaconcat	[no test files]
ok  	github.com/opencharly/sdk/spec	(cached)
?   	github.com/opencharly/sdk/sshx	[no test files]
ok  	github.com/opencharly/sdk/targetkit	(cached)
?   	github.com/opencharly/sdk/testkit	[no test files]
ok  	github.com/opencharly/sdk/vmshared	(cached)
$ task cue:gen
cue:gen: regenerated spec/{cue_types_gen.go,vocab_gen.go,version_gen.go}
$ git status --short
(clean — regeneration is a no-op on top of the committed generated files)

Attribution tier

analysed on a live system — the standalone battery actually ran and its
output is pasted above; this is an sdk-only wire-shape addition with the
runtime bed proof deliberately deferred to the charly consumer leg (see "How
R10-tested" — there is no sdk-side reader of these fields to execute live).
Not fully tested and validated because the changed code PATH (the actual
envelope-widening behavior) only executes in the consumer repo.

Harness rulebook compliance

  • R0 skills: /charly-internals:go (Schema Driven Design / CUE-sourced wire types), /charly-internals:git-workflow (cross-repo landing order).
  • R1 RCA + zero warnings: root-caused via a live reproduction in the charly consumer worktree (traced the exact nil/missing-candy failure to two independent HostBuild("resolved-project") call sites lacking the host's own ExtraCandyRefs widening); gate output above has zero warnings.
  • R2 no out-of-scope: both independent envelope-fetch sites (compile.go's compileDeployPlans AND plugin-installstep's getGenerator) fixed in this SAME cutover, not deferred — a second one was found mid-review and folded in immediately (commit 2092236).
  • R3 no duplication: all three new fields reuse the EXISTING ResolveOpts.ExtraCandyRefs naming/contract rather than inventing a parallel mechanism.
  • R4 no workaround: no sleep/retry/magic-number; a real missing-data widening, not a guard/skip.
  • R5 hard cutover + grep: N/A — no identifier removed/renamed, purely additive optional fields.
  • R6 git safety: no destructive git action taken.
  • R7 runtime gate: N/A for this sdk-only leg (see "How R10-tested"); the consumer leg runs the real bed gate.
  • R8 artifact invariants: N/A — no Containerfile/label generation touched.
  • R9 binary == source + deps: N/A — sdk ships no binary; no new runtime OS deps.
  • R10 disposable + coverage: the fix's actual disposable-bed coverage (check-addcandy-pod, check-stepkind-emit-pod) is proven on the charly consumer leg, owned by the K1-alpha orchestrator — not re-run here since this sdk-only diff has no independently-executable behavior.
  • RDD / ADE / SDD: SDD — this IS a schema change; task cue:gen regenerated cue_types_gen.go and re-running it is a no-op (git status clean), confirmed above. RDD — the root cause was found via a live reproduction (not a doc read) in the consumer worktree before this fix was written. ADE: N/A, no candy touched.
  • Hard cutover: this branch carries 4 commits (2 fixes + 1 CHANGELOG placeholder + this finalization) that will squash-merge into ONE atomic commit on sdk main; no Phase-2/deferred work left in this PR's scope.
  • Kernel/plugin boundary law: N/A — pure wire-envelope field additions (clause-E generic carrier fields), no kind-specific logic added to sdk.
  • Disposable-only autonomy: N/A — no destroy/rebuild performed by this PR.
  • Clean architecture + Go gates: go vet clean (pasted above); go build/go test green; GOWORK=off golangci-lint run ./... → 0 issues..
  • CHANGELOG: CHANGELOG/2026.205.2010.md staged (placeholder CalVer 2026.205.2010; the fresh pr-validator finalizes the real merge-time CalVer).

Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system)

…olved-project envelope

BLOCKING regression (charly superproject task #13): candy/plugin-bundle's
OpCompile handler re-fetches the resolved-project envelope independently via
HostBuild("resolved-project"), using only the project directory — never the
add_candy/--add-candy ref the host's own scanCandiesForRef already widened
its scan with (a synthetic-augmented ScanAllCandyWithConfig call, for a
REMOTE ref never reachable from any box's image closure). So a remote
add-candy resolved host-side (used to compute the compile order) was
completely absent from the plugin's own envelope, and BuildDeployPlan's
per-name lookup failed "candy not in resolved-project envelope".

Adds extra_candy_refs?: [...string] @go(ExtraCandyRefs) to BOTH
#ResolvedProjectRequest and #DeployCompileRequest, mirroring the existing
ResolveOpts.ExtraCandyRefs contract (already used elsewhere for a check
bed's own add_candy:) so a compile caller can widen the plugin's envelope
re-fetch the same way.

go build/vet/test green. task cue:gen reproducibility gate clean.
atrawog added a commit to opencharly/charly that referenced this pull request Jul 24, 2026
… envelope

BLOCKING regression (task #13): check-addcandy-pod and check-stepkind-emit-pod
both failed `charly bundle add` with "bundle compile: candy ... not in
resolved-project envelope" — --add-candy on a REMOTE candy ref (never
reachable from any box's own image closure, e.g.
@github.com/opencharly/charly/candy/pod-addcandy-marker:vTAG).

Root cause: candy/plugin-bundle's OpCompile handler (compileDeployPlans)
re-fetches the resolved-project envelope independently via
HostBuild("resolved-project"), using only the project dir. The host's own
pre-compile scan (bundle_add_cmd.go's scanCandiesForRef) already widens ITS
candy map for a remote add-candy ref via a synthetic-augmented
ScanAllCandyWithConfig call — but that widening was never threaded into the
plugin's separate envelope re-fetch, so a remote add-candy resolved
host-side (used to compute the compile `order`) was completely absent from
rp.Candies/rp.CandyModels, and BuildDeployPlan's per-name lookup failed.

Fix: threads the add-candy ref through as a NEW CUE-sourced
ExtraCandyRefs field (opencharly/sdk#101 -- #ResolvedProjectRequest +
#DeployCompileRequest both gain extra_candy_refs?: [...string], mirroring
the existing ResolveOpts.ExtraCandyRefs contract already used for a check
bed's own add_candy:):
- hostBuildResolvedProject threads req.ExtraCandyRefs into ResolveOpts.
- candy/plugin-bundle's compileDeployPlans threads r.ExtraCandyRefs into its
  own resolved-project envelope re-fetch.
- charly's compileSelectionViaPlugin gains an extraCandyRefs parameter;
  compileCandySelection (the add_candy / standalone-candy compile path)
  passes []string{ref.Raw}; compileBoxSelection (the primary image compile,
  unaffected) passes nil.

sdk gitlink repoints to 0612a9c (sdk#101, unmerged pending review — will
repoint to the merged/tagged commit once it lands, same drill as sdk#98/99/
100).

go build/vet/test green on charly + candy/plugin-bundle + sdk. 01af617
(vm-Raw fix) confirmed intact.
@atrawog

atrawog commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly-or-sdk Go (cross-repo producer leg — sdk schema/generated-code half of K1-α task #13; the charly consumer leg lands separately per B6, sdk-first)

Head SHA validated: 0612a9ca3feda2874aa245629b63b01fde9dfc81

Checklist

# Item Verdict
0 Security & anti-tampering (T1–T4) PASS — diff is exactly 2 CUE field additions + regenerated cue_types_gen.go + CHANGELOG; no scope mismatch, no secrets/exfiltration, no weakened guardrail, no embedded instruction to the validator
1 Description complete (template filled) FAIL — see below
2 Change-class gate matches evidence (R7/R10) PASS for the sdk-standalone gate (build/vet/test/lint/gofmt/cue:gen all independently re-run, see below); the runtime bed proof is legitimately deferred to the charly companion PR (same pattern as the prior merged sdk commit 10138c3 in this same K1-α program) — but the PR body never says this explicitly in the structured "How R10-tested" section, which ties back into #1
3 Attribution tier justified by proof FAIL — see below
4 R0 skills honored PASS — /charly-internals:go "Schema Driven Design (SDD)" + /charly-internals:plugin (per-plugin CUE schema, resolve-to-envelope pattern) both loaded and spot-checked; the change follows the documented CUE-source pipeline exactly
5 R1 RCA on every failure/warning; zero warnings PASS — go build/go vet/go test ./... all clean on my own re-run; golangci-lint run ./... = 0 issues; the one gofmt -l . hit (vmshared/cloud_init_iso.go) is confirmed pre-existing on origin/main, untouched by this diff — not a warning this PR introduces
6 R2 no pre-existing/out-of-scope split PASS — scoped, single-purpose fix
7 R3 no duplication PASS — independently grepped: ExtraCandyRefs genuinely mirrors the established charly/config.go:103 ResolveOpts.ExtraCandyRefs contract (used in charly/deploy_add_shared.go, charly/check_cmd.go, charly/builder_preresolve.go, charly/plugin_loader.go, charly/build_overlay.go); not a duplicated concept
8 R4 no ad-hoc workaround PASS
9 R5 hard cutover + grep self-test N/A — pure additive field, nothing removed/renamed to sweep
10 R6/R8/R9 artifact + binary integrity N/A — no destructive git action, no OCI-label/Containerfile surface, no deployed binary in the sdk repo itself
11 R10 disposable-only, fresh-rebuild, coverage PASS (for the sdk producer leg) — standalone battery re-run live by me (below); genuine runtime exercise is the charly consumer leg's job, consistent with how this exact K1-α program landed its prior sdk legs
12 RDD/ADE/SDD PASS — task cue:gen re-run live: zero diff, no drift; TestGenReproducible + TestGeneratedProtocolReproducible both re-run live, both PASS; the new field is a plain []string (no disjunction, no hand-written wire type, no unjustified @go(-)); ADE N/A (no candy touched)
13 Concurrency mandate + anti-cheat N/A — no shared-state path touched; no forbidden framing present
14 Hard cutover — one atomic commit PASS — git log origin/main..origin/feat/k1-alpha-addcandy-envelope shows exactly ONE commit (0612a9c) ahead of main; no Phase-2/TODO
15 Architecture gate — placement review PASS — placement: CORRECT. ExtraCandyRefs is generic request DATA on two existing (E)-envelope-shaped request structs (#ResolvedProjectRequest, #DeployCompileRequest), not a per-kind/provider-word API surface; no charly/*_aliases.go touched (sdk repo, not applicable); no new kit import (sdk repo). Per-item trace: N/A — no charly/*.go file is in this diff (sdk-only PR)
16 Disposable-only autonomy N/A
17 Clean architecture + Go gates PASS — GOWORK=off go build ./..., go vet ./..., go test ./... (all 12 testable packages green), golangci-lint run ./... (0 issues, isolated GOLANGCI_LINT_CACHE), go mod tidy && go mod verify (clean, no diff) all re-run live by me on the PR head
18 CHANGELOG present PASS — CHANGELOG/2026.205.2010.md staged; filename matches ^\d{4}\.\d{3}\.\d{4}\.md$; H1 # 2026.205.2010 — K1-alpha regression fix: --add-candy ref threaded into the resolved-project envelope byte-matches the # <CalVer> — <title> convention; placeholder CalVer does not collide with any existing tag or CHANGELOG/*.md on main (verified via git ls-remote --tags + ls CHANGELOG/)

Blocking findings

1. PR body fails the mandatory template (item 1). Fetched the org-wide template
(opencharly/.github/.github/PULL_REQUEST_TEMPLATE.md) and diffed it against the
actual PR body. The body has only a Summary and a 3-line Test plan checklist. It is
missing every one of these mandatory sections, each left completely blank rather than
filled or marked N/A — <reason>:

  • ## Change class — never stated (should be charly-or-sdk Go / cross-repo).
  • ## How R10-tested — present only as an unstructured 3-bullet list; missing the
    required sub-items verbatim: "Eval beds run — the EXACT beds + per-bed results",
    "Fresh rebuild" confirmation, "Did the CHANGED code path execute live?", and the
    "Concurrency" line (N/A would have been correct and sufficient here — but it isn't
    even present).
  • ## Attribution tier — entirely absent. No fully tested and validated /
    analysed on a live system / documentation reviewed line anywhere in the PR body.
  • ## Harness rulebook compliance — entirely absent. None of R0–R10, RDD/ADE/SDD,
    hard-cutover, kernel/plugin boundary law, disposable-only autonomy, clean-architecture,
    or CHANGELOG is answered with a one-line HOW (or N/A) in the PR body itself.
  • Trailing *Assisted-by: ...* line — absent from the PR body.

Per the pr-validator mandate: "a body that leaves any APPLICABLE section blank … FAILS,"
and "the burden is on the PR to supply the evidence, never on you to infer it." I
independently re-derived most of this evidence myself (the table above), but that is
MY verification, not a substitute for the PR supplying it — a future reader of this PR
cannot see the R0–R10 compliance reasoning anywhere the process requires it to live.

2. The commit carries no Assisted-by: trailer (item 3). git log -1 --format=%B 0612a9c on the PR head shows the raw commit message ends at "go build/vet/test green.
task cue:gen reproducibility gate clean." — no trailer at all. This is:

  • A violation of the git-workflow skill's mandatory commit template (B1 step 1:
    git commit -m "<conventional commit> ... Assisted-by: <Harness> <Provider Full Model Name> (<confidence>)").
  • Inconsistent with this exact branch's own prior history: the immediately-preceding
    commit on this same lineage, 10138c3 (already merged to main), DOES carry
    Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system) —
    proving the convention was known and followed one commit ago, then dropped.
  • CLAUDE.md "AI Attribution": "Any rule violation forbids commit. Period." A
    clearly-AI-assisted commit (the CHANGELOG entry it added even self-declares
    Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system),
    but that declaration lives only in prose inside the changelog file, not as the
    actual git trailer the policy requires) shipping with zero attribution on the
    commit itself is exactly the gap R0–R10 attribution enforcement exists to catch.

I did not invent or backfill a trailer on the author's behalf — the validator
carries forward what the author declares (git-workflow skill, CalVer section: "A
validator composing a squash-merge trailer preserves the authoring harness, full
provider model name, and proof-supported confidence"); there is nothing here to
preserve, and fabricating one from the CHANGELOG's self-declared prose would not be an
independently-verified fact.

What the author must fix

Append a fix commit (do not amend — the branch is pushed) that:

  1. Adds the missing template sections to the PR body (gh pr edit or update via the
    PR description) — Change class, the full structured How-R10-tested block, Attribution
    tier, and the R0–R10 + pillars rule-compliance table with a one-line HOW (or N/A — <reason>) per rule.
  2. Adds the Assisted-by: <Harness> <Provider Full Model Name> (<confidence>) trailer
    to the commit message (a real commit edit, e.g. an empty fix commit is insufficient —
    the trailer belongs on the substantive commit; reword via a fix commit that the
    evaluator's squash will fold in, or open the fix as its own commit carrying the
    trailer verbatim).

Everything I independently re-verified (build/vet/test/lint/gofmt delta/cue:gen
reproducibility/R3 mirroring/SDD compliance/CHANGELOG format/atomic-commit count) is
genuinely solid — this is a paperwork-completeness FAIL, not a code-correctness one.
Once the body and trailer are fixed, re-push and this re-runs.

Comments considered

None — the PR carries no comments.

Cross-PR interactions considered

  • opencharly/sdk — no other open PRs (this is the only one).
  • opencharly/charly#185 (docs: harness-neutral AGENTS) — none-found, no file/theme overlap.
  • opencharly/charly#118 (feat: P16 kernel-manifest gate) — none-found, no file/theme overlap.
  • opencharly/plugins#110 (docs: K5-A item 2 companion) — none-found, no file/theme overlap.
  • The charly consumer leg (a9dc2c7c on feat/k1-unblock-wave1, threading this sdk field through hostBuildResolvedProject/compileDeployPlans/compileSelectionViaPlugin) has no open PR yet — consistent with B6 ("land the producer FIRST"); nothing to coordinate against right now.

Decision

FAIL. Every technical check I could independently re-derive (build, vet, test,
lint, gofmt-delta, cue:gen reproducibility, R3 pattern-mirroring, SDD wire-type
compliance, atomic-commit count, CHANGELOG format/collision) passed on my own live
re-run. But the PR body omits every mandatory template section beyond Summary/Test-plan
(Change class, structured R10-tested block, Attribution tier, the full R0–R10+pillars
compliance table), and the commit itself carries no Assisted-by: trailer — both
explicit, unambiguous requirements this exact repo's own immediately-prior commit
satisfied. Not merged. charly/pr-validator posted failure on 0612a9ca.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)

…sing from plugin-installstep's own envelope

Follow-up to this branch's first commit (0612a9c): fixed the STANDARD
--add-candy compile path, but the add_candy-ON-POD-OVERLAY deploy path
(deploy-key != image-name, e.g. check-addcandy-pod) has a THIRD independent
"resolved-project" envelope fetch site that also needed the fix -
candy/plugin-installstep's getGenerator, used to render HOST-COUPLED
build-emit words (system-packages/builder/op) during an overlay build.

hostBuildOverlay (charly/build_overlay.go) already correctly widens its OWN
overlay Generator with ResolveOpts.ExtraCandyRefs = the deploy's add_candy
refs - but that widened candy set was never threaded into
plugin-installstep's SEPARATE envelope fetch, so an add_candy candy (never
reachable from any box's image closure) was present in the host's overlay
Generator.Candies but absent from the plugin's own re-fetch, and
candyByName's remote-candy fallback still missed ("candy not found" from
OCITarget.Emit).

Adds extra_candy_refs?: [...string] @go(ExtraCandyRefs) to #BuildEnv
(schema/buildwire.cue) - the wire struct the host already puts in op.Env
for an OpEmit Invoke - so charly's dispatchOCIStep (oci_step_emit.go) can
thread the host's own already-widened build.Generator.Candies key set
through, and plugin-installstep's getGenerator can use it to widen its own
resolved-project re-fetch identically.

go build/vet/test green; task cue:gen reproducibility gate clean.
atrawog added a commit to opencharly/charly that referenced this pull request Jul 24, 2026
…sing from plugin-installstep's own envelope

Completes task #13's fix: the STANDARD --add-candy compile path (compile.go)
was already fixed, but check-addcandy-pod's add_candy-ON-POD-OVERLAY deploy
path (deploy-key != image-name) hit a THIRD independent "resolved-project"
envelope fetch site — candy/plugin-installstep's getGenerator, used to
render HOST-COUPLED build-emit words (system-packages/builder/op) during an
overlay build — that also needed the fix.

hostBuildOverlay already correctly widens its OWN overlay Generator with
ResolveOpts.ExtraCandyRefs = the deploy's add_candy refs, but that widened
candy set was never threaded into plugin-installstep's SEPARATE envelope
fetch, so an add_candy candy was present in the host's overlay
Generator.Candies but absent from the plugin's own re-fetch —
candyByName's remote-candy fallback still missed, surfacing as
"OCITarget.Emit(<candy>): candy not found".

Fix (opencharly/sdk#101, follow-up commit 2092236): #BuildEnv gains
extra_candy_refs?: [...string] @go(ExtraCandyRefs). charly's dispatchOCIStep
(oci_step_emit.go) threads build.Generator.Candies' key set (the host's own
already-widened candy set) onto env.ExtraCandyRefs; plugin-installstep's
getGenerator threads env.ExtraCandyRefs into its own resolved-project
re-fetch the same way compile.go's fix already does for the standard path.

sdk gitlink repoints to 2092236 (sdk#101 follow-up, unmerged pending
review — will repoint to the merged/tagged commit once it lands).

go build/vet/test green on charly + candy/plugin-installstep +
candy/plugin-deploy-pod + sdk. 01af617 (vm-Raw fix) confirmed intact.
atrawog added 2 commits July 24, 2026 20:38
…fixes + pasted verification

Rewrites the placeholder CHANGELOG/2026.205.2010.md to cover BOTH commits on
this branch (0612a9c: the standard --add-candy compile path; 2092236: the
add_candy-on-pod-overlay path) with pasted fresh go build/vet/test output,
per the full PR review. Also backfills the missing AI-attribution trailer
this branch's first two commits omitted.

Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system)
pr-validator: rename CHANGELOG/2026.205.2010.md placeholder to the merge-time
CalVer and rewrite its H1 heading to match.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
@atrawog

atrawog commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (re-derivation on updated head)

Change class: charly-or-sdk Go (cross-repo producer leg — sdk wire-shape half of K1-α task #13)

Head SHA validated (pre-finalize): 31ba1119fdb4ffdb333a5babaad739dd98ab079e
Head SHA after CalVer finalization: 5dcc43e46940223842421e1efdca34d4be1ab3dd

This is a fresh, independent re-derivation on the updated branch — not a rubber-stamp
of the prior round. Both blocking findings from the previous verdict
(#101 (comment)) were re-checked
from scratch:

  • PR body template. Re-fetched the body live (gh pr view 101 --json body -q .body) and diffed it against opencharly/.github/.github/PULL_REQUEST_TEMPLATE.md
    section-by-section. Now present: ## Change class (states cross-repo + names the
    consumer leg + landing order), the full structured ## How R10-tested block with
    every sub-item explicitly answered or honestly N/A'd with reasoning (eval beds
    N/A — sdk has none of its own, correctly deferred to the charly consumer leg's
    check-addcandy-pod/check-stepkind-emit-pod; fresh-rebuild N/A — sdk ships no
    binary; changed-code-path execution explained — the reader is in the consumer repo
    only), ## Attribution tier (analysed on a live system, correctly reasoned —
    not inflated to fully tested and validated since the actual behavior only
    executes in the consumer), the full ## Harness rulebook compliance table
    (R0–R10 + RDD/ADE/SDD + hard-cutover + kernel/plugin boundary + disposable-only +
    clean-architecture + CHANGELOG, each with a real one-line HOW or a reasoned N/A),
    and the trailing *Assisted-by: ...* line. CURED.
  • Commit trailer. The branch gained two new commits since the last round:
    2092236 (a genuine second fix — a third independent envelope-fetch site,
    candy/plugin-installstep's getGenerator, found mid-review and folded into the
    SAME cutover rather than deferred, correctly per R2) and 31ba111 (a changelog
    finalization commit that explicitly backfills the attribution the first two
    commits omitted). 31ba111's own trailer —
    Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system)
    — matches the CHANGELOG's declaration and the PR body's Attribution-tier section
    exactly, so I am carrying that identity/confidence into the composed squash
    message (git-workflow skill: "a validator composing a squash-merge trailer
    preserves the authoring harness, full provider model name, and proof-supported
    confidence" — there is now something legitimate to preserve). CURED for the
    purpose that matters: the ONE commit that lands on main.

Full checklist (re-run live on 31ba1119, before my own CalVer-finalize commit)

# Item Verdict
0 Security & anti-tampering PASS — diff is 3 CUE field additions (resolvedproject.cue, seam.cue, buildwire.cue) + regenerated cue_types_gen.go + CHANGELOG; matches the description exactly, no scope mismatch, no secrets, no weakened guardrail
1 Description complete PASS (cured) — see above
2 Change-class gate matches evidence PASS — standalone battery is the correct/only gate for an sdk-only wire-shape leg; explicitly and honestly scoped in the body
3 Attribution tier justified PASS (cured) — see above; tier analysed on a live system matches the actual proof (standalone battery ran, no sdk-side behavioral execution exists to run)
4 R0 skills honored PASS — /charly-internals:go SDD + /charly-internals:plugin (per-plugin/host-coupled CUE contract) + /charly-internals:git-workflow (cross-repo landing order) all correctly applied
5 R1 zero warnings PASS — go build/go vet/go test ./... all green on my own live re-run of 31ba1119; golangci-lint run ./... = 0 issues (isolated cache); the one gofmt -l . hit (vmshared/cloud_init_iso.go) reconfirmed pre-existing on origin/main, untouched by this diff
6 R2 no split PASS — the third envelope-fetch site found mid-review was fixed in THIS SAME cutover (commit 2092236), not deferred — textbook R2 compliance
7 R3 no duplication PASS — all three new fields (resolvedproject.cue, seam.cue, buildwire.cue) reuse the identical extra_candy_refs?: [...string] @go(ExtraCandyRefs) shape/name, mirroring the pre-existing charly/config.go ResolveOpts.ExtraCandyRefs
8 R4 no workaround PASS
9 R5 grep/hard-cutover N/A — pure additive optional fields
10 R6/R8/R9 N/A — no destructive git action, no OCI/Containerfile surface, no binary in this repo
11 R10 disposable+coverage PASS for the sdk leg — standalone battery is the whole gate here; real coverage is the consumer leg's job (honestly stated, not claimed here)
12 RDD/ADE/SDD PASS — task cue:gen re-run live on 31ba1119: zero diff; TestGenReproducible + TestGeneratedProtocolReproducible both re-run live, both PASS; plain []string fields, no wire-type violation, no unjustified @go(-)
13 Concurrency N/A
14 Hard cutover PASS — will land as exactly ONE commit on main via squash regardless of the branch's own commit count
15 Architecture gate PASS — placement: CORRECT, generic (E)-envelope request/env-carrier fields, no charly/*.go in this diff (sdk-only PR), no provider-word leak (F11)
16 Disposable-only autonomy N/A
17 Clean architecture + Go gates PASS — go build/go vet/go test/golangci-lint(0 issues)/gofmt-delta/go mod tidy+verify all re-run live by me, all clean
18 CHANGELOG PASS — placeholder CHANGELOG/2026.205.2010.md staged with full pasted verification; no collision with any existing tag/CHANGELOG on main (re-verified fresh)

Comments considered

My own two prior verdict comments (the FAIL round and this PASS round) — not
external input, not weighted either way. No other comments on the PR.

Cross-PR interactions considered

Re-swept fresh: opencharly/sdk has no other open PRs; opencharly/charly#185
(docs) and #118 (P16 gate) — none-found, no overlap; opencharly/plugins#110
(docs) — none-found. The charly consumer leg (feat/k1-unblock-wave1, commits
a9dc2c7c + 067940bd per the PR body) still has no open PR — expected, B6
producer-first order.

Post-validation actions (Phase 3)

  • Finalized the merge-time CalVer: 2026.205.1841 (UTC at merge). Renamed
    CHANGELOG/2026.205.2010.md → CHANGELOG/2026.205.1841.md and rewrote its H1 to
    match — verified git show :CHANGELOG/2026.205.1841.md | head -1 byte-matches
    # 2026.205.1841 — ... before committing (caught and corrected the classic
    git mv-stale-pathspec footgun mid-flight: my first git add re-staged the OLD
    content because it named the now-gone old path alongside the new one — re-ran
    git add with only the valid path and re-verified).
  • Pushed the finalize commit (5dcc43e), a normal non-force push adding to the
    branch.
  • Re-posted charly/pr-validator = success on the new head 5dcc43e46940223842421e1efdca34d4be1ab3dd.
  • Proceeding to gh pr merge --squash --delete-branch, then tagging
    v0.2026205.1841 (sdk's Go-module scheme).

Decision

PASS. Merging.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)

@atrawog
atrawog merged commit 0eb86a1 into main Jul 24, 2026
@atrawog
atrawog deleted the feat/k1-alpha-addcandy-envelope branch July 24, 2026 18:43
atrawog added a commit to opencharly/charly that referenced this pull request Jul 24, 2026
…26205.1841)

The prior gitlink bump (d654a20) pinned the pre-merge feat/k1-alpha-addcandy-envelope
branch head (31ba111), which is orphaned once opencharly/sdk#101 merged (squash) as
0eb86a1, tagged v0.2026205.1841. Repoint to the actual merged, tagged commit.

Forward-verified: `git diff 31ba111 0eb86a1` shows only the CHANGELOG filename/title
rewrite to the merge-time CalVer (evaluator's standard squash-merge bookkeeping) — zero
content delta, so this is a pure descendant-wins gitlink advance, not a behavior change.

charly/go.mod's sdk require bumped v0.2026205.1618 -> v0.2026205.1841 to match (the
in-tree `replace github.com/opencharly/sdk => ../sdk` directive means this string is
non-load-bearing for local resolution, but kept in lockstep for out-of-tree consumers).

Verified (analysed on a live system, this worktree):
  $ go build ./charly/... ./candy/plugin-installstep/... ./sdk/...
  (clean)
  $ go vet ./charly/... ./candy/plugin-installstep/... ./sdk/...
  (clean)
  $ go test ./charly/... ./candy/plugin-installstep/... ./candy/plugin-bundle/... ./sdk/...
  ok  	github.com/opencharly/charly/charly	135.828s
  ok  	github.com/opencharly/charly/candy/plugin-bundle	(cached)
  ok  	github.com/opencharly/sdk (+ every subpackage)
  (candy/plugin-deploy-pod, outside go.work, re-verified standalone with GOWORK=off:
  build + vet clean)

This is the FINAL sdk gitlink target for the K1-alpha wave — no further sdk-side change
is expected for the add-candy overlay path (4b3d94e already reuses the merged
#BuildEnv.extra_candy_refs field with no new sdk schema needed).

Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system)
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.

1 participant