Repository navigation
feat(spec)!: add the packaging: section + the localpkg download-leg IR (Phase 0a) - #25
Conversation
…R (Phase 0a) Replaces the candy `localpkg:` source-dir map with the `packaging?: #Packaging` section (the single source of truth the `charly generate-packages` plugin reads to build distro packages), shrinks the `local_pkg` build vocabulary to the install machinery, and changes the LocalPkgInstallStep IR from the source-build form (PkgbuildRef/CandyDir/ProjectDir) to the download-leg form (PackageName/Version). - schema/candy.cue: localpkg: map → packaging?: #Packaging (+ #Packaging/ #PackagingVariant/#PackagingFormat defs; per-format nFPM names, variants map, default_variant, msix publisher/properties) - schema/distro.cue: #LocalPkg shrinks to install_template/probe/download_template (pkg_glob/source_sentinel/build_template/dep_builder removed) - spec/install_step_vocab.go: LocalPkgInstallStep IR → PackageName/Version - schema/deploy.cue + spec/install_step_view.go: view wire pkgbuild_ref/ project_dir → package_name/version - spec tests updated; task cue:gen regenerated (reproducible) - schema/version.cue: #SchemaVersion bumped (placeholder, validator finalizes) The migration ops land in the superproject's candy/plugin-migrate when the spec pin is bumped (step 3 of the cross-repo cutover; sdk is step 2). Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
pr-validator — CHANGES REQUESTED ❌Change class: contract-module (spec) — CUE schema ( Checklist (every rule):
Comments considered: none — the PR carried no comments. Cross-PR interactions considered: none-found — spec has only this PR open; sdk and plugins have no open PRs; charly#260 ( Decision: FAIL — not merged. The single blocking finding is item 1 (description completeness): the PR body is partially-filled. It must (a) paste the ACTUAL R10-gate command output (the Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
pr-validator — APPROVED ✅Change class: contract-module (spec) — CUE schema ( This is a RE-RUN. The prior validator FAIL was item 1 only (description completeness — no pasted gate output, no compliance section). The author has since updated the body with the actual gate output and a full "Harness rulebook compliance" section. No commit was added; the head SHA is unchanged. I independently re-ran every gate. Checklist (every rule):
Comments considered:
Cross-PR interactions considered:
Decision: PASS — every checklist item is green and independently re-verified. The single prior FAIL (description completeness) is fixed. Proceeding to finalize the merge-time CalVer, merge (squash), and tag. Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
pr-validator — merge completePhase 3 executed on PASS:
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
… CandyDir + LocalPkgBuildContext 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 deprecated `LocalPkg` surface before the sdk Phase 0b migration landed — breaking sdk main (e6950fa) and charly main, which still consume `LocalPkg()`/`LocalPkgFormats()`/the `localpkg:` map. This PR makes the completion additive: the deprecated surface is restored (kept until Phase 0b migrates the consumers off it) while the new `Packaging()` accessor and the `packaging?: #Packaging` wire field are added alongside. - `schema/candymodel.cue`: the `localpkg?: {[string]: string}` field is restored on #CandyModel (marked Deprecated, kept until the sdk's localpkg replacement migrates the consumers off it) alongside the new `packaging?: #Packaging` field. - `spec/candy_reader.go`: `LocalPkg(format)` + `LocalPkgFormats()` are restored (marked Deprecated) alongside the new `Packaging()` accessor. - `spec/cue_types_gen.go`: regenerated via `task cue:gen` (re-run on the committed tree is a no-op; TestGenReproducible green). CUE-sourced per SDD. - `CHANGELOG/2026.225.1800.md`: the cutover entry (final CalVer, finalized by the pr-validator at merge). The rest of the contract completion (the `CandyDir` anchor on `LocalPkgInstallStep`, the `LocalPkgBuildContext` on `EmitOpts`) is unchanged from the prior head — this PR only restores the deprecated surface the consumers still need. Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
Phase 0a of the nFPM packaging cutover
First repo of the four-repo cutover (spec → sdk → plugin → main) that replaces the
pkg/source-build packaging with the nFPM-basedcharly generate-packagesplugin. This PR lands the CUE schema + the InstallPlan IR change the plugin and the sdk depend on.Changes
schema/candy.cue: thelocalpkg?: {pac, rpm, deb}map →packaging?: #Packaging— the native-package metadata section (name/description/maintainer/homepage/license/section/priority +variants:map of named plugin-set variants + per-formatformats.<fmt>deps/optdepends/recommends/suggests +default_variant+ msix publisher/properties). Per-format keys use the nFPM format names (deb/rpm/apk/archlinux/ipk/msix). Kind-blind (any candy may declare it).schema/distro.cue:#LocalPkgshrinks to the install machinery —pkg_glob/source_sentinel/build_template/dep_builderremoved;install_template/probe/download_templatestay.spec/install_step_vocab.go:LocalPkgInstallStepIR → the download-leg form (PackageName/Version;PkgbuildRef/CandyDir/ProjectDirremoved).schema/deploy.cue+spec/install_step_view.go: view wirepkgbuild_ref/project_dir→package_name/version.spec/cue_types_gen.go: regenerated viatask cue:gen(reproducible;TestGenReproduciblegreen).schema/version.cue:#SchemaVersionbumped (placeholder2026.225.0000, finalized by the pr-validator at merge). The migration ops land in the superproject'scandy/plugin-migrate/migrations.cuewhen the spec pin is bumped (step 3 of the cross-repo cutover; sdk is step 2).Verification (actual output)
go build ./...:go test -count=1 ./...:task cue:gen(reproducibility — second run is a no-op;git statusclean after):TestGenReproducible:gofmt -l .:go vet ./...:golangci-lint run ./...(GOWORK=off, fresh GOCACHE — the module's own go.mod, no workspace):Harness rulebook compliance
/charly-internals:go+/charly-internals:plugin(SDD + schema-change recipe) before touching the CUE schema.$WORKon the/tmptmpfs (EDQUOT, fixed withGOTMPDIR), uninitialized box submodules in the worktree, and a stale GOCACHE entry pointing at a removed sibling worktree (golangci-lint'sgo/packagesloader replayed cachedgo listoutput; a fresh GOCACHE +GOWORK=off→ 0 issues). None are code defects.packaging:schema is defined once inschema/candy.cue; the IR change is single-source (the sdk download leg + the plugin consume it, never a second copy).localpkg:map + thelocal_pkgbuild fields are removed here; the fullpkg/submodule +box pkgsurface removal lands in the main-repo cutover (Phase 3), which this schema is the prerequisite for.feat/packaging-section), 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).localpkg:map is removed and replaced by the generic, kind-blindpackaging:section — no per-format logic in the kernel.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)