Repository navigation
docs: correct two comments asserting the removed directory: field - #117
Conversation
Review of the sibling plugins PR ran a whole-tree sweep and found four live present-tense comments still describing a `directory:` candy field that does not exist - it is absent from spec/schema/candy.cue, from the generated spec types and from the loader, and charly/layers.go hard-errors on it. Two of the four are here. candy_stage.go called the non-default-SourceDir branch a "directory: override". The branch is real but the attribution is not: SourceDir differs from the default for remote (@github) and submodule-vendored candies, never a redirect field. finalize_candy.go said candy_file globbing "honors directory:". It is anchored at the candy's scanned SourceDir; there is nothing to honor. Comment-only; no behaviour change. Assisted-by: Claude Code Claude Opus 5 (documentation reviewed)
Verdict: CHANGES REQUESTEDFresh evaluator; I authored none of this and verified every claim independently. The premise is sound and one of the two comments is correct — but the PASS — the premise (verified independently, not taken from the body)The
So both original comments were wrong and correcting them is right. PASS —
|
Review blocked the first replacement as differently-wrong, and it was right. I said the non-default-SourceDir branch fires for "a remote (@github) or submodule-vendored candy". A remote candy can never reach it: CandyCopySource early-returns on `if layer.GetRemote()` as its FIRST statement, nine lines above, and loaderkit/scan_candy.go sets Remote unconditionally on the @github fetch path. Submodule-vendored candies arrive through @github import pins too, so they are remote by the same route and also return early. I traded one wrong story for another - correcting a false comment with a plausible-sounding replacement I had not traced. What actually reaches the branch is a LOCAL candy whose SourceDir is not <root>/candy/<ref>: an inline candy takes its declaring charly.yml's directory as SourceDir (scanFromParsed), and a discover: entry can point somewhere other than candy/. The comment now says that, and the enumeration is deliberately partial rather than a list I cannot defend. loaderkit/finalize_candy.go was verified accurate as first written and is unchanged. GOWORK=off go build ./... exit 0; go test ./deploykit/... ./loaderkit/... pass; diff is comment-only (zero executable lines). Assisted-by: Claude Code Claude Opus 5 (documentation reviewed)
…es, cloud-init provisioning fixes Relocate the sdk import-purity leg of #55: value types (ResolvedBox, BundleConfig, ledger records, CloudInitRuntimeParams, the matcher/capability engine) move to CUE-sourced spec/spec, with thin re-export aliases kept in sdk so the 85+ out-of-tree plugin candies compile unchanged during the migration window. Engine test suites relocate from charly to sit beside the engines they prove (deploykit, kit, loaderkit). The cloud-init provisioning chain switches to a scoped pacman refresh (-Sy --needed) plus an idempotent sshd try-restart guard, replacing a full -Syu that destabilized live VM guests. Chain: spec#13 (merged v0.2026215.1748) -> sdk (this PR) -> plugins#123 / pkg-arch#6 (both merged) -> charly#204 (the super terminus, open, depends on this merge). Round-1 pr-validator FAIL (a live unparam finding in a newly-added test file, deploykit/effective_version_test.go) fixed by dropping the dead spec.CandyView parameter from newTestCandy across all 4 call sites; verified independently on a fresh clone with an isolated golangci-lint cache: 0 issues. Full module gate (go build/vet/test, gofmt, golangci-lint) re-run green by two independent validator passes (pre- and post- gh pr update-branch, empty file overlap with the concurrent #117 doc fix). Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)
Summary of changes
Two Go comments in this repo asserted a
directory:candy field that does not exist. Comment-only; zero executable lines changed.loaderkit/finalize_candy.go:62— saidcandy_fileglobbing "honorsdirectory:". It is anchored at the candy's scannedSourceDir; there is nothing to honor.deploykit/candy_stage.go:26— called the non-default-SourceDirbranch a "directory:override".Review round 1 blocked my first replacement of the second one as differently-wrong, and was right. I wrote that the branch fires for "a remote (
@github) or submodule-vendored candy". It cannot:CandyCopySourceearly-returns onif layer.GetRemote()as its first statement, andloaderkit/scan_candy.gosetsRemoteunconditionally on the@githubfetch path — so remote candies return.build/_candy/…and never evaluate that branch. Submodule-vendored candies arrive via@githubimport pins, so they are remote by the same route. I had corrected a false comment with a plausible-sounding replacement I had not traced.What actually reaches it is a local candy whose
SourceDiris not<root>/candy/<ref>— an inline candy takes its declaringcharly.yml's directory asSourceDir(scanFromParsed), and adiscover:entry can point somewhere other thancandy/. The comment now says that, with a deliberately partial enumeration rather than a list I cannot defend.Change class
docs-only (Go comments).
How R10-tested — exact gate, commands, and pasted output
N/A (comment-only; no code path changes).N/A (no binary built from this repo).N/A — no code changed.The branch's reachability was traced statically and is the subject of the fix.N/A.Attribution tier
documentation reviewed— the diff is entirely comments, proven above by the non-comment-line filter returning nothing.Harness rulebook compliance
/charly-internals:plugin,/charly-image:layer,/charly-internals:git-workflow.*.md, which cannot match a Go comment by construction. The root cause was the scope. The round-1 finding here was likewise root-caused (early return onGetRemote()) rather than reworded.N/A— nothing executable.git grepdoes not cross gitlinks) shows only negating references surviving — the loader's hard-error string,plugin-box's "was removed", this file's "Not adirectory:redirect", and the skill documenting the removal — plus Traefik's unrelateddirectory:file-provider key and… directory:error strings.git statuschecked, commits appended, no force-push.N/A— comment-only; no runtime path; no bed applies.N/A.Cross-repo landing order
docs#2merged (v2026.215.1210). This PR andplugins#119are independent;charly#203lands last. charly#203 pins no sdk commit from this branch, so this merge orphans nothing.Assisted-by: Claude Code Claude Opus 5 (documentation reviewed)