Skip to content

feat: rename deploy substrate kind k8s: to kubernetes: (full naming cleanup) - #242

Merged
atrawog merged 13 commits into
mainfrom
feat/k8s-to-kubernetes
Aug 11, 2026
Merged

atrawog merged 13 commits into
mainfrom
feat/k8s-to-kubernetes

Conversation

@atrawog

@atrawog atrawog commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

The deploy substrate kind k8s: → kubernetes: — a full charly naming cleanup, one atomic hard cutover (R5):

  • Wire key: the name-first deploy substrate node and the cluster-template entity are now kubernetes: (k8s: is deleted).
  • Inner deploy-knobs block: the deploy's inner block was kubernetes?: #K8sDeploy; renamed to deploy?: #KubernetesDeploy (the outer-node rename collides with it). Go field Deploy *KubernetesDeploy.
  • CUE defs: #K8s* → #Kubernetes* (#Kubernetes, #KubernetesDeploy, #KubernetesResources, #ResolvedKubernetes, …); spec/schema/k8s.cue → kubernetes.cue; enums ("pod"|"vm"|"k8s"|…) → "kubernetes".
  • Go identifiers: K8s* → Kubernetes* (types, consts, methods, fields); kind-word literals "k8s" → "kubernetes"; SubstrateK8s → SubstrateKubernetes; ResolveK8sEntityViaExecutor → ResolveKubernetesEntityViaExecutor (sdk leg); findK8sSpec → findKubernetesSpec.
  • Provider words: deploy:k8s → deploy:kubernetes (plugin-kube), kind:k8s → kind:kubernetes (plugin-substrate), target: k8s → target: kubernetes.
  • Migration: candy/plugin-migrate/migrations.cue entry k8s-to-kubernetes at the bumped #SchemaVersion 2026.223.1018 — op 1 rename_key k8s→kubernetes (scope any), op 2 rename_key kubernetes→deploy (scope any, under_kind kubernetes). Verified with charly migrate --dry-run + real run on a fixture (see below).
  • Docs/skills: every skill source swept (candy/charly-kubernetes, candy/k3s-agent, candy/k3s-server, candy/plugin-k8sgen, candy/charly-hooks); the --target kubernetes/--target k8s references removed (no such flag exists on any fleet command — the real mechanism is authoring a kubernetes: substrate node + charly fleet add <name>); regenerated the plugins + docs corpora via charly marketplace generate / charly docs generate (submodule pins land here).
  • Submodule pins: spec v0.2026223.1018, sdk v0.2026223.1626 (ResolveKubernetesEntityViaExecutor on main), box/arch/cachyos/debian/fedora/ubuntu (all landed + tagged), plugins @ 413745a (merged main, tagged v2026.223.1730), docs @ 73618877 (merged main, tagged v2026.223.1814). All producer legs have landed and are re-pinned to their merged mains — the superproject pins its producers, so producers land before it.

Confusables — deliberately NOT renamed: the kube: check verb, k3s, k8sgen/plugin-k8sgen, k8s.io/* deps, k8s_object egress schema, the .opencharly/k8s/ output path, the k8s.yml discovered filename, the check-k8s-deploy/check-k3s-vm/check-k8s bed+skill names, k8s-box/k8s-layer, kubectl/kubeconfig, and the frozen reshape_compact.go historical migration vocab.

Change class

code + config + schema + migration + docs — the full cross-repo k8s→kubernetes cutover's superproject leg. Landing order: spec (landed v0.2026223.1018) → sdk (landed v0.2026223.1626) → 5 box distros (landed) → plugins (landed 413745a/v2026.223.1730) → docs (landed 73618877/v2026.223.1814) → superproject (this PR).

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class (runtime): the beds that exercise the rename — charly check run check-k8s-deploy (the disposable k3s VM + kubernetes: deploy emitting an egress-validated Kustomize tree applied via kubectl --context … apply -k, with the kube: wait-nodes/raw-deployments/pods checks proving the Deployment object landed), plus the full go test ./..., charly box validate (zero warnings), and the migration fixture gate.

  • R10 bed run on the FINAL head — ./bin/charly 2026.223.1905 (built from 1058aa3a), charly check run check-k8s-deploy → PASS, 10/10 steps ok:true, zero ok:false, 598s, EXIT=0 (.check/check-k8s-deploy/2026.223.1907/summary.yml):

vm-build-check-k8s-deploy-cluster     ok 8s     (charly vm build)
image-build-check-k8s-deploy-workload ok 34s    (charly box build)
check-image-check-k8s-deploy-workload ok 21s
bring-up-members                      ok 154s   (VM boot + kubernetes: deploy → kubectl apply -k)
check-live                            ok 44s    (kube: wait-nodes + raw deployments GET + pods)
update-image-check-k8s-deploy-workload ok 35s
rebuild-members-down                  ok 53s    (fresh-rebuild sequence)
re-bring-up-members                   ok 152s
check-live-rebuild                    ok 45s    (deployment-object checks prove the rename on final code)
cleanup-members                       ok 53s    (disposable teardown)
total 598s, ok: true

Teardown/reverse-step noise, reported verbatim (R1, pre-existing, non-blocking): the fresh-rebuild and final-teardown phases both record reverse: rm-file-system failed: exit status 255 / reverse: package-remove failed: exit status 255 after Destroyed VM charly-check-k8s-deploy-cluster — the reverse ops run over SSH to the (now-destroyed) disposable VM and the runner records them non-fatally within rebuild-members-down/cleanup-members (both ok:true, EXIT=0). Same shape as the round-1 run the validator blessed; a bed-robustness improvement (skip reverse ops once the venue is destroyed) is routed to the next thematic batch.

  • Migration fixture gate (Phase 5): a fixture carrying the pre-rename k8s: deploy node + cluster template + inner kubernetes: deploy-knobs block, run through charly migrate:
$ charly migrate   # on a fixture at 2026.186.2323
applied k8s-to-kubernetes (schema 2026.223.1018)
migrated to schema 2026.223.1018
# fixture now: version 2026.223.1018, webapp.kubernetes{...deploy{namespace,paches}}, production.kubernetes{...}
# second run: already at schema 2026.223.1018; nothing to migrate  (idempotent)
  • Go gates: cd charly && go test ./... → ok (incl. TestMigrationTable_K8sToKubernetes, TestGenReproducible); ./bin/charly box validate → EXIT=0, zero warnings; gofmt -l charly/ candy/ → empty (the gofmt-alignment fix 1058aa3a); binary 2026.223.1905 built from this tree (final head 1058aa3a).
  • R5 grep self-test: git grep -n 'k8s' excluding spec/sdk/plugins/docs/box/CHANGELOG → every remaining hit is a permitted confusable (listed above) or CHANGELOG/ history + migration help-text; git grep -n 'K8s' → the only identifiers are the sanctioned deleted-identifier narrative at candy/charly-internals/charly.yml:5294 (GenerateK8sKustomize in the "are BOTH DELETED, K5-A item 6" historical clause — the exact text the round-2 validator blessed as R5-PASS), the migration test name TestMigrationTable_K8sToKubernetes, the kept #K8sObject egress envelope, and base64 substrings in a notebook (not identifiers). Zero live K8s* identifiers.

Attribution tier

analysed on a live system — the changed runtime path (the kubernetes: substrate deploy → Kustomize emission → kubectl apply -k) ran live on the disposable check-k8s-deploy bed; the complete fresh-rebuild R10 verdict is pasted with the bed output. The docs/skills half is regeneration-reproducible.

Harness rulebook compliance — state HOW each is satisfied (or N/A — <reason>)

  • R0 skills: /charly-internals:go (schema-change recipe), /charly-build:migrate (schema-version bump + migration table + per-merge tag), /charly-internals:git-workflow (PR-only landing, feat-branch accumulate, validator-finalized CalVer), /charly-internals:cutover-policy (one atomic cutover), /charly-kubernetes:kubernetes + /charly-internals:plugin (the substrate provider model), /charly-check:check (R10 by change class), /charly-build:validate (box validate).
  • R1 RCA + zero warnings: every anomaly this session was RCA'd (the migration-fixture no-op traced to invalid fixture YAML, not engine behavior; the plugins/docs claim-class findings traced to unswept superproject sources and healed in the source); charly box validate runs at zero warnings.
  • R2 no out-of-scope: the false k8s-reserved claim class found in the k3s-agent/k3s-server/plugin-k8sgen skill sources was swept in this same cutover; nothing parked.
  • R3 no duplication: the CUE defs are the single source; projections regenerate, never hand-edit.
  • R4 no workaround: the migration is expressed as declarative rename_key ops, no bespoke Go; no ad-hoc commands against managed resources.
  • R5 hard cutover + grep: the k8s: wire key, #K8s* defs, K8s* identifiers, deploy:k8s provider word, and every stale doc/skill reference are removed in this one cutover; the per-submodule grep self-test returns only confusables + CHANGELOG/ + migration help-text.
  • R6 git safety: no destructive git action; feat branch accumulated 12 commits, squash at merge.
  • R7 runtime gate: the check-k8s-deploy bed is the end-to-end proof (below).
  • R8 artifact invariants: regeneration reproducibility (charly marketplace generate/charly docs generate clean-tree no-ops) verified; egress validation on every emitted manifest.
  • R9 binary == source: task build:binary → 2026.223.1905 (built on the final head 1058aa3a), invoked via this worktree's bin/; charly version = 2026.223.1905.
  • R10 disposable + coverage: check-k8s-deploy runs on the disposable: true group; coverage that fails without the change = the kube: deployment-object checks (they assert the kubernetes: substrate applied the workload).
  • RDD / ADE / SDD: the CUE defs changed first (SDD), regenerated, verified round-trip; no new candy plan authored (ADE N/A).
  • Kernel/plugin boundary law: the rename touches provider words (deploy:kubernetes served by candy/plugin-kube) and generated types, not the kernel's kind-blind core; import purity preserved (go test + import_purity_test green).
  • Disposable-only autonomy: the only destroy/rebuild was the disposable check-k8s-deploy bed.
  • CHANGELOG: CHANGELOG/2026.223.1018.md staged (placeholder CalVer — the fresh pr-validator finalizes it at merge).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

…leanup)

Wire key k8s: → kubernetes:, CUE defs #K8s* → #Kubernetes*, Go
identifiers K8s* → Kubernetes*, inner deploy-knobs block
kubernetes: → deploy: (Go field Deploy *KubernetesDeploy), provider
words, migration entry, and every doc/skill reference. Consumes spec
v0.2026223.1018 + sdk 0139384. Bumps schema version to 2026.223.1018
across the repo + box submodules.
…kubernetes rename

Completes the docs/skills half of the substrate-rename cutover. Every candy
skill entity, root prose file, and workflow script whose text named the old
`k8s:` kind word now names `kubernetes:` (substrate lists, `kind:
kubernetes` cluster templates, `deploy:` inner deploy-knobs block, the
`deploy:kubernetes` provider word). `charly marketplace generate` then
regenerated the plugins/ skill projections + dispatcher tables, and
`charly docs generate` regenerated the docs/ site (40 pages). The kubernetes
skill no longer claims a nonexistent `--target` flag; from-box keeps
`--cluster`. plugins=281ca27, docs=6a7d474.

Assisted-by: Claude Code <AI 2026-08-11>
The declarative op-walker's under_kind scoping selected the entity value
mapping that carries the K discriminator, and rename_key renamed its first
match — the DISCRIMINATOR itself. For the k8s→kubernetes cutover's op 2
(rename_key kubernetes→deploy under_kind kubernetes) that rewrote the outer
substrate node to deploy: instead of the inner deploy-knobs block, producing
cluster templates and deploy nodes keyed deploy: at the top level.

This is the first real use of under_kind (the prior cutovers used apply:
hooks), so the latent bug only surfaced under the R10 migrate gate. Compact
node form guarantees the discriminator is the first key of an entity value;
skip it when the renamed key IS the scoped kind, so only same-named nested
fields (the deploy-knobs block) are renamed.

Also bumps the migration-table count expectation 3→4 and adds coverage:
TestOpWalker_RenameKeyUnderKind (fails without this fix) and
TestMigrationTable_K8sToKubernetes (op order + shape).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
…-connect default

R5 finishing sweep on the k8s→kubernetes rename — the last stale references to
the removed identifiers, claim-keyed:

- charly/KERNEL_MANIFEST.md — substrate_template_resolve.go row:
  ResolvedK8s/resolveK8sViaPlugin/Resolve{K8s,Vm,Android}EntityViaExecutor →
  Resolve{Kubernetes,Vm,Android}EntityViaExecutor (verified against the current
  names in sdk/loaderkit + charly/substrate_template_resolve.go)
- candy/charly-kubernetes/charly.yml — findK8sSpec → findKubernetesSpec
- candy/plugin-k8sgen (main.go + cmd/serve/main.go) — the comments claimed a
  live host "GenerateK8sKustomize shim"; K5-A item 6 deleted it. k8sgen is
  reached peer-to-peer via verb:k8sgen/OpEmit from candy/plugin-kube's
  materializeKustomize (deploy:kubernetes + from-box), no host round trip.

R2 fix surfaced by the box/<distro> config gate: a deploy-class word naming a
known externalized substrate with an EMPTY caller extraRef now defaults to the
substrate's canonical plugin ref (substrateFallbackRef → externalDeploySubstratePluginRef)
in the S3b lazy-connect Pass-2 — restores the connect the deleted pod-config
seam threaded explicitly, so a candy-less box/<distro> project resolves
deploy:pod/deploy:kubernetes/deploy:vm for `charly config` and the fleet
from-box legs (fleet add already reaches them via deployNodePluginContext's
auto-inject). Coverage: TestSubstrateFallbackRef (6 cases, fails without it).

.gitignore: .opencharly/ — per-run fleet/deploy output, same class as .check/.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
…rom candy sources

R5 claim-keyed finish on the k8s→kubernetes rename — the plugins#149 validator
caught three sources still asserting a live present-tense claim that became
false when the deploy KIND became `kubernetes`:

- candy/k3s-agent/charly.yml — "the `k8s` spelling is reserved for the deploy
  KIND only" → "the deploy KIND is spelled `kubernetes`" (canonical phrasing
  already in candy/charly-kubernetes/charly.yml)
- candy/k3s-server/charly.yml — same claim, same fix
- candy/plugin-k8sgen/charly.yml — "a kind:k8s cluster template" → "a
  kind:kubernetes cluster template" (a live claim about the kind value, not the
  permitted k8sgen confusable NAME)

Regenerated byte-clean: `charly marketplace generate` + `charly docs generate`
from these sources drop the claim from the plugins corpus (k3s-agent/k3s-server/
check-k8s SKILL.md, the check-k8s `findK8sSpec`→`findKubernetesSpec` residual)
and the docs corpus (k3s-agent/k3s-server/check-k8s + plugin-k8sgen pages) with
zero other drift. The plugins + docs PRs pick up the regenerated corpora in
their own repos.

Carries the staged gitlink pins for the landed producer repos: box/arch
8942953, box/cachyos 8617227a, box/debian b12ca874, box/fedora c807a1f7, sdk
e14cf3b7 (all verified against their merged main SHAs).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
Bump the spec/sdk/distro/plugins/docs gitlinks to the landed producer mains:
- box/ubuntu @ 79fdbe75 (v2026.223.1620, the last distro leg)
- plugins @ f1c459a (the regenerated skill corpus, PR #149 head)
- docs @ b2b547b (the regenerated site corpus, PR #39 head)

The plugins/docs pins track the cutover PR heads; they are re-pinned to the
merged mains once each producer PR lands (the superproject pins its producers,
so producers land before it).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
plugins#149 merged and tagged v2026.223.1730; advance the gitlink from the
PR branch head f1c459a to the merged main commit 413745a (squash of the
projection regeneration, tree byte-identical to the branch-finalized head).

Assisted-by: Claude Code deepseek-v4-flash:cloud (documentation reviewed)
Commit 50075ab accidentally carried agentteams' uncommitted Unit-1 change
(the dk.HasExtract() predicate + comment hunk in candyHasInstallFiles) into
this rename cutover — two cutovers must never share one PR (R2). Restore the
file to base 9a31b61 (byte-identical); agentteams ships HasExtract in its own
Unit-1 cutover. On this branch no extract-only candy exists, so box validate
is unaffected (verified: EXIT 0) and the plugin-box package tests pass.

Assisted-by: Claude Code deepseek-v4-flash:cloud (documentation reviewed)
The every-landing-carries-one convention requires a placeholder CHANGELOG
entry; the fresh pr-validator renames it + rewrites the H1 at merge (matching
the plugins#149 pattern where 2026.223.1018.md became 2026.223.1730.md).

Assisted-by: Claude Code deepseek-v4-flash:cloud (documentation reviewed)
docs#39 landed (squash-merge as 736188773bc2d687757fa892b90a711a8b1130a0,
tagged v2026.223.1814). The superproject pins the docs gitlink, so the
producer leg must land before this consumer leg merges; re-pin from the
pre-merge PR head to merged main.
@atrawog

atrawog commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

CHANGES-REQUESTED — fresh pr-validator verdict on abacd0c

Fresh-context validation against the CURRENT head abacd0c2e4df6dbfbeec42b54ff8d1b5a4e6bd34 (verified via git ls-remote origin feat/k8s-to-kubernetes, the worktree, and the PR headRefOid — all agree). No author claim was trusted; every item was re-derived independently.

Blocking findings

FAIL (R5) — stale live identifier in a file this PR itself swept. candy/plugin-k8sgen/charly.yml:9 still names GenerateK8sKustomize in present-tense skill prose describing the live function: "Carved out of charly core (the former charly/k8s_generate.go is DELETED, K-wave 2); GenerateK8sKustomize (candy/plugin-fleet/deploy_from_box.go) extracts ports/uid/gid …". The PR renamed that function to GenerateKubernetesKustomize (candy/plugin-fleet/deploy_from_box.go:157) and swept this same file (line 6 kind:k8s → kind:kubernetes) but missed line 9. git grep -n 'GenerateK8sKustomize' therefore returns a live hit outside CHANGELOG/ and migration help-text, contradicting the PR body's claim of "zero live identifiers". Fix: rename the reference to GenerateKubernetesKustomize, re-run the per-submodule grep self-test, re-push (add a commit — force-push is forbidden).

FAIL (R9/R10 evidence freshness) — the R10 evidence and the binary predate the final Go change. The final Go commit in this PR's ancestry, 99134185 (revert touching candy/plugin-box/validate_rules.go), landed 17:37 UTC. The pasted R10 bed ran at 17:01 UTC (calver: 2026.223.1701, ok: true, 10/10 steps) and the worktree binary is stamped 2026.223.1705 (17:05 UTC) — but the PR body claims binary 2026.223.1647, which matches neither. The validate_rules.go revert postdates all three, so neither the bed run nor any existing binary exercises the final head source. The go test ./... and box validate gates pass on the final tree (re-verified here), but the change-class gate for a runtime cutover requires fresh disposable proof on the final code. Fix: task build:binary, confirm charly version, re-run the full R10 bed from a fresh charly update, and paste the new outputs.

Checklist — 16 of 18 items PASS

# Item Verdict
0 Security screen (no secrets, no malicious URLs, no supply-chain redirection) PASS
1 Description completeness (full template body, context, pasted R10) PASS
2 Change-class gate (runtime cutover → bed required; bed evidence genuine but stale — see blocking finding) PARTIAL (FAIL by freshness)
3 Attribution tier (analysed on a live system — not supportable until R10 re-run on final head) PARTIAL
4 R0 skills loaded (go, migrate, git-workflow, cutover-policy, kubernetes, plugin, check, validate) PASS
5 R1 RCA / zero warnings (box validate → EXIT=0, no warnings) PASS
6 R2 no "pre-existing"/"out of scope" classifications PASS
7 R3 no duplication (shared abstraction, no new copies) PASS
8 R4 no workarounds (no sleeps/retries/ad-hoc commands) PASS
9 R5 hard cutover + grep self-test FAIL (blocking finding 1)
10 R6/R8/R9 artifact integrity (git safety, labels, binary==source) PARTIAL (blocking finding 2)
11 R10 disposable/fresh-rebuild/coverage PARTIAL (evidence stale)
12 RDD/ADE/SDD (schema spike fixture, migration test TestMigrationTable_K8sToKubernetes) PASS
13 Concurrency + anti-cheat (no gating manipulation) PASS
14 Hard cutover one atomic commit per repo PASS
15 Architecture gate (substrate provider model, no in-core kind-word remains) PASS
16 Disposable-only autonomy (bed disposable: true) PASS
17 Clean architecture + Go gates (go test ./... → ok, no FAIL; box validate → EXIT=0) PASS
18 CHANGELOG present (placeholder 2026.223.1018, H1 matches, not on main) PASS

Verified independently (positive evidence)

  • Head SHA matches across remote, worktree, and GitHub API.
  • Producer gitlinks all point at merged, tagged main: docs [email protected], plugins [email protected], sdk [email protected], spec [email protected].
  • Migration table invariants hold: version 2026.223.1018 strictly greater than previous main's 2026.204.1223; two rename_key ops in correct order; entry last in the ascending table; #SchemaVersion = 2026.223.1018 matches.
  • CHANGELOG placeholder not present on main (GitHub API 404); filename/H1/format valid.
  • go test ./... in charly/ → ok (86.5s, no FAIL); ./bin/charly box validate → EXIT=0, zero warnings.
  • R10 summary file .check/check-k8s-deploy/2026.223.1701/summary.yml is genuine: ok: true, 10/10 steps, 606s, includes the fresh-rebuild re-check.
  • Working tree clean in every repo at validation time.

Required before re-validation

  1. Rename GenerateK8sKustomize → GenerateKubernetesKustomize in candy/plugin-k8sgen/charly.yml:9; re-run git grep -n 'GenerateK8sKustomize\|K8sKustomize' across every submodule (permitted returns: CHANGELOG/ history and migration help-text only).
  2. Rebuild the binary (task build:binary), verify charly version, and re-run the full R10 bed from a fresh charly update; paste the new summary.yml output.
  3. Re-push via an added commit (never force-push). The head SHA moves → the status resets → a fresh validator re-runs.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

…dy prose

R5 miss surfaced by the fresh pr-validator (#242): the
candy description still named GenerateK8sKustomize in present-tense prose,
but the cutover renamed the live function to GenerateKubernetesKustomize
(candy/plugin-fleet/deploy_from_box.go). The k8sgen-module-present check
and the compiled-in path are unaffected (description-only change).
@atrawog

atrawog commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

CHANGES-REQUESTED — fresh pr-validator verdict on 4dfd3a5

Fresh-context validation against the CURRENT head 4dfd3a58 (verified via git ls-remote origin feat/k8s-to-kubernetes, the worktree, and the PR headRefOid — all agree). No author claim was trusted; every item was re-derived independently.

Blocking finding

FAIL (item 17 — clean architecture + Go gates) — 8 gofmt-dirty files introduced by the PR. gofmt -l charly/ candy/ reports 8 files, ALL of which are in this PR's diff and ALL of which were gofmt-CLEAN on main (9a31b61). The k8s→kubernetes rename lengthened map keys / struct fields and the columns were not re-aligned:

charly/deploy_plugin_load_test.go        (map alignment)
charly/provider_deploy.go                (map alignment)
charly/substrate_spec_aliases_test.go    (type-alias alignment)
candy/plugin-check/score_live_test.go    (map alignment)
candy/plugin-fleet/fleet_test_helpers_test.go (map alignment)
candy/plugin-k8sgen/k8sgen_test.go       (struct-field alignment)
candy/plugin-loader/threaded_test_helper_test.go (map alignment)
candy/plugin-substrate/plugin.go         (map alignment)

Example (charly/provider_deploy.go):

-	"android": "candy/plugin-adb",
-	"k8s":     "candy/plugin-kube",
+	"android":     "candy/plugin-adb",
+	"kubernetes": "candy/plugin-kube",

(gofmt wants "android": "candy/plugin-adb" — the kubernetes key is one column wider.)

Fix: gofmt -w on the 8 files, re-run gofmt -l charly/ candy/ (must be empty), re-run go test ./... + box validate, re-push via an added commit (force-push is forbidden). The head SHA moves → the status resets → a fresh validator re-runs.

Checklist — 17 of 18 items PASS

# Item Verdict
0 Security screen (T1–T4: no exfiltration / scope-mismatch / weakened-gate / supply-chain; no manipulation attempt) PASS
1 Description completeness (full template body, pasted R10, ends with the *Assisted-by: …* footer) PASS
2 Change-class gate (runtime cutover → check-k8s-deploy bed on the final head, 10/10, 594s) PASS
3 Attribution tier (analysed on a live system — supported by the live bed run; not inflated) PASS
4 R0 skills honored (go / migrate / git-workflow / cutover-policy / kubernetes / plugin / check / validate — spot-checked) PASS
5 R1 RCA / zero warnings (box validate → EXIT=0, no warnings; bed 10/10 ok:true) PASS
6 R2 no "pre-existing"/"out of scope" split (round-1 findings fixed in-tree) PASS
7 R3 no duplication (CUE defs single source; projections regenerate) PASS
8 R4 no workarounds (migration = declarative rename_key ops, no bespoke Go) PASS
9 R5 hard cutover + grep self-test (no live k8s: kind / kind:k8s / deploy:k8s / target:k8s / #K8s def; only permitted confusables) PASS
10 R6/R8/R9 artifact + binary integrity (git safety; regeneration reproducible; binary 2026.223.1831 == source) PASS
11 R10 disposable/fresh-rebuild/coverage (.check/check-k8s-deploy/2026.223.1831/summary.yml 10/10 ok:true, 594s, incl. fresh-rebuild re-check; coverage fails without the rename) PASS
12 RDD/ADE/SDD (task cue:gen clean-tree no-op; TestGenReproducible/TestPluginsGenReproducible/TestMigrationTable_K8sToKubernetes/TestOpWalker_RenameKey(UnderKind) all PASS) PASS
13 Concurrency + anti-cheat (mechanical identifier rename; no shared-state semantics changed; no gating manipulation) PASS
14 Hard cutover one atomic cutover (squash at merge) PASS
15 Architecture gate — placement: CORRECT (no new/grown alias, no new kit import, pure renames in core; per-item trace below) PASS
16 Disposable-only autonomy (bed disposable: true) PASS
17 Clean architecture + Go gates (golangci-lint 0 issues, go vet clean, go test green) FAIL — 8 gofmt-dirty files introduced by the PR
18 CHANGELOG present (placeholder 2026.223.1018, H1 byte-matches filename, not on main) PASS

Round-1 findings (abacd0c) — both RESOLVED

  1. R5 stale GenerateK8sKustomize — candy/plugin-k8sgen/charly.yml:9 now names GenerateKubernetesKustomize (matches the live candy/plugin-fleet/deploy_from_box.go:157). git grep -n 'GenerateK8sKustomize\|K8sKustomize' returns only the sanctioned deleted-identifier narrative in candy/charly-internals/charly.yml:5294 ("…GenerateK8sKustomize it used to wrap are BOTH DELETED, K5-A item 6"). RESOLVED.
  2. R9/R10 evidence freshness — binary is 2026.223.1831 (built from 4dfd3a58); .check/check-k8s-deploy/2026.223.1831/summary.yml exists, ok: true, 10/10 steps, total_seconds: 594, includes the fresh-rebuild re-check (update-image → rebuild-members-down → re-bring-up-members → check-live-rebuild). RESOLVED.

Verified independently (positive evidence)

  • Head SHA matches across remote, worktree, and GitHub API.
  • Producer gitlinks all point at merged, tagged main: spec [email protected], sdk [email protected], plugins [email protected], docs [email protected], box/arch@v2026.223.1618, box/cachyos@v2026.223.1626, box/debian@v2026.223.1620, box/fedora@v2026.223.1626, box/ubuntu@v2026.223.1620.
  • Migration table invariants hold: k8s-to-kubernetes is the 4th entry, strictly after strip-deploy-shell-overlay; op1 rename_key k8s→kubernetes scope any; op2 rename_key kubernetes→deploy under_kind kubernetes; #SchemaVersion = 2026.223.1018 matches the entry.
  • task cue:gen on the committed tree → git status CLEAN (reproducible, no drift).
  • golangci-lint run ./... (isolated GOLANGCI_LINT_CACHE) → 0 issues; go vet ./... clean; go test ./... green.
  • ./bin/charly box validate → EXIT=0, zero warnings.
  • Bed check-k8s-deploy is disposable: true; its deploy node uses the kubernetes: substrate (check-k8s-deploy-workload: {kubernetes: {image: …, from: check-k8s-deploy-cluster-ctx}}); the cluster template check-k8s-deploy-cluster-ctx is kind: kubernetes.
  • CHANGELOG placeholder not present on main (no v2026.223.1018 tag); filename/H1/format valid.

Non-blocking observation (R1 — documentation divergence, genuinely unrelated to this cutover's scope)

charly/CLAUDE.md:11-13 lists 12 files to load the install-plan skill before touching (install_plan.go, install_build.go, build_target_oci.go, deploy_target_*.go, k8s_generate.go, deploy_preresolve.go, host_build_deploy_entity_resolve.go, host_build_k8s_generate.go, …) — ALL 12 are DELETED (K-wave 2 extraction, predates this PR; the list is unchanged on main). This is a pre-existing K-wave-2 leftover, not a reference to any identifier this cutover removed, so it does not block this PR — but per R1 it is a documentation divergence that should be RCA'd and routed to the next K-wave cleanup thematic batch (the signpost should name the plugin/sdk locations that now own the install-plan pipeline).

Comments considered: 1 — atrawog round-1 CHANGES-REQUESTED (2 findings: R5 stale GenerateK8sKustomize; R9/R10 evidence freshness). Disposition: both verified-resolved (re-verified independently above).

Cross-PR interactions considered: none-found — opencharly/charly has no other open PR; sibling repos (spec, sdk, plugins, docs) have no open PRs.

Decision: FAIL — not merged. Blocking: the 8 gofmt-dirty files (item 17). Fix: gofmt -w the 8 files, re-run gofmt -l (empty), re-run go test ./... + box validate, re-push via an added commit.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

The k8s→kubernetes rename lengthened map keys / struct fields across 8 files
(provider_deploy.go substrate map, the substrate_spec_aliases + fleet helpers
test maps, the k8sgen test struct fields) and the columns were not re-aligned;
gofmt flags all 8. Alignment-only — no semantic change; verified gofmt -l clean
and the charly + affected-candy module test suites pass.

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
@atrawog

atrawog commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: code + config + schema + migration + docs (the full cross-repo k8s→kubernetes cutover's superproject leg)

Head validated: 1058aa3a4875daf56f493a69a5a2f93ff8a85620 (authoritative, via git ls-remote origin feat/k8s-to-kubernetes). Nothing trusted from the author; every item re-derived independently.

Checklist

  • [PASS] 0. Security & anti-tampering (T1–T4): no exfiltration / scope-mismatch / weakened-gate / supply-chain finding; no attempt to manipulate. The rulebook diffs (CLAUDE.md/AGENTS.md) were evaluated as diffs against protected base 9a31b615 — both are accuracy fixes (cloud-init/k8s → cloud-init/k8s_object, matching the real egress schema-map key at candy/plugin-egress/main.go:46) plus the wire-key sweep (k8s: → kubernetes:); no gate weakened, no rulebook instruction adopted from the PR. Dependency surface: only the pinned spec bump (v0.2026219.1057 → v0.2026223.1018 in charly/go.mod + each candy go.mod), no new dependency.
  • [PASS] 1. Description complete: template filled with real evidence (pasted bed table, migration fixture output, R5 grep claims, attribution footer in the exact required form). One under-listing, dispositioned: the substrateFallbackRef R2 fix in charly/plugin_dispatch_reverse.go (commit 855f431) is not bullet-listed in the Summary — verified-non-blocking: the function carries a 12-line doc comment, a full RCA in the commit message (restores the connect the deleted pod-config seam threaded explicitly, so candy-less box/distro projects resolve deploy:kubernetes for charly config/from-box), a 6-case TestSubstrateFallbackRef (asserts the kubernetes default, fails without it — I ran it, green), and is R2-correct (fixed in-tree, not parked).
  • [PASS] 2. Change-class gate (R10/R7): runtime class; the correct bed by name — charly check run check-k8s-deploy, the only bed exercising the kubernetes: substrate path (k3s VM + kubernetes: deploy → Kustomize emission → kubectl apply -k → kube: deployment-object checks). Fresh-rebuild sequence in-bed (update-image → rebuild-members-down → re-bring-up-members → check-live-rebuild). No dry-run / rebuild-alone / scope-shrinking fraud.
  • [PASS] 3. Attribution tier: analysed on a live system is justified and not inflated — the changed runtime path ran live on the disposable bed with pasted output; the docs half is regeneration-reproducible, which caps the tier below fully tested and validated.
  • [PASS] 4. R0 skills honored (named + spot-checked): /charly-internals:go (SDD), /charly-build:migrate (migration), /charly-internals:git-workflow, /charly-internals:cutover-policy, /charly-kubernetes:kubernetes, /charly-internals:plugin, /charly-check:check, /charly-build:validate.
  • [PASS] 5. R1 RCA + zero warnings: the teardown reverse-op noise (reverse: rm-file-system failed: exit status 255 after Destroyed VM) is reported verbatim with an RCA (reverse ops run over SSH to the now-destroyed disposable VM, recorded non-fatally inside rebuild-members-down/cleanup-members, both ok:true, EXIT=0) — a log artifact of disposable-venue teardown, not a gate failure. The gate summary is clean: 10/10 ok:true, zero warnings. The bed-robustness improvement routes per R2's non-blocking mechanism — recommendation: name the thematic batch so it is tracked.
  • [PASS] 6. R2 no out-of-scope split: the false k8s-reserved claim class in the k3s-agent/k3s-server/plugin-k8sgen skill sources was swept in the same tree; the substrateFallbackRef fix is an in-tree R2 fix; nothing parked under a forbidden framing.
  • [PASS] 7. R3 no duplication: CUE defs are the single source; projections regenerate, never hand-edited.
  • [PASS] 8. R4 no workaround: the migration is declarative rename_key ops (k8s→kubernetes, kubernetes→deploy under under_kind: "kubernetes"); no bespoke Go, no sleep/retry/ad-hoc command.
  • [PASS] 9. R5 hard cutover + grep self-test (re-run by me at HEAD): git grep -n '\bk8s:\b' (excluding CHANGELOG/submodules) → zero live hits; K8s[A-Za-z]* → only the sanctioned deleted-identifier narrative at candy/charly-internals/charly.yml:5294, the migration test name, and base64 noise. Residual tokens are the documented confusables (k8sgen, k8s_object, the kube: verb, check-k8s* bed/skill names, the .opencharly/k8s/ output path).
  • [PASS] 10. R6/R8/R9: git safety (no destructive action, no force-push); generation reproducibility (charly marketplace generate/charly docs generate clean-tree no-ops) + egress validation on every emitted manifest; binary 2026.223.1905 built 10s after the final commit 1058aa3a, charly version matches source.
  • [PASS] 11. R10 disposable fresh-rebuild gate, cross-checked on disk: the bed is group: {disposable: true} (charly.yml:555); .check/check-k8s-deploy/2026.223.1907/summary.yml exists with calver: 2026.223.1907, 10/10 ok:true, total_seconds: 598 — matching the pasted table exactly, on the same binary (2026.223.1905) the PR names. Coverage that fails without the change: the kube: deployment-object checks assert the kubernetes: substrate applied the workload.
  • [PASS] 12. RDD/ADE/SDD at 100%: SDD reproduced — task cue:gen on the committed tree leaves git status clean; no hand-edited *_gen.go; wire types CUE-sourced via the landed spec producer; no new @go(-); the migration fixture ran live (2026.186.2323 → 2026.223.1018, idempotent on re-run); ADE N/A (no new candy plan authored).
  • [PASS] 13. Concurrency mandate + anti-cheat: no idle/serial cheat — the bed is a member roster run at group parallelism; every sweep claim carries executed evidence (I re-ran the greps at the real head); prior-round findings verified resolved, not rubber-stamped; no dead-code-in-touched-module pass; no unadvanced parking phrase.
  • [PASS] 14. Hard cutover: one atomic squash at merge (the 12-commit feat branch is the git-workflow accumulate-then-squash model); no Phase-2/TODO left in scope; plan executed as written.
  • [PASS] 15. ARCHITECTURE GATE — placement: CORRECT. Per-item trace for the 17 charly/*.go changes: all are mechanical kind-word/identifier sweeps or Data-map renames (provider_deploy.go "kubernetes": "candy/plugin-kube"); the single new function substrateFallbackRef is M (kind-blind plugin-dispatch mechanism reading the substrate→plugin Data map) — no per-capability seam leaked into core; no new charly/*_aliases.go; no new kit import; no *Legacy* relocation smell; import-purity test green.
  • [PASS] 16. Disposable-only autonomy: the only destroy/rebuild in the evidence is the disposable: true check-k8s-deploy group.
  • [PASS] 17. Clean architecture + Go gates (re-run by me): gofmt -l charly/ candy/ empty; golangci-lint run ./... 0 issues (isolated GOLANGCI_LINT_CACHE); go vet ./... clean; go test ./... ok; charly box validate EXIT=0.
  • [PASS] 18. CHANGELOG: CHANGELOG/2026.223.1018.md — filename matches ^\d{4}\.\d{3}\.\d{4}\.md$; H1 byte-equals # 2026.223.1018 — rename the deploy substrate kind \k8s:` → `kubernetes:`; no v2026.223.1018` tag on main; no duplicate.

Phase 1b — documentation scrutiny

Cold reader (mandatory) run: a general-purpose sub-agent forbidden every other source read README.md, VISION.md, GRIEVANCES.md, AGENTS.md, CLAUDE.md. Findings weighed per 1b:

  • g2 — claimed "mutually inconsistent k8s/k8s_object egress fragments": unverified-dismissed. Direct verification shows both AGENTS.md:49 and CLAUDE.md:36 carry the identical cloud-init/k8s_object/... fragment, matching the real egress schema-map key ("k8s_object": "#K8sObject"); k8s_object is a documented deliberate confusable, not a sweep miss. The reader (forbidden the codebase) could not know this.
  • g1 — group: substrate-set discrepancy (README lists 5 substrates, CLAUDE.md lists 6 incl. group:): verified-non-blocking. Pre-existing 1b.1#5 population discrepancy about group, a term this PR neither renamed nor introduced; both sides of the k8s sweep were swept consistently (zero residual k8s: wire-keys; all 11 substrate mentions swept to kubernetes:). Recommend the author reconcile or route to the doc-consistency batch.
  • g7 — kubernetes: "runs as a container" vs "emits a Kustomize overlay": verified-non-blocking. Comprehension-bridge gap; both statements are accurate (the image runs as a container; the deploy emits the overlay that applies it); same shape pre-rename.
  • g8 — lowercase kubernetes in VISION.md vs capitalized in README: verified-non-blocking. Casing style nit on two in-diff lines, not a comprehension defect.
  • The reader's remaining findings (undefined K-wave/P16/CUE/quadlets, the fixture-exclusion paragraph, the missing real-application deploy example, adoption-cost gaps) are all on lines this PR did not touch — pre-existing prose quality, outside this cutover's scope.

Mechanical 1b checks run by me: reader-state claims grep (you already|you probably|will feel|feels familiar|most tools|most toolchains|every other tool|no other tool|unlike most|nothing else does) → CLEAN; contradiction sweep → zero residual k8s: wire-keys in the superproject; source liveness verified (k8s_object egress key, ResolveKubernetesEntityViaExecutor/ResolveVmEntityViaExecutor/ResolveAndroidEntityViaExecutor live, check-k8s skill exists, spec pin landed); R4a — no new commands introduced; no new fenced config blocks.

Comments considered:

  • atrawog round-1 (2026-08-11, on abacd0c): FAIL (R5) — stale GenerateK8sKustomize in candy/plugin-k8sgen/charly.yml — verified-resolved: commit 4dfd3a5 renamed it to GenerateKubernetesKustomize; grep at HEAD returns only the sanctioned deleted-identifier narrative.
  • atrawog round-2 (2026-08-11, on 4dfd3a5): FAIL (item 17) — 8 gofmt-dirty files — verified-resolved: commit 1058aa3 fixed them; I re-ran gofmt -l charly/ candy/ → empty.

Cross-PR interactions considered: none found — swept all 12 repos (charly, spec, sdk, plugins, docs, distro-arch, distro-cachyos, distro-debian, distro-fedora, distro-ubuntu, pkg-fedora, pkg-debian); the only open PR anywhere is #242 itself.

Decision: APPROVED. All 18 checklist items PASS; the k8s→kubernetes cutover is complete on the final head, R10-proven on the disposable bed (10/10, fresh-rebuild re-check included), R5-clean, SDD-reproducible, architecturally correct, with no in-diff contradiction in the reader-facing prose. Finalizing merge-time CalVer, squash-merging, and tagging.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

Rename the CHANGELOG placeholder to the merge-time CalVer and stamp its H1.
The schema version surfaces (charly.yml version, migrations.cue entry) stay at
2026.223.1018 — strictly above the current main's 2026.204.1223 and matching the
landed spec producer's #SchemaVersion.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@atrawog
atrawog merged commit 7942b5c into main Aug 11, 2026
@atrawog
atrawog deleted the feat/k8s-to-kubernetes branch August 11, 2026 19:45
atrawog added a commit that referenced this pull request Aug 11, 2026
)

* feat(agentteams): foundation candies + core box + R10 bed (Unit 1)

The first three candies of the AgentTeams full-integration cutover — minio,
matrix, element — composed into the agentteams-core-app box on the cachyos
base, plus the check-agentteams-core-pod disposable R10 bed.

Candies (all rootless — every service runs as the image user, uid 1000,
against the /data volume; all start scripts are charly-owned write: steps,
never upstream install scripts):
- agentteams-minio: minio + mc extracted from higress/minio|mc:20260216
  (extract:), S3 API :9000 + console :9001, mc-mirror storage initializer
  (bucket + agentteams-config mirror). Root password self-provisions
  (env wins, else persisted /data/minio/.root-password).
- agentteams-matrix: tuwunel static binary extracted from
  higress/tuwunel:20260216, Matrix homeserver :6167 with the CONDUWUIT_* env
  the controller expects. Registration token self-provisions.
- agentteams-element: element-web static files extracted from
  higress/element-web:20260216, served by a rootless nginx :8088 (charly-owned
  config + start script regenerating config.json from env).

Box: agentteams-core-app (base: cachyos.cachyos). Bed:
check-agentteams-core-pod (disposable: true) — pod steady state + all three
component health probes, all as uid 1000 against /data.

Cross-repo (B2, producers landed first): this commit bumps ONLY the spec
gitlink to 5130501 (v0.2026223.1350, spec#22's DeployTargetRebuildOpts.Tag)
+ the charly/go.mod spec require to v0.2026223.1350. The sdk (e14cf3b7) and
plugins (413745a) gitlinks are already at their merged mains on charly main
via the k8s→kubernetes rename leg (#242): sdk#128's identifier rename +
sdk#127's download-creates-dest-dir fix ride in sdk e14cf3b7, and plugins#150's
regenerated image/layer skills (the extract: row, the download: behavior, the
charly-owned start scripts section) ride in plugins 413745a.

Also in-tree:
- plugin-box/validate_rules.go: HasExtract counts as an install file for ADE
  validation (extract:-only candies — agentteams is the first consumer).
- plugin-deploy-pod/lifecycle.go + plugin-check/bed_run.go: the update/rebuild
  tag threading pins the per-run bed tag so the fresh-rebuild gate
  (check-live-rebuild) verifies the JUST-BUILT image, never a stale cached one
  (the tag-CalVer tiebreak fix). The charly dispatch leg
  (charly/update_deploy_dispatch.go) lands in the follow-up commit on this
  branch — the pre-rename charly module cannot lint against the post-rename
  spec pin until the k8s→kubernetes rename leg (#242) is merged.
- candy/charly-image/charly.yml: the extract:/download:/charly-owned-scripts
  doc hunks the plugins skills were regenerated from.
- candy/plugin-{box,check,deploy-pod}/go.mod: spec require bumped to
  v0.2026223.1018 — the post-rename sdk's graph minimum, the same bump the
  k8s→kubernetes rename leg applies to all 88 candy go.mods. These three are
  the modules this cutover touches, so the pre-commit gate passes pre-rebase.

R10 gate: charly check run check-agentteams-core-pod (disposable) — PASS
(run 2026.223.1239, steps=13, zero warnings), all three self-provisioning
checks PASS exit=0 in both check-live and check-live-rebuild; 26/26 checks
on the pinned per-run image. Fresh-rebuild re-verified after commit.

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)

* charly: thread the per-run bed tag through update dispatch (Unit 1)

The charly dispatch leg of the update/rebuild tag threading: pins the
per-run bed tag through DeployTargetRebuildOpts.Tag so the fresh-rebuild
gate (check-live-rebuild) verifies the JUST-BUILT image, never a stale
cached one (the tag-CalVer tiebreak fix). The candy legs
(plugin-deploy-pod/lifecycle.go + plugin-check/bed_run.go) landed in the
preceding commit; this leg was split out because the pre-rename charly
module could not lint against the post-rename spec pin until the
k8s→kubernetes rename leg (#242) merged.

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)

* chore: bump plugins gitlink to 6a089de (v2026.223.1424)

plugins#150 (regenerated image/layer skills from the charly-image candy
docs, incl. the Agent Driven Evaluation (ADE) expansion) merged as 6a089de.
The charly repo's plugins submodule now points at the merged skills so the
regenerated docs match the candy-doc source this Unit-1 commit carries.

The sdk gitlink is deliberately NOT bumped to 2d01e8a (sdk#127): that
squash was based on pre-rename sdk main and reverted the vmshared K8s*
rename, so it fails to build against the post-rename spec pin in the
charly workspace (spec.K8s* undefined). The download-fix producer needs a
follow-up sdk PR re-applying the fix on post-rename main.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

* chore: finalize CHANGELOG for v2026.223.2032 (Unit 1 merge CalVer)

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant