Repository navigation
refactor(deploy): single-source preempt consts to spec + kill 3 test-only aliases (K4 Bucket D) - #91
Conversation
…only aliases (K4 Bucket D) R3 dedup: delete the package-main PreemptStop/Restore consts (deploy.go) that duplicated spec.Preempt* (sdk/spec/arbiter_wire.go); validate_preempt.go + preempt_schema_test.go reference spec.* directly (identical values, behavior-preserving). Convert 3 test-only deploykit aliases (bundleWalkPostOrder/preemptEffectiveStop/encryptedPlainDir) to deploykit.X in their tests and delete the alias entries. R1: remove the dangling occupiedHostPorts doc-comment (the func relocated to sdk/deploykit). The host-type-free K4 residue; the resolution-body relocation is section 4.2-gated on the S-K5 #ResolvedProject envelope (next-wave). Net charly/ non-test -13. Gated: charly check run check-preempt-local PASS 5/5 exit=0 on the frozen final code through the fresh-charly-update cycle (the validate_preempt surface the const-dedup touches). Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01XSv38sdYqre3yzzDTENzgG
pr-validator — APPROVED ✅Change class: charly Go (runtime) — behavior-preserving const-single-source refactor (K4 Bucket D) Independently re-derived from the PR + repo + CLAUDE.md + the git-workflow/go/plugin skills (loaded by path). Head Checklist (every rule; [N/A] where the class excludes it):
Decision: All rules satisfied on my independent re-derivation. The change is a clean R3 dedup (preempt consts → Assisted-by: Claude (analysed on a live system) |
Evaluator merge-time version stamp: rename the placeholder CHANGELOG to the finalized 2026.194.1254 and rewrite its H1 to match. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01H4fhMBpXvVTpgcpVPnUmpV
… + box-authoring → command:authoring (P14b) feat(p14)!: consolidate status collectors → substrate OpStatus + box-authoring → command:authoring The consolidated P14-remainder cutover — TWO disjoint, already-implemented cutovers landed as ONE atomic superproject cutover via a 3-leg B2 multi-repo landing (sdk → plugins → super). Net core LOC negative (1301 insertions / 1486 deletions on the super leg; the plugin grows, core shrinks). Leg 0 (sdk, merged 5303941, tag v0.2026196.449, PR opencharly/sdk#53): CUE-sourced wire carriers for the status-collector host↔plugin seam — #SubstrateStatusRequest / #SubstrateStatusReply + StatusFromState (R3 single-source). Leg 1 (plugins, merged 93b3010, tag v2026.196.0456, PR opencharly/marketplace#64): skill-doc R5 sweep for both halves (documentation reviewed). Leg 2 (super, this merge): P14a — status COLLECTORS clean subset → substrate OpStatus (HOW A): charly/{cdp_preresolve,status_collect_local,status_collect_pod,status_probes, status_golden_test,status_live_mounts_test,status_quadlet_test}.go + their tests DELETED from core; the LIVE collection half + the probes + the cdp devToolsTab decode MOVED to candy/plugin-substrate over the new OpStatus wire seam; enginekit shed from charly/ core imports. The 7 deploy-cone-coupled status files STAY host until K5 (PR #91). Deleted host tests faithfully relocated to candy/plugin-substrate/status_test.go (26 tests, no coverage dropped). P14b — box-authoring command family → command:authoring plugin: charly/scaffold_cmds.go + scaffold_project.go (399 LOC) DELETED; the 5 pure verbs run on sdk/kit (zero core reentry); box fetch/refresh reenter core over the new hidden __box-fetch/__box-refresh reentry via HostBuild("cli"). R5 sweep: cdp_preresolve.go → check_endpoint_resolve.go (candy/plugin-cdp/methods.go); status_golden_test.go → relocated plugin golden (candy/plugin-status/charly.yml). Gitlink bumps: sdk → 5303941; plugins → 93b3010; charly/go.mod require → v0.2026196.449. Verification (worktree binary, task build:binary, NOT installed): go test ./... (charly): ok 80.709s candy/plugin-{substrate,authoring,status,cdp}: go test/build ok golangci-lint run (charly): 0 issues gofmt -l (charly): empty go vet ./... (charly): clean task cue:gen (super): reproducible (no drift) R5 grep self-test: deleted identifiers only in CHANGELOG/ + "moved from" help-text R10 bed — charly check run check-commands-local (disposable: true): summary.yml ok: true, 5/5 steps (deploy-add 70s, bring-up 0s, check-live 27s, update 89s [fresh charly update], cleanup 19s), total 205s. check-live 7/7 passed incl. status-runs (P14a charly status via status-substrate seam → substrate OpStatusCollect) + box-authoring-dispatches (P14b authoring verbs). ZERO warnings. Moved code executed LIVE on the worktree binary. Architecture gate: placement CORRECT. Status collectors → R (substrate plugin OpStatusCollect). Host fan-out/enrichment → M (kind-blind dispatch by word, stays core). vm/k8s/android collectors stay host-side (deploy-cone-coupled, K5-gated, named exit). enginekit shed from core. command:authoring → R (command class plugin). box_fetch_reentry → K5-doomed hidden reentry (tracked residue, named K5 exit). No new charly/*_aliases.go; no new charly sdk-kit import. Net charly/*.go LOC −2128. Assisted-by: Claude (fully tested and validated)
plugins#91 landed as squash 9caed76 (tag v2026.200.1455); its fresh validator proved tree-equality with the validated head 680188f. The superproject gitlink moves from the feat candidate commit 5917a23 to the merged protected-main commit (B2: the pointer references a commit on the submodule's real main). Verified via git diff --cached --submodule=short (exactly 5917a23..9caed76) and post-commit git ls-tree HEAD plugins. Assisted-by: Kimi Code Moonshot Kimi K3 (analysed on a live system)
…cendant-wins main advanced with the #152/#153 plugins-submodule bumps (now at plugins main a58da76 = post-#95); the branch recorded 9caed76 (post-#91). The gitlink conflict resolves descendant-wins to a58da76 (a descendant of 9caed76: #93/#94/#95 are docs-only skill accuracy fixes), so the branch cannot regress main's pointer. Delta gate: charly box validate re-run. Assisted-by: Kimi Code Moonshot Kimi K3 (analysed on a live system)
Summary
K4 Bucket D — the small, host-type-FREE residue of the deploy-resolution wave. The K4 survey established that the bulk of the deploy-resolution surface is envelope-gated (consumes
*BoxMetadata→ §4.2 WAITS for the S-K5#ResolvedProjectenvelope), KEEP-FABRIC (the wire-broker / substrate-lifecycle proxy / registry dispatch), or reassigned to other owners. This lands the host-type-free residue now; the resolution-body relocation is next-wave.Change class
Code (Go refactor + dead-code/comment removal), behavior-preserving. Tier:
fully tested and validated.What changed
specsingle-source (R3 dedup). Deleted the package-mainPreemptStopShutdown/PreemptRestoreAlways/PreemptRestoreSuccessconsts indeploy.gothat duplicatedspec.Preempt*(sdk/spec/arbiter_wire.go);validate_preempt.go+preempt_schema_test.goreferencespec.*directly. Identical string values.bundleWalkPostOrder/preemptEffectiveStop/encryptedPlainDir→deploykit.Xin their tests; alias entries removed (preemptEffectiveRestorestays — non-test caller inarbiter_host.go).occupiedHostPortsdoc-comment indeploy.go(the func relocated tosdk/deploykit).R10 evidence
check-preempt-localcomposescheck-preempt-app= thevalidate_preemptsurface the const-dedup touches — the matched gate, exercised on the frozen final code through the fresh-charly updatecycle.Gates (all green)
go buildcharly + sdk + full per-worktree binary → EXIT 0go test ./...charly →ok 60s; sdk kit + sdk spec (cue:gen repro) → okgolangci-lintcharly → 0 issues; gofmt cleanbundleWalkPostOrder/preemptEffectiveStop/encryptedPlainDir/occupiedHostPorts/ barePreemptStop*→ all 0charly/non-test delta: −13 LOCDeferred to K5 (registered, not neglect)
InjectSecretsIntoPlans→ deploykit + thegenerateRandomSecretTokenR3-dedup (duplicate incandy/plugin-secrets) ride the K5 consumer move.config_imagerunConfig→ deploykit) is §4.2-gated on the now-PROVEN#ResolvedProjectenvelope; next-wave as its first consumer.sdk/kit/deploy_types.gostale-comment fix is committed + pushed on the sdk feat branch (durable), riding the next-wave sdk PR.R0–R10
R0 skills loaded before any action · R1 both divergences fixed/registered · R3 const dedup · R5 grep self-test all-0 · R7/R10
check-preempt-localPASS on a freshcharly update· behavior-preserving refactor with the matched deploy bed as the acceptance gate.https://claude.ai/code/session_01XSv38sdYqre3yzzDTENzgG
Assisted-by: Claude (fully tested and validated)