Repository navigation
refactor(check): core consumes the kit tag-expression surface (P5-unit-1 consumer) - #52
Conversation
…t-1 consumer) Consumer half of sdk v0.2026191.1413. First unit of P5 (check-engine SDK-ization). charly/description_tagexpr.go (298 lines) is deleted, and the tag-set helpers (normalizeTag, EffectiveTags) leave charly/description_spec.go. Core binds to the kit implementation through the established charly/kit_aliases.go alias surface, so planTagFilter, RunPlan and check_runner_live.go are unchanged. The grammar lives ONCE, so a plugin candy filters a plan by tag with the same semantics the check engine uses instead of re-implementing it. What P5 actually is, versus what the plan said. The approved plan describes P5 as relocating ~25 files behind "the ONE named blocker: verb resolution". That is not executable as written; the operator approved an amended HOW (end-state unchanged, seam rewritten). Verified against the source, not assumed: - Runner CANNOT move. It is defined in charly/checkrun.go, but EIGHT of its methods are declared in files the plan keeps in core (provider_checkenv.go:78,136; k8s_config.go:62; checkrun_charly_verbs.go:33; check_endpoint_resolve.go:25,61, 164,197). Go requires all methods of a type in the type's package. The engine must be REWRITTEN against kit.CheckContext, not relocated; Runner stays in core as the concrete implementation (charly/check_kit_adapter.go already maps every method). - charly/description_include.go DOES NOT EXIST. The plan names a phantom file; the real one is charly/check_include.go. - checkspec.go:420 type-asserts *grpcProvider, a concrete transport type that cannot follow into the sdk. - run_subcommand.go re-execs the charly binary and is a reverse dep of four core deploy files. It stays in core, contra the plan. sdk/spec/k8sgen_wire.go:22 also settles an open question: the host lifts what a plugin needs into a narrow envelope "so the plugin needs no access to the package-main BoxMetadata type". The moved resolver takes the same projection, so the unfinished P2 unit (B) is NOT a P5 prerequisite. Parity oracle: before a line moved, a 21-file check-live golden oracle was captured from the pre-move engine across all 18 beds. Post-move, with by-design non-determinism masked (auto-allocated ssh ports, kubernetes replicaset/pod name hashes, the k8s API's unordered pod listing), 21/21 verdicts are identical. The one textual difference is a k3s pod PHASE (Pending vs Running/Succeeded) — the cluster was further along when the probe sampled it; the check passes in both. R10: full 18-bed roster CONCURRENT against the final code (merged sdk), 18/18 rc=0, no orphan domains or containers, all host markers absent afterward. Assisted-by: Claude (fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly Go (alias rewire + file deletion) + sdk submodule pointer bump + Fresh, independent re-validation against R0–R10 + the pillars. Everything below was re-run by me, not taken from the PR body. Blocking finding — the Go lint gate fails
Consequently the attribution tier Checklist verdict
What I verified independently (and that PASSED)
DecisionCHANGES REQUESTED. Remove the unused Assisted-by: Claude (analysed on a live system) |
The pr-validator caught what my gate did not: I omitted golangci-lint, and the move left a caller-less alias. charly/kit_aliases.go:32:2: var normalizeTag is unused (unused) normalizeTag had real callers before the move (EffectiveTags and the lexer); both went to sdk/kit with it, leaving the unexported alias dead. Removed. CombineTagFilters is dead for the same reason. `unused` cannot see it because it is EXPORTED, so it passed the linter while being equally caller-less in core. It is a CLI composition helper core never invokes. Removed too, rather than left as lint-invisible dead code. Both remain part of the kit surface a plugin candy uses - that is the point of the move. Core aliases only what core actually calls: TagExpr, ParseTagExpr, EffectiveTags (2, 1 and 5 call sites respectively). golangci-lint run ./... in charly: 0 issues (was 1). R10 against the final code: the tag-path beds run concurrently - check-feature-local (drives planTagFilter/ParseTagExpr) rc=0 103s, check-local rc=0 110s, check-substrate rc=0 81s. No orphan domains or containers. The full 18-bed roster already passed on the functional change; this commit deletes two provably uncalled symbols (compiler and linter agree), so it adds no runtime path. Assisted-by: Claude (fully tested and validated)
CHANGES-REQUESTED addressed in place (
|
| alias | call sites in charly/ |
|---|---|
TagExpr |
2 |
ParseTagExpr |
1 |
EffectiveTags |
5 |
golangci-lint run ./... in charly: 0 issues (was 1).
R10 against the final code
The full 18-bed roster already passed on the functional change. This commit deletes two provably
uncalled symbols — the compiler and the linter agree — so it introduces no runtime path. I re-ran the
beds that actually exercise the tag surface, concurrently:
check-feature-local rc=0 103s # drives planTagFilter -> ParseTagExpr
check-local rc=0 110s
check-substrate rc=0 81s
### failing: 0
### orphan domains: (none) ### orphan containers: 0
go build / go vet / gofmt / go test ./charly/... all clean.
Thanks for checking the four plan-deviation claims against source rather than taking them on trust —
they are the basis for amending an approved plan, so they needed to be verifiable, not persuasive.
Assisted-by: Claude (fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly/sdk Go (alias rewire + 298-line deletion) + submodule pointer bump + Fresh, independent re-validation of head BLOCKING (1) — R1/R5 documentation divergence: the CHANGELOG contradicts the code it ships with
var (
ParseTagExpr = kit.ParseTagExpr
CombineTagFilters = kit.CombineTagFilters
normalizeTag = kit.NormalizeTag
EffectiveTags = kit.EffectiveTags
)But the actual var (
ParseTagExpr = kit.ParseTagExpr
EffectiveTags = kit.EffectiveTags
)The fix commit Fix: update the CHANGELOG code block to the actual 3-alias surface ( Everything else PASSES
Independently verified: Decision: ONE blocking finding — the shipped CHANGELOG code block still lists the two aliases the fix removed, an internal contradiction with Assisted-by: Claude (analysed on a live system) |
The pr-validator caught the tree contradicting itself: CHANGELOG/2026.191.1430.md still printed a five-alias code block including CombineTagFilters and normalizeTag, while the fix commit 029c50f had removed both and kit_aliases.go's own comment called aliasing them dead code. An R5 sweep is claim-keyed. I changed the surface and did not re-read the document that quotes it - the same failure mode as the check-group cutover, where I swept the strings I remembered editing instead of grepping for the claim. My own CHANGELOG is part of the sweep. The block now shows the three aliases core actually binds (TagExpr, ParseTagExpr, EffectiveTags) and states why the other two are deliberately absent - including that an EXPORTED dead alias is invisible to the `unused` linter, which is how CombineTagFilters survived the first review round. grep for `normalizeTag = kit.` / `CombineTagFilters = kit.` across the superproject and submodules now returns nothing. golangci-lint: 0 issues. Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅ (re-validation round 3)Change class: charly/sdk Go (alias rewire + file deletion) + cross-repo submodule pointer bump + Fresh evaluator, re-derived from source at head Checklist
Verification of the three reported fixes
Decision: APPROVED. All 18 rule checks pass on independent re-derivation. Static gates re-run green, the claim-keyed R5 sweep is clean, cross-repo integrity holds, and I independently confirmed the runtime path on a fresh-rebuilt binary via a live Assisted-by: Claude (analysed on a live system) |
pr-validator version-stamp: rename the placeholder CHANGELOG to the merge-time CalVer generated at merge, per CalVer-at-merge. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01W8GPhuyWWs5XwJyJYtCaxE
The #52 version-stamp renamed CHANGELOG/2026.191.1430.md to the merge-time CalVer 2026.191.1517.md but left the in-file H1 at the 2026.191.1430 placeholder — the header edit was made in the working tree but never staged, so only the rename landed. Every CalVer-H1 CHANGELOG file matches its filename; this one contradicted its own name and the v2026.191.1517 tag. Header corrected. Docs-only correction to already-released history: no new CHANGELOG entry and no new tag (v2026.191.1517 already points at the correct code). Assisted-by: Claude (documentation reviewed) Claude-Session: https://claude.ai/code/session_01W8GPhuyWWs5XwJyJYtCaxE
… pod plugin over F6 (+ #52) The K4 deploy-lifecycle DEEP-BODY move. `charly start` / `charly stop` / `charly service` no longer carry their pod-lifecycle BODIES in core — the host RESOLVES a plan and the `deploy:pod` plugin EXECUTES it over the F6 substrate-lifecycle channel. Core keeps only kind-blind dispatch (pod_lifecycle_{dispatch,resolve,verb}.go host-resolve `spec.PodLifecyclePlan`) + the host-process arbiter BRACKET (acquire before OpStart / release after OpStop / release on failure). Inline runDirect / runQuadlet / stopUnmountIfRequested bodies DELETED (R5 grep clean). Folds in the shared command-plugin `--help` fix (#52) at the sdk clidispatch root, wired across alias/box/bundle/check/migrate/status/vm; the parseLeaf (done,err) integration also extends the #52 discipline to `charly box inspect` (R2, an interaction with #102 already on main). shell / logs-follow / cmd stay M-core rows (F12/#62 — can't ride Invoke-and-reply); restart is thin-core (K5) — named exits, not incomplete seams. Depends on sdk v0.2026195.204 (opencharly/sdk#43, merged 529df36) — the clidispatch primitive + #PodLifecyclePlan/#PodExecReply carriers; the sdk gitlink + charly/go.mod require are finalized to that merged commit here (B2). go.sum completed for the kong v1.15.0 bump (validator fix round). Validated (fresh worktree, merged sdk gitlink): workspace go build/vet/test + golangci-lint 0 + gofmt clean; charly module GOWORK=off go mod verify = all modules verified; `charly box validate` clean; pluginsgen + cue:gen reproducible. Runtime: the concurrent 6-bed disposable roster all green through a fresh `charly update` (check-sidecar-pod ok:true with the new K4 check steps service-status-output-present + sidecar-pod-restarted PASS; check-commands-local; the VM lanes check-substrate/check-charly-vm/check-local-vm/check-k3s-vm all EXIT 0). Assisted-by: Claude (fully tested and validated)
… redesign marshal (#67) feat(deploy)!: K5-Unit-1 Option A — clean kit of R-item, shrink seam, redesign marshal (#67) The K5-Unit-1 cutover moves the deploy state-model body from `charly/` core into `sdk/deploykit` (a kind-blind mechanism kit). The original move contaminated the kind-blind kit with a deploy-kind-specific transform (`MarshalBundleNodeLegacy`) and threaded FOUR core-coupled ops through the `DeployStateHost` seam. Option A fixes that incomplete-seam violation. SDK leg (sdk PR #55, merged 9ec6940, tag v0.2026196.1147): - Removes `MarshalBundleNodeLegacy` from `sdk/deploykit` — the R-item that contaminated the kind-blind kit. - Removes `MigrateDeployEntity` + `LatestSchemaVersion` + `AcquireDeployConfigLock` from the `StateHostMechanisms` seam. - Collapses `LatestSchemaVersion` → `kit.LatestSchemaVersion()` directly; `AcquireDeployConfigLock` → `kit.AcquireFileLock(path+".lock", true)` directly. - Redesigns `SaveBundleConfig` as a kind-blind shell taking a `marshalNode` callback (version-stamp + provides-marshal + write-temp-rename + fail-safe re-check). - Shrinks the seam from 4 ops to 1 op (`LoadUnifiedBundleConfig` — K1-gated, dies when K1 relocates LoadUnified to loaderkit, task #31). Super leg (this PR): - Fuses `MarshalBundleNodeLegacy` + `migrateDeployEntity` into ONE clean canonical `marshalBundleNode` in `charly/deploy_nodeform.go`. - Adds `saveBundleConfigNodeForm(dc)` — the ONE `charly/` helper (R3) supplying `marshalDeployNode` as the callback. - Updates ~12 `charly/` `SaveBundleConfig` call sites → `saveBundleConfigNodeForm`. - Registers ONLY `LoadUnifiedBundleConfig` in `deploy_state_host.go` init (1-op seam). - Deletes `migrateDeployEntity` (dead after fusion — R5). - Bumps the `sdk` gitlink to the merged Option A sdk commit `9ec6940` + `charly/go.mod` require `v0.2026196.1147`. Net core-LOC NEGATIVE (494 insertions, 1027 deletions). IMPORT-PURITY preserved (`deploy_nodeform.go` imports spec+yaml.v3 only; `deploy_state_host.go` uses the pre-existing `deploykit` import directly — body-move exception). ZERO-ALIASES preserved (the alias file shrank; no new `charly/*_aliases.go`). The marshal + helper + ~12 deploy-lifecycle consumers live in `charly/` core until K4 moves them to their plugin homes (plugin-bundle / plugin-deploy-pod / plugin-check) — tracked K4-exit inventory (task #52), not permanent residue. R10: 5 disposable beds CONCURRENTLY (check-sidecar-pod, check-charly-vm, check-structkind, check-substrate, check-group) — all exit 0, zero warnings, fresh-rebuild (`update` step) on each. The changed deploy state-model paths executed live on every bed's deploy-add → config → update route. Delta re-gate after merging main (#123): go build/vet/gofmt/test/lint all clean, file overlap EMPTY. Assisted-by: Claude GLM 5.2 Cloud (fully tested and validated)
T-46's content: candy/plugin-loader gains WalkProject; charly/loader_threaded.go + plugin_inproc.go rewired to the new plugin-served seam; charly/materialize.go added; charly/loader_driver.go deleted (folded into the plugin). This is the final wave-1 member per the queue. Conflicts resolved per instruction, both resolved toward T-46's side (the newest merged content in both cases): - charly/go.mod: sdk require bumped v0.2026197.720 -> v0.2026197.738 (T-46's version supersedes P8b's). - sdk gitlink: resolved to 496e9a2 (sdk main tip, tag v0.2026197.738) -- verified a strict descendant of this branch's prior pin (3b92a2d) via `git merge-base --is-ancestor`, and confirmed on sdk's own main via `git branch -r --contains`. No other file overlap occurred (the loader files are T-46's alone; P8b touched vm files; #52 touched aliases) -- matches the prediction exactly. Verified before committing: `task build:binary` clean; `go test ./charly/...` (103s) + `go test ./candy/plugin-loader/...` + `go test ./candy/plugin-vm/...` all pass; `golangci-lint run` 0 issues on charly, plugin-loader, plugin-vm; `./bin/charly box validate` exit 0; sdk standalone (`GOWORK=off go mod verify && go build ./... && go test ./...`) all green; R5 grep self-test for the deleted `loader_driver` identifier returns zero live hits. Assisted-by: Claude (analysed on a live system)
Consolidated landing record for the wave-1 super PR (#52 alias dissolution, #55 teardown robustness, #46 loader-residue fold, P8b Tier-1 VM disk-build engine move, gitlink bumps) — the fresh pr-validator's independent verification, the 7/7 R10 roster (including the 3 structural-kind beds closing a cross-cutting-loader bed-coverage gap), and the tracked-inventory disposition for the 2 new charly/-core sdk-mechanism-kit imports. Assisted-by: Claude (fully tested and validated)
…bustness, VM disk-build engine → plugin-vm, loader-residue fold Consolidated wave-1 landing: alias dissolution + teardown robustness + VM disk-build engine relocation + loader-residue fold + gitlink bumps. Members: #52 (alias dissolution), #55 (bed teardown robustness), P8b Tier-1 (VM disk-build engine → candy/plugin-vm), #46 (loader-residue fold), plugins/ pkg-fedora gitlink bumps, and a roster-surfaced R9 fix (rsync in eval-host-vm's cloud_init packages). Deleted (fully superseded, public-surface removal): - charly/loader_driver.go (whole file — the sole charly-core sdk/loaderkit importer; the WALK now reaches sdk/loaderkit exclusively through candy/plugin-loader's typed spec.ProjectWalker seam) - charly/vm_build.go, vm_bootstrap.go, vm_cloud_image.go, vm_disk_builder.go, vm_bootc_install.go (the VM disk-build ENGINE, relocated to candy/plugin-vm as vm_build.go/vm_bootc_engine.go/vm_bootstrap_engine.go/ vm_cloud_image.go/vm_disk_layout.go/vm_privileged_runner.go) - charly/filelock.go's acquireVmBuildLock (sole caller moved plugin-side) - charly/debootstrap_test.go's TestBaseBootstrapPackages_{DebootstrapDispatch, PacstrapStillWorks,NilDistro} + baseBootstrapPackages (moved to candy/plugin-vm/vm_bootstrap_engine_test.go with the function they test) - 51 dead + 55 test-only-rewired alias bindings across 14 charly/*_aliases.go files (full 106-symbol list: CHANGELOG/2026.197.0615.md) R10: 7/7 disposable-bed roster PASS (check-commands-local, check-sidecar-pod, check-charly-vm, check-local-vm, check-group, check-structkind, check-substrate — the last 3 run by the fresh pr-validator to close a cross-cutting-loader bed-coverage gap the original 4-bed roster missed). Architecture gate: placement CORRECT: charly/*.go non-test net -1000 LOC, candy/plugin-vm net +1059 LOC; the 2 new charly-core sdk-kit imports both qualify as tracked residual-call-site inventory (task #13's wave). Full narrative + evidence: CHANGELOG/2026.196.1800.md, 2026.197.0601.md, 2026.197.0615.md, 2026.197.0700.md, 2026.197.1051.md. Assisted-by: Claude (fully tested and validated)
Summary
Consumer half of
sdkv0.2026191.1413. First unit ofP5 (check-engine SDK-ization).
charly/description_tagexpr.go(298 lines) is deleted, and the tag-set helpers (normalizeTag,EffectiveTags) leavecharly/description_spec.go. Core binds to the kit implementation through theestablished
charly/kit_aliases.goalias surface, so every call site (planTagFilter,RunPlan,check_runner_live.go) is unchanged. The grammar lives ONCE, so a plugin candy filters a plan by tagwith the same
--tag/--tag-excludesemantics the check engine uses.What P5 actually is, versus what the plan said
The approved plan describes P5 as relocating ~25 files to
sdk/kitbehind "the ONE named blocker:verb resolution." That is not executable as written. The operator approved an amended HOW
(end-state unchanged, seam rewritten). Verified against the source, not assumed:
Runnercannot move. It is defined incharly/checkrun.go, but eight of its methods aredeclared in files the plan keeps in core (
provider_checkenv.go:78,136,k8s_config.go:62,checkrun_charly_verbs.go:33,check_endpoint_resolve.go:25,61,164,197). Go requires all methods ofa type to be declared in the type's package. The engine must be rewritten against
kit.CheckContext, not relocated —Runnerstays in core as the concrete implementation(
charly/check_kit_adapter.goalready maps everykit.CheckContextmethod onto it).charly/description_include.godoes not exist. The plan names a phantom file; the real one ischarly/check_include.go.checkspec.go:420type-asserts*grpcProvider, a concrete transport type that cannot followinto the sdk. "Is this out-of-process?" must become an sdk-level concept, not a type assertion.
run_subcommand.gore-execs the charly binary and is a reverse dependency of four core deployfiles (
bundle_add_cmd.go,bundle_members.go,deploy_target_external.go,substrate_lifecycle_grpc.go). It stays in core, contra the plan's move list.sdk/spec/k8sgen_wire.go:22also settles a question the plan left open — the host lifts what a pluginneeds into a narrow envelope "so the plugin needs no access to the package-main
BoxMetadatatype."The moved resolver takes the same projection, so the unfinished P2 unit (B) is not a P5
prerequisite. (A
gengotypesspike separately provedBoxMetadatais not fully CUE-expressibleanyway:
[int]: stringdegrades tostruct{}, andPortProtoismap[int]string.)Change class
charlyGo (alias rewire + deletion) + a submodule pointer bump +charly/go.modrequire. Gate:go test+task build:charly(R9) + the full concurrent bed roster (the tag path runs in every bed'splan filtering) + golden
check-liveparity.Cross-repo integrity
sdkgitlink →bd38378, which isorigin/mainand carries tagv0.2026191.1413.charly/go.modrequiresgithub.com/opencharly/sdk v0.2026191.1413(in-tree resolution ridesreplace => ../sdk; the require matters for out-of-tree consumers).Two bugs fixed upstream, found by writing the tests it never had
The 298-line lexer + parser had zero test coverage in core. Moving it untested into the contract
module would have been worse than leaving it, so the move shipped tests — which caught two real
defects (both fixed in the sdk PR):
rune(src[i])), then called Unicode-aware predicates on theresult. Any non-ASCII tag was unusable:
ParseTagExpr("café")→unexpected character '©' at position 4.A first version of that change also collapsed the leading-character and continuation identifier
predicates, silently widening the grammar so
-b,.x,:y,a and -bparsed instead oferroring — and my stated rationale for it was false. A
pr-validatorround caught it; the predicatesare restored, a test locks the contract, and a 36-input differential against the verbatim original
proves ASCII behaviour identical.
R10 evidence — full concurrent roster against the FINAL code (merged sdk)
Golden-output parity. A 21-file
check-liveoracle was captured from the pre-move engine before asingle line was touched. Post-move, with by-design non-determinism masked (auto-allocated ssh ports,
kubernetes replicaset/pod name hashes, the k8s API's unordered pod listing):
21/21 verdicts identical. The single textual difference is a k3s pod phase (
PendingvsRunning/Succeeded) — the cluster was further along when thek8s=podsprobe sampled it; the checkpasses in both runs. That is cluster-convergence timing, not engine behaviour.
Tier
fully tested and validated.Assisted-by: Claude (fully tested and validated)