Repository navigation
feat(spec)!: complete the packaging contract — Packaging() accessor + CandyDir + LocalPkgBuildContext - #26
Conversation
… CandyDir + LocalPkgBuildContext
The Phase 0a packaging cutover left the contract surface incomplete: the
CandyModel wire form still carried the removed `localpkg:` map, CandyReader
still exposed LocalPkg()/LocalPkgFormats(), and the dev-local-pkg build
context + the LocalPkgInstallStep candy anchor were missing. This completes
the packaging contract the sdk/packagekit + localpkg-replacement work
(Phase 0b) consumes:
- schema/candymodel.cue: drop the stale `localpkg?: {[string]: string}`
field from #CandyModel (drift from Phase 0a) and carry the candy's
`packaging:` section as `packaging?: #Packaging` so the specCandyAdapter
can implement CandyReader.Packaging().
- spec/candy_reader.go: Packaging() *Packaging replaces LocalPkg(format) —
the single source of truth for distro package metadata + variants; nil
when the candy declares none (the deploy-plan compiler then emits no
LocalPkgInstallStep for it). LocalPkgFormats() removed.
- spec/install_step_vocab.go: LocalPkgInstallStep gains CandyDir — the
candy's source dir, the anchor for the candy's charly.yml (the `--candy`
input the dev-local-pkg build passes to `charly generate-packages`).
- spec/deploy_executor.go: EmitOpts gains LocalPkgBuild *LocalPkgBuildContext
— the in-development binary + plugins + CalVer + arch + charly.yml the
executor uses to build the in-development package via the plugin.
- spec/cue_types_gen.go: regenerated (task cue:gen, reproducible).
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
pr-validator — CHANGES REQUESTED ❌Change class: charly-or-sdk Go (spec contract repo — Head SHA validated: Checklist (every rule)
Blocking findingsB1 — Cross-repo cutover breaks both consumers'
There are no coordinated sibling PRs in the sdk repo (zero open PRs) to migrate the consumers. Merging this PR leaves both consumers' B2 — PR body does not follow the mandatory template (item 1). Missing Change class, How R10-tested (with pasted output), Attribution tier, and the Harness rulebook compliance section. The template's own warning applies: a body that leaves applicable sections blank FAILS. B3 — No CHANGELOG entry (item 18). A runtime-tier change must stage B4 — Attribution tier unsubstantiated (item 3). Comments consideredNone — the PR carries no comments. Cross-PR interactions considered
DecisionFAIL — not merged. The author must: (1) resolve the cross-repo breakage (additive change or coordinated consumer migrations with the consumers' PRs ready), (2) fill the mandatory PR template with the Change class, How R10-tested (pasted output), Attribution tier, and rule-compliance sections, and (3) stage a Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
… (additive)
The packaging-contract completion removed LocalPkg()/LocalPkgFormats() and the
CandyModel localpkg: map, but sdk main (e6950fa) and charly main (d2221f4f)
still consume them — the removal breaks the consumers before the sdk Phase 0b
migration lands. Make the change additive: restore the deprecated surface
(kept until Phase 0b migrates the consumers off it) while adding Packaging().
- schema/candymodel.cue: restore localpkg?: {[string]: string} (deprecated)
alongside packaging?: #Packaging.
- spec/candy_reader.go: restore LocalPkg(format) + LocalPkgFormats()
(deprecated) alongside Packaging().
- spec/cue_types_gen.go: regenerated (task cue:gen, reproducible).
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
…tion Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
pr-validator — APPROVED ✅Change class: code/config (spec contract surface — CUE schema + CandyReader interface + generated Go) Head SHA validated: Checklist (every rule)
Comments considered
Cross-PR interactions considered
DecisionPASS. The additive restoration resolves the prior validator's cross-repo breakage: the deprecated Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
Rename the placeholder CHANGELOG/2026.225.0000.md to the merge-time CalVer 2026.225.1800 and rewrite the H1 to match. Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
pr-validator — merge complete
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
Change class
Code/config (spec contract surface — CUE schema + CandyReader interface + generated Go).
What
The Phase 0a packaging cutover (spec #25) landed the
packaging:section + the localpkg download-leg IR, but the follow-up that completed the contract surface removed the deprecatedLocalPkgsurface before the sdk Phase 0b migration landed — breaking sdk main (e6950fa) and charly main (d2221f4f), which still consumeLocalPkg()/LocalPkgFormats()/thelocalpkg:map. This PR makes the completion additive: the deprecated surface is restored (kept until Phase 0b migrates the consumers off it) while the newPackaging()accessor and thepackaging?: #Packagingwire field are added alongside.schema/candymodel.cue: thelocalpkg?: {[string]: string}field is restored on#CandyModel(marked Deprecated, kept until the sdk's localpkg replacement migrates the consumers off it) alongside the newpackaging?: #Packagingfield.spec/candy_reader.go:LocalPkg(format)+LocalPkgFormats()are restored (marked Deprecated) alongside the newPackaging()accessor.spec/cue_types_gen.go: regenerated viatask cue:gen(re-run on the committed tree is a no-op;TestGenReproduciblegreen). CUE-sourced per SDD.CHANGELOG/2026.225.0000.md: the cutover entry (placeholder CalVer, finalized by the pr-validator at merge).The rest of the contract completion (the
CandyDiranchor onLocalPkgInstallStep, theLocalPkgBuildContextonEmitOpts) is unchanged from the prior head — this PR only restores the deprecated surface the consumers still need.How R10-tested
The spec module has no disposable beds; the change-class gate for a schema/IR change is the module test suite + generation reproducibility. All run in the spec worktree with
GOWORK=off(the charly rootgo.workwould otherwise resolve the module root to the main checkout) and a fresh GOCACHE (a stale cache replaysgo listoutput from a sibling worktree — the same environmental issue PR #25 documented).go build ./...:go test -count=1 ./...(default TMPDIR — the sweep tests create temps in$TMPDIRandSweepStaleTempsglobs only/tmp/, so a non-default TMPDIR makes them fail environmentally):task cue:gen(reproducibility — second run is a no-op;git statusclean after):gofmt -l .:go vet ./...:golangci-lint run ./...(GOWORK=off, fresh GOCACHE — the module's own go.mod, no workspace):Attribution tier
analysed on a live system— the changed runtime path (the spec contract surface the sdk + charly consumers compile against) ran live: the full module test suite + generation reproducibility passed with pasted output above. The complete fresh-rebuild R10 (disposable distro beds) belongs to the consumer cutovers (sdk Phase 0b, plugin Phase 0, main Phase 3), which this PR is the prerequisite for.Harness rulebook compliance
/charly-internals:go+/charly-internals:plugin(SDD + schema-change recipe) before touching the CUE schema.procsweep tests fail whenTMPDIRis non-default (the sweep globs only/tmp/, the tests create temps in$TMPDIR), and golangci-lint replayed a stale GOCACHE entry pointing at a sibling worktree (fresh GOCACHE +GOWORK=off→ 0 issues). Neither is a code defect.packaging:schema is defined once inschema/candy.cue; the deprecatedLocalPkgsurface is a single restoration, not a second copy.LocalPkgsurface is NOT removed here — it is kept (marked Deprecated) until the sdk Phase 0b migration removes it, so the consumers keep compiling. The fullpkg/submodule +box pkgsurface removal lands in the main-repo cutover (Phase 3).feat/packagekit-sdk-followup), no force-push, no direct push tomain; PR-only landing.cue:genreproducibility, both green.task cue:genregenerates content-identically (TestGenReproduciblegreen, second run a no-op).LocalPkgsurface is a temporary additive restoration, not a new per-format kernel path; thepackaging:section is the generic, kind-blind replacement.packaging?: #Packagingis kind-blind (any candy may declare it); no per-kind field-read or switch added to the kernel.Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)