Repository navigation
feat(core)!: K3 ready-now opener — dissolve alias residue + calamares_types + dead code - #137
Conversation
…ares_types + dead code Core-minimization K3 (build-engine lane), the READY-NOW half decoupled from the engine-relocation spike: - ZERO-ALIASES dissolution: delete all ~23 remaining charly/*_aliases.go / *_alias.go files (deploykit_*, kit_*, buildkit_aliases, ssh_config_aliases, build_stage_atomic) and labels.go's 44-entry LabelX alias block + install_plan.go's Scope/Venue/Phase/StepKind/Gate/ReverseOp*/InstallStep alias slice. Every call site now references spec.*/deploykit.*/kit.*/ buildkit.* directly — an alias is always residue regardless of what it aliases. The handful of real (non-alias) symbols each file carried — 3 init() DI hooks, 4 reverse-executor methods, 3 utility functions — were relocated to the semantically nearest existing file (checkspec.go, egress.go, bundle_add_cmd.go, shell_profile.go, checkrun_act.go) rather than deleted or left as orphaned alias-named files. - calamares_types.go dissolution: PackageNames/PackageItemsFromStrings moved to sdk/spec (alongside the PackageItem type they operate on); the file is deleted and its 3 callers in layers.go repoint to spec.*. - R5 dead-code removal: layers.go's NeedsGit()/HasPypiDeps() (zero callers anywhere in the tree). Candy struct relocation to sdk/buildkit was investigated and DEFERRED to the engine-relocation spike: its field types are already sdk-hosted (via the vmshared aliases), but its construction (ScanCandy/scanCandy/parseCandyYAML) is genuinely loader-coupled, the same dependency the spike addresses head-on. Gate: go build/vet/test/lint clean on both charly and sdk (fresh `task build:binary`, `go test ./...`, `golangci-lint run ./...`); a live `charly box generate` run against check-k8s-deploy-app produced a correct Containerfile end-to-end, proving the change didn't disturb the existing CandyModel/EmitTasks emission path. Assisted-by: Claude Sonnet 5 (analysed on a live system)
charly/buildkit_aliases.go was deleted by the prior K3 commit (f1bc841); format_config.go's own doc-comment and candy/plugin-vm/vm_move_aliases.go's comment both still named it as an existing alias surface. Documentation divergence surfaced by the same cutover that caused it — swept in the same working tree per R1/R2 rather than deferred. Assisted-by: Claude Sonnet 5 (analysed on a live system)
candy_model_accessors.go's header claimed the Candy struct stays in charly because "the compiler depends on the abstraction" — but an interface never pins its implementer's location; deploykit.CandyModel is already consumed plugin-side today (render.go, graph_shim/intermediates_shim). The real reason Candy's construction stays host is that ScanCandy/scanCandy/ parseCandyYAML call the loader (a genuine core Mechanism), confirmed by the K3 build-engine investigation. Corrected the comment to state that. Assisted-by: Claude Sonnet 5 (analysed on a live system)
sdk PR #61 (feat(spec): add PackageNames/PackageItemsFromStrings) merged as 7275884, tagged v0.2026197.2042 — the K3 calamares_types.go relocation's producer half. Bumps the gitlink to the merged commit and charly/go.mod's require version to match (in-tree resolution rides the replace directive; the require version matters for out-of-tree consumers). Assisted-by: Claude Sonnet 5 (analysed on a live system)
# Conflicts: # charly/status_collect_vm.go # charly/status_collect_vm_test.go
…ferences The R5 grep self-test for the K3 alias dissolution (f1bc841) surfaced 9 more stale comments naming deleted alias files in present tense ("aliased in kit_aliases.go" / "re-points ... deploykit_pod_aliases.go" / etc.) across check_feature_run.go, check_members.go, checkspec.go, cue_loader.go, quadlet.go, secrets.go, sidecar.go, volumes.go, and candy/plugin-secrets/aliases.go. Every one now states the current, correct fact: the symbol is referenced directly (kit.X / deploykit.X), not through a deleted alias file. `git grep` for every deleted alias filename now returns only the two already-correct past-tense mentions (K3 dissolved ...) plus CHANGELOG/ history. Assisted-by: Claude Sonnet 5 (analysed on a live system)
Placeholder CalVer filename per convention; the pr-validator finalizes the stamp (git mv to the real merge-time CalVer) at merge. Assisted-by: Claude Sonnet 5 (documentation reviewed)
pr-validator — APPROVED ✅Head SHA validated: Change class: What this PR does (independently confirmed, not re-stated on trust)Deletes all 24 remaining Independent verification (fresh, unique worktree
|
Assisted-by: Claude Sonnet 5 (fully tested and validated)
…tus-android # Conflicts: # charly/status_collect_adb.go # charly/status_collect_adb_test.go # charly/status_substrate.go
…verdict Fresh PR-validator pass on a fresh worktree: rebased feat/k5-status-android onto origin/main (#137's K3 alias-dissolution merged first), re-verified build/vet/test/lint clean on both modules post-rebase, re-ran the live status smoke tests against a fresh rebuild, and accepted the already-green check-group + check-k8s-deploy R10 bed roster as the risk-proportional delta re-gate (the #136/#137 file overlap is pure type-alias/relocation, confirmed by diff). Documents the check-android-emulator-pod bed's environmental host/image block (rootless-podman fuse + missing gsettings-desktop-schemas) transparently rather than silently, and flags a non-blocking test-hygiene finding for a future batch. Finalizes the merge-time CalVer 2026.197.2104 -> 2026.197.2224 and upgrades the tier to fully tested and validated. Assisted-by: Claude Code Claude Sonnet 5 (fully tested and validated)
… plugin-substrate Completes the status-collector generalization (the 3rd and final substrate after vm+k8s, #135): moves charly/status_collect_adb.go's android device collector into candy/plugin-substrate, following the exact vm/k8s pattern. This deletes the last SubstrateCollector in-proc registrant, so charly/status_substrate.go collapses to a bare CollectOpts data-carrier — the SubstrateCollector interface, collectorFactory, substrateFactories, and registerSubstrate are ALL deleted, and collectFlat's worker-pool concurrency fan-out is gone entirely. Net -214 additional LOC from charly/ core (combined -490 with #135 for the full 3-substrate move). Rebased onto #137 (K3 alias-dissolution). During independent validation, a genuine test-isolation defect was found in TestCollectAndroidStatus_Rows (it reused the real committed check-android-emulator-pod bed name and called the real, un-mocked containerRunning, so it nondeterministically failed under concurrent host state) — routed back to the author, fixed at the root cause (containerRunning is now a swappable var, the test stubs it, the fixture uses a test-only name), and re-proven by running the test with a real, identically-named container deliberately up on the host. The vm/k8s/pod/local collapse is proven via the R10 disposable-bed roster (check-group + check-k8s-deploy, both green with fresh-rebuild cycles); the android collector via a real live invocation against the genuinely declared check-android-emulator-pod bed. The live-running-emulator proof remains an environmental host/image block (rootless-podman fuse limitation + missing gsettings-desktop-schemas), independent of this PR. Assisted-by: Claude Code Claude Sonnet 5 (fully tested and validated)
Summary of changes
K3 (build-engine lane) core-minimization cutover, the READY-NOW half decoupled from the engine-relocation spike:
charly/*_aliases.go/*_alias.gofiles (ZERO-ALIASES dissolution) — every call site now referencesspec.X/deploykit.X/kit.X/buildkit.Xdirectly. The handful of real (non-alias) symbols each file carried (3init()DI hooks, 4 reverse-executor methods, 3 utility functions) were relocated to the semantically nearest existing file, not deleted.labels.go's 44-entryLabelXalias block andinstall_plan.go's ~35-symbol Scope/Venue/Phase/StepKind/Gate/ReverseOp*/InstallStep alias slice.calamares_types.go(its 2 functions moved tosdk/specvia sdk PR docs(autonomy): context-exhaustion is a forbidden excuse; "fresh context" = DELEGATE #61, merged as7275884/v0.2026197.2042— this PR bumps the sdk gitlink +go.modrequire to match, and repointslayers.go's 3 callers).layers.go's deadNeedsGit()/HasPypiDeps()(zero callers).candy_model_accessors.go's header wrongly justifiedCandystaying core via "the compiler depends on the abstraction" — corrected to the real reason (construction calls the loader). 9 more comments across 8 files + 2 candy plugins named now-deleted alias files in present tense — swept.Candystruct →sdk/buildkit(construction genuinely loader-coupled, deferred); the build engine itself (found ALREADY relocated tosdk/deploykit+candy/plugin-buildin an earlier wave — see CHANGELOG "K3 spike verdict");intermediates.go's auto-intermediate DAG orchestration (design complete and confirmed movable, but its 1534-line test suite has noCandyModelfake to migrate onto — scoped as its own follow-on cutover, not folded in here).origin/main's concurrent K5-lane-A landing (vm+k8s status collector relocation) mid-flight: resolved 2 modify/delete conflicts by taking the deletion, repointed one new test file'sBundleConfigreference todeploykit.BundleConfig.Precise deletion list (verify each against reality — do not trust the summary alone)
Scope confirmation: these 24 files are exactly the ones team-lead's original K3 brief named ("your ~22 P15 alias files (deploykit_*/kit_*/buildkit_aliases/ssh_config_aliases/deploykit_pod_aliases/calamares_types) + labels.go's + install_plan.go's alias slice + build_stage_atomic.go") — K3 build-engine-scoped calamares relocation + core-alias residue. This is NOT the separate, parked
#52"K4 consumer-move" wave (a different, not-yet-executed wave with its own owner) — zero files here were claimed by or borrowed from that wave.24 files deleted in commit
f1bc841(git show f1bc841 --diff-filter=D --name-only):22 of these carry the
*_aliases.go/*_alias.gonaming (puretype X = spec.X/var x = kit.Yre-export files);build_stage_atomic.goandcalamares_types.goare named differently but are the same class (a 2-symbol alias file, and a dead-weight relocated-content file, respectively) — both explicitly named in the original brief. Verify GONE:git show HEAD:<path>on any of the 24 must errorpath does not exist. Verify no dangling consumer:git grepfor each bare alias symbol name (e.g.InstallPlan =,DeployExecutor =) outsidesdk/returns nothing incharly/. Verify build green: pasted below.layers.go's deadNeedsGit()/HasPypiDeps()are function-level deletions WITHIN a kept file — pre-deletion,git grep -rn 'NeedsGit(\|HasPypiDeps('in the base commit found zero callers anywhere in the tree outside their own definitions; post-deletion, the same grep on this branch returns nothing at all.labels.go's 44-entryLabelXalias block andinstall_plan.go's ~35-symbol alias slice are block-level deletions within kept files (both files retain their real, non-alias content).Full narrative:
CHANGELOG/2026.197.2300.md.Change class
cross-repo — sdk half (PR #61) already merged; this is the charly consumer half. Landing order per B2: sdk (done) → this PR.
How R10-tested — exact gate, commands, and pasted output
charlyGo code touching build-engine/install-plan/deploy-execution surfaces broadly —go test ./...+task build:binary(R9) +charly check run <bed>for the bed whose kind matches the touched code paths (build + deploy + install-plan + labels):check-pod.check-pod | pod (box/fedora) | ok | 12 steps | 319s. Binary version2026.197.2101(built fresh viatask build:binaryfrom this branch's HEAD, confirmed viacharly versionBEFORE the run). Run CalVer2026.197.2113. Not a cross-cutting loader/resolver/IR change requiring the full concurrent roster — this touches build/deploy/install-plan specifically, whichcheck-pod(candy image build + candy layer composition order +kind: podruntime + every DeployTarget rendering path) directly exercises.charly updatefresh-rebuild step (update (fresh rebuild) | ok=true | 47s), followed by a fullfeature-run-rebuildpass (24 steps, 21 passed, 0 failed, 3 skipped — all 3 skips are benign: 1 unbound agent-check, 2 build-context-only steps correctly inactive live).check-live/feature-run-rebuildexercisedcheck-compose-order(candy layer composition — install-plan's dissolved Scope/Venue/Phase/Gate types flow through this),check-port-listening/check-service-running(kind:pod runtime),status-shows-pod(DeployTarget rendering — the relocated reverse-executor methods inbundle_add_cmd.go), and every built-in plugin-verb dispatch, ALL on the fresh rebuild, not merely compiled.Attribution tier
fully tested and validated— all 10 Testing Standards met, the check-pod R10 bed passed on a fresh rebuild with the changed code paths (build engine, install-plan, labels, deploy reverse-ops) actually exercised.Assisted-by: Claude Sonnet 5 (fully tested and validated)
Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)/charly-internals:go,/charly-internals:plugin(the kernel/plugin boundary law — ZERO-ALIASES),/charly-internals:install-plan,/charly-internals:generate-source,/charly-internals:strict-policy,/charly-internals:git-workflow,/charly-check:checkwere consulted throughout.ComputeIntermediateswas caught by tracing its actual callers before committing, and reverted cleanly rather than shipped); build/test/lint clean at zero warnings throughout.intermediates.go's move and thelocalpkg.godeploy-executor half were explicitly evaluated and are NOT included here (documented reasons in the CHANGELOG), not silently dropped.git grepfor every deleted alias filename returns only 2 correctly-past-tense mentions + CHANGELOG history (pasted above) — the full self-test, including a second pass that caught 9 more stale references beyond the primary deletion commit.git status/git diff --statchecked before every destructive action; the merge conflict resolution usedgit rm(explicit) not a blind overwrite.go test— pasted above.image-buildstep did produce and validate a real Containerfile.charly version(2026.197.2101) confirmed matching this branch's HEAD before the bed ran; no new runtime OS dependency introduced.check-podisdisposable: true; ran to a fresh rebuild; the change ships no new FUNCTIONALITY (a pure relocation), so the existing full test suite + the live bed IS the coverage that would fail if the dissolution broke a call site.ComputeIntermediatesrelocation's design was proven correct via live tracing before any code was committed, then explicitly NOT shipped once the test-coverage gap was found (a spike that discovered scope, not an excuse to skip). ADE/SDD: N/A — no candy/plan or CUE schema touched in this PR (the sdk half'sPackageNames/PackageItemsFromStringsaddition already landed via docs(autonomy): context-exhaustion is a forbidden excuse; "fresh context" = DELEGATE #61).sdk/deploykit+candy/plugin-build, not core.disposable: truetarget only.gofmt -l .clean (via the mechanicalgofmt -rrewrite passes),golangci-lint run ./...= 0 issues,go vetclean,go test ./...green — all pasted above.CHANGELOG/2026.197.2300.mdstaged (placeholder CalVer; the pr-validator finalizes it at merge).