Repository navigation
feat(p14)!: consolidate status collectors → substrate OpStatus (P14a) + box-authoring → command:authoring (P14b) - #121
Conversation
…and:authoring plugin Move the charly box AUTHORING command family (set/add-candy/rm-candy/fetch/refresh/write/cat) out of charly/ core into the NEW compiled-in command:authoring plugin (candy/plugin-authoring, P14b) — the sibling of command:alias (#68) + command:box (P15). charly/scaffold_cmds.go + charly/scaffold_project.go (399 LOC) are DELETED; the plugin grows. Net core LOC negative. The 5 PURE verbs (set/add-candy/rm-candy/write/cat) run on sdk/kit (kit.SetByDotPath / kit.MappingChild / kit.SaveYAMLNodeFile) + the moved addCandyToBox/removeCandyFromBox yaml.Node helpers + the moved resolveProjectFile path-traversal guard — ZERO core reentry. box fetch/refresh reach the host-coupled repo resolver (ResolveProjectRepo -> EnsureRepoDownloaded: CHARLY_REPO_OVERRIDE + the refs-backend dispatch + the command:migrate auto-migration) over the NEW hidden core __box-fetch/__box-refresh reentry (charly/box_fetch_reentry.go) via HostBuild("cli") — the SAME seam candy/plugin-box's pkg verb uses for __box-pkg. The 7 command words nest under box (CommandParent()=="box"); compiled_plugins adds plugin-authoring. Cone-refs RDD-resolved: UnifiedFileName/DefaultBoxDir are already kit.*; no NEW core symbol export needed (no architectural crossroad). Golden byte-parity: the mutated charly.yml sha is byte-identical pre/post-move; fetch/refresh success byte-identical (failure follows the box pkg reentry pattern). R5 sweep: the plugins skill docs (charly-internals:go + charly-build:new) that named the deleted charly/scaffold_*.go are swept in the plugins leg (PR #64, docs-only); the super plugins gitlink bump to that merged commit follows. charly/scaffold.go skill row is PRE-EXISTING stale (left for docs batch #27). R10: go test ./... green (TestPluginsGenReproducible PASS); golangci-lint 0; gofmt/vet clean; task cue:gen reproducible; task build:binary built; golden parity spike PASS (plugin handlers executed live, output pasted); charly box validate PASS; the box-authoring-dispatches bed step PASS. The check-commands-local bed (HOST-LOCAL) is the orchestrator's persistent-session task; the fresh-rebuild R10 + the fully-tested-and-validated tier follow on its PASS. Assisted-by: Claude (analysed on a live system)
… + box-authoring → command:authoring (P14b) 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+/1486- on the super leg; the plugins grow, core shrinks). Max-core-reduction hardline honored. 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 (no deploy-cone crosses the seam) + StatusFromState (the shared pure state-vocabulary mapper, R3 single-source). Generated via task cue:gen (SDD). Leg 1 (plugins, merged 93b3010, tag v2026.196.0456, PR opencharly/marketplace#64): skill-doc R5 sweep for both halves (documentation reviewed) — the scaffold rows → box_fetch_reentry.go + candy/plugin-authoring; the status row split + cdp_preresolve.go → candy/plugin-substrate/status_probes.go; sibling-set the prior p14b sweep missed. Leg 2 (super, this commit): 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 (status_collect/local/pod/probes/test.go) 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: BundleConfig stays in deploy.go until K5) — forward motion that UNBLOCKS K5 (the OpStatus seam exists for the remaining 7 to move into at K5). Deleted host tests faithfully relocated to candy/plugin-substrate/status_test.go (no coverage dropped). P14b — box-authoring command family → command:authoring plugin: charly/scaffold_cmds.go + scaffold_project.go DELETED from core; candy/plugin-authoring owns box set/add-candy/rm-candy/write/cat + the yaml.Node candy-list editors + resolveProjectFile (path-traversal guard) on sdk/kit, zero core reentry; box_fetch_reentry.go keeps the hidden __box-fetch/__box-refresh reentry (host-coupled repo resolver). gitlinks bumped to the merged sdk (5303941) + plugins (93b3010) commits; charly/go.mod require → v0.2026196.449. R10: charly check run check-commands-local on the worktree binary (disposable: true) — 7/7 check-live steps passed (charly status render + status --json over the status-substrate seam; box authoring verbs end-to-end with zero core reentry), fresh-rebuild update step ok, zero warnings, exit 0. Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅Change class: charly/sdk Go (RUNTIME) — code moves + new compiled-in plugin + gitlink bumps. Phase 1 — independent re-derivation (trust no author claim)0. Security & anti-tampering (T1–T4): PASS — no scope mismatch, no exfiltration, no weakened guardrails, no supply-chain finding; no embedded directives. 1. Description complete: PASS — template filled (Summary per-leg, R10-tested with pasted summary.yml + check-live output, Attribution tier justified, R0–R10 checklist with HOW per rule). 2. Change-class gate matches pasted evidence: PASS — runtime class; re-ran gates on the worktree: 3. Attribution tier justified: PASS — 4. R0 skills honored: PASS — loaded by path: git-workflow, plugin, check, agents. Spot-checked boundary law, bed semantics, CalVer. 5. R1 RCA / ZERO warnings: PASS — no failures or warnings in any gate. 6. R2 no pre-existing/out-of-scope split: PASS — every surfaced issue fixed in-cutover; R5 sibling-set sweep covered. 7. R3 no duplication: PASS — 8. R4 no ad-hoc workaround: PASS — synchronization-free seam; pure functions; CUE-sourced wire. 9. R5 hard cutover + grep self-test: PASS — deleted identifiers only in "moved from" help-text + CHANGELOG; no transitional/dual-mode in final code. 10. R6/R8/R9 artifact + binary integrity: PASS — no destructive git action; cue_types_gen.go regenerated + no drift; worktree binary CalVer-stamped with P14a+P14b content markers. 11. R10 disposable-only, fresh-rebuild, coverage: PASS — disposable: true bed; fresh-rebuild update ok; ZERO warnings; 26 relocated tests + bed steps prove the move; coverage that would FAIL without it is present. 12. RDD / ADE / SDD: PASS — high-risk composition proven on disposable bed; candies ship description: + plan: + check:; status wire types CUE-sourced (sdk/schema/status.cue → generated cue_types_gen.go); status_types.go is the legal non-wire pure-mapper; plugin-authoring is INPUT-LESS (no schema required). No hand-edited generated files. No unjustified @go(-). 13. Concurrency mandate + anti-cheat: PASS — not a shared-state-path change; read-only fan-out; no concurrent-roster claim; no idle/serial cheat. 14. Hard cutover — one atomic commit: PASS — ONE commit (756cc2d); two disjoint cutovers in ONE atomic super cutover; no Phase-2/TODO. 15. ARCHITECTURE GATE — placement review: PASS —
16. Disposable-only autonomy: PASS — bed is disposable: true; no non-disposable resource destroyed. 17. Clean architecture + go gates: PASS — gofmt/lint/vet/test all clean; plugin-authoring + plugin-substrate GOWORK=off build/test clean. 18. CHANGELOG present: PASS — placeholder staged, finalized to 2026.196.0525 at merge. Gitlink ancestor verification
Decision: PASS — merged (squash) + tagged
|
…ly tested and validated)
pr-validator — second independent confirmation ✅ (PR already merged)A second fresh What I independently re-derived (not rubber-stamped)
Merge correctness verified on
|
…to the reverse-leg carrier The in-pod step carrier (InvokeProvider ClassVerb/ops.OpRun branch) decodes the wire spec.CheckEnv into a hostCheckCarrier but never unwrapped the candy source-dir map, so checkhost.ResolveCommittedApk scanned 0 candies for an in-venue step's relative apk: path -- check-android-emulator-pod's adb-install-apidemos / appium-install-apidemos failed with "0 candies scanned" (calver 2026.250.1712) even though the in-venue runner already folded the map (candyDirsFromEnvelope) into its config. The wire field #CheckEnv.candy_dirs landed in spec PR #121 (v0.2026250.1815); the sender half lands in plugin-check PR #37. This change unwraps it here (carrier.candyDirs = env.CandyDirs), so the host-side resolveCheckApk anchors an in-pod step IDENTICALLY to an out-of-pod step, and re-emits it (snapshotCheckEnv, so a nested out-of-process verb dispatch carries the map across the second hop). spec re-pinned to v0.2026250.1815. Regression tests mirror the out-of-pod path's TestResolveCheckApk through the wire decode + carrier construction. Assisted-by: pi (fully tested and validated)
…to the reverse-leg carrier (#562) * fix(check): unwrap the check-run candy dirs from the wire CheckEnv into the reverse-leg carrier The in-pod step carrier (InvokeProvider ClassVerb/ops.OpRun branch) decodes the wire spec.CheckEnv into a hostCheckCarrier but never unwrapped the candy source-dir map, so checkhost.ResolveCommittedApk scanned 0 candies for an in-venue step's relative apk: path -- check-android-emulator-pod's adb-install-apidemos / appium-install-apidemos failed with "0 candies scanned" (calver 2026.250.1712) even though the in-venue runner already folded the map (candyDirsFromEnvelope) into its config. The wire field #CheckEnv.candy_dirs landed in spec PR #121 (v0.2026250.1815); the sender half lands in plugin-check PR #37. This change unwraps it here (carrier.candyDirs = env.CandyDirs), so the host-side resolveCheckApk anchors an in-pod step IDENTICALLY to an out-of-pod step, and re-emits it (snapshotCheckEnv, so a nested out-of-process verb dispatch carries the map across the second hop). spec re-pinned to v0.2026250.1815. Regression tests mirror the out-of-pod path's TestResolveCheckApk through the wire decode + carrier construction. Assisted-by: pi (fully tested and validated) * chore(plugins): pin compiled-in plugin-check v0.2026250.1816 (the CheckEnv.candy_dirs sender, PR #36) The compiled-in plugin-check must carry the sender half (pluginSnapshotCheckEnv threads RunnerConfig.CandyDirs onto the wire CheckEnv) for the host-side unwrapping this PR adds; v0.2026250.724 predates it. MVS resolves spec at v0.2026250.1815 (this PR's pin) so the sender compiles. Assisted-by: pi (fully tested and validated) * fix(deps): drop the local worktree replace from go.mod (CI builds from the pinned tags) The compiled-in plugin-check v0.2026250.1816 + spec v0.2026250.1815 pins resolve cleanly from the proxy; the local absolute-path replace was a developer-only build aid and must not ship. Assisted-by: pi (fully tested and validated) * chore(plugins): pin compiled-in plugin-check v0.2026250.1843 (post-#37 tag with the spec-1815 pin) The #37 merge (pure spec pin bump) was tagged v2026.250.1843; pin the compiled-in plugin-check at that tag instead of v0.2026250.1816 so the module's own go.mod requirement is consistent with the resolved spec. Assisted-by: pi (fully tested and validated) * fix(check): gofmt plugin_dispatch_reverse.go (ci gofmt gate) * test: paste the live check-live proof of the in-pod committed-APK anchor (E-2 recipe) Live run (branch-built binary, calver 2026.250.1843, disposable android pod, charly check live check-android-emulator-pod from distro-cachyos with CHARLY_REPO_OVERRIDE): BEFORE (pre-fix, calver 2026.250.1712): committed APK "tests/data/ApiDemos-debug.apk": candy "pod-android-emulator-layer" is absent from the source scan (0 candies scanned) — cannot anchor the fixture AFTER (this branch): FAIL check adb=install [adb-install-apidemos] verb "adb": committed APK "./tests/data/ApiDemos-debug.apk" not found under candy source tree ".../[email protected]" (searched every ancestor up to the filesystem root) The map lookup now succeeds (the wire carries CandyDirs → the host carrier unwraps it → checkhost.ResolveCommittedApk finds the candy key); the residual file-walk failure is the bed's pinned layer tag v2026.243.1812, which predates layer PR #5 (the committed fixture shipped at v2026.250.1834) — a bed-side pin bump owned by the E-4 lane, not this core change. Full detail in the PR body. Assisted-by: pi (analysed on a live system)
P14-remainder: consolidate status collectors → substrate OpStatus (P14a) + box-authoring → command:authoring (P14b)
Leg 2 (the super leg) of the consolidated P14-remainder 3-leg B2 landing (sdk → plugins → super).
TWO disjoint, already-implemented cutovers landed as ONE atomic superproject cutover. Net core LOC
negative (1301 insertions / 1486 deletions; the plugin grows, core shrinks). The two producer legs
merged first: sdk PR opencharly/sdk#53 (merged
5303941, tagv0.2026196.449) + plugins PRopencharly/marketplace#64 (merged
93b3010, tagv2026.196.0456); this super leg bumps the gitlinks tothose merged commits +
charly/go.modrequire, and lands the code moves.What lands (super leg)
P14a — status COLLECTORS clean subset → substrate OpStatus (HOW A)
The cleanly-movable status collectors (pod live + local + the probes) relocate from
charly/coreinto
candy/plugin-substrate, served on the substrate kind provider'sOpStatusCollect(Invoke byword pod/vm/k8s/local/android). The host keeps the kind-blind fan-out + deploy enrichment (a generic
MECHANISM) + the vm/k8s/android collectors (deploy-cone-coupled → stay until K5). The
enginekitimport is SHED from
charly/core (the 3 status files that imported it moved; the pod livecollection now runs in the plugin).
charly/cdp_preresolve.go(+test),charly/status_collect_local.go(+test),charly/status_collect_pod.go,charly/status_probes.go,charly/status_golden_test.go,charly/status_live_mounts_test.go,charly/status_quadlet_test.go.candy/plugin-substrate:status_collect.go,status_local.go,status_pod.go,status_probes.go(git-detected rename),status_test.go(faithful coverage relocation —TestCollectPodLiveGoldenfor the pod-live transform + the probe/live-mounts/quadlet/local tests;no coverage dropped).
charly/status_collector.go(engine that stays — fan-out + enrichment, enginekitshed),
charly/status_substrate.go(thestatus-substrateHostBuild seam),charly/status_collect_vm.go(vm collector stays, uses shared
spec.StatusFromState),charly/status_test.go.candy/plugin-substrate/{charly.yml, plugin.go}(theOpStatuscapability +OpStatusCollectInvoke handler).P14b — box-authoring command family → command:authoring plugin
charly boxAUTHORING verbs (set/add-candy/rm-candy/fetch/refresh/write/cat) moved out ofcharly/core into the NEW compiled-in
command:authoringplugin (candy/plugin-authoring, sibling ofcommand:alias#68 +command:boxP15).charly/scaffold_cmds.go+charly/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-refreshreentry (charly/box_fetch_reentry.go) viaHostBuild("cli").R5 sweep (super code comments + candy docs, claim-keyed)
candy/plugin-cdp/methods.go— cdp endpoint comment:charly/cdp_preresolve.go(deleted) →charly/check_endpoint_resolve.go(thecc.ResolveEndpointreverse-leg).candy/plugin-status/charly.yml— host collection engine parity reference: deletedcharly/status_golden_test.go(TestStatusCollectGoldenParity) → relocated plugin goldenTestCollectPodLiveGolden(candy/plugin-substrate/status_test.go).Gitlink bumps
sdk→5303941(merged docs(changelog): fix 2026.191.1517 H1 to match its filename and tag #53, tagv0.2026196.449);charly/go.modrequire →v0.2026196.449.plugins→93b3010(merged feat(vm)!: externalize the VM CLI into compiled-in command:vm (P10) #64, tagv2026.196.0456).Verification (super leg, on the worktree binary
task build:binary, NOT installed)R10 bed —
charly check run check-commands-local(disposable: true)Exercises BOTH the P14b authoring verbs (set/add-candy/rm-candy/write/cat) AND the P14a
charly status(command:status →
status-substrateHostBuild seam → substrate pluginOpStatusCollect) live onthe worktree binary (
PATH=$PWD/bin:$PATH). The bed is akind: local+host: local+disposable: truedeploy whose template composes ONLY the command plugins (no install content) and whose plan isall safe read-only /
--help/--dry-run/ scaffold-into-/tmpsteps.Exploratory + fresh-
charly updateR10 output (pasted):charly check run check-commands-local(worktree binary,PATH=$PWD/bin:$PATH) — exit 0..check/check-commands-local/2026.196.0506/summary.yml:check-live (7 steps: 7 passed, 0 failed, 0 skipped) — the two P14-relevant steps:
ZERO warnings. The moved code (P14a status collectors via the status-substrate seam → substrate
OpStatusCollect; P14b authoring verbs viacommand:authoring) executed LIVE against the worktreebinary, and the fresh-
charly updaterebuild step passed.R0–R10 checklist
git-workflow,plugin,agents,check)spec.StatusFromStateis the ONE mapper (plugin + host vm collector);TestCollectPodLiveGoldenrelocates the goldengo test+ build + the disposable bed on the worktree binary (the moved code executed live); freshcharly updatein the bedcue_types_gen.goreproducible (sdk leg, run twice clean); supertask cue:genno drifttask build:binary, CalVer-stamped; content markers confirm P14a+P14b code in bin)charly status/authoring steps prove the moveStatusFromStatelegal non-wire pure-mappercommand:authoringis the command-class plugin (R). No new alias, no new charly kit import.Tier
Assisted-by: Claude (fully tested and validated)— the disposable bed ran on the FINAL worktreecode (worktree binary), exercising the P14a moved status collectors + the P14b authoring verbs live;
fresh-
charly updatein the bed; both R10 outputs pasted; ZERO warnings.Assisted-by: Claude (fully tested and validated)