Repository navigation
refactor(deploy)!: substrate resolution reads plugin-declared traits, not the kind word (P9 consumer) - #63
Conversation
… not the kind word (P9 consumer) Every deploy/check CONSULT site that branched on HOW a substrate behaves (venue, machine-ness, chain-leaf) now reads the plugin-declared #DeployTraits stamped onto node.Descent, never a switch/== on the concrete substrate kind word — closing the boundary-law incomplete-seams. The DECLARED trait table lives in the substrate plugin. - candy/plugin-substrate: declares the canonical per-word DeployTraits (pod=container+ image_backed+image_context; vm=ssh+machine_venue+exclusive_venue; local=shell+ machine_venue; k8s=shell+image_context+leaf_only; android=parent) — the single source kit.StampDescent stamps from. - plugin_provider_common.go/install_plan.go: capMeta.traits + declaredDeployTraits() + deployTraitsCarrier (mirrors Structural/Validates). - deploy_tree.go: deployTraitsFor/effectiveTarget/nodeTraits/deployTraitDescent; stampBundleDescents stamps via kit.StampDescent. - Consult sites de-branched: bundle_add_cmd, bundle_members, check_venue, check_cmd, check_score_kind, ephemeral_lifecycle, install_build_services, preempt — all read the trait, not node.Target=="<word>". HostContext.Target (never "vm" — dead arm) retired for a MachineVenue bool. - no_substrate_word_switch_gate_test.go (new): the P9 structural gate — an AST scan over BOTH charly/*.go AND sdk/deploykit/*.go that FAILS on any regrown .Target==<substrate> behaviour-branch, allowlisting only the loader/classifier (word-PRODUCING Data), the validators, the status collectors, and deploy_state.go findVmDeploy (persisted state where Descent is stripped — a tracked persist-descent follow-up). Teeth verified on both. - sdk submodule bumped to the merged P9 sdk; charly/go.mod require -> v0.2026192.2018. Behaviour-neutral. R10: check-charly-vm disposable vm bed 7/7 (incl. fresh update gate), check-substrate (all 5 kinds), check-group (pod+vm+android+teardown live), check-structkind, check-local — all PASS. go test ./... green; golangci-lint run+fmt clean; gofmt/vet clean. Assisted-by: Claude (fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly/sdk Go touching deploy resolution → RUNTIME Independent re-validation (fresh context, re-derived against BLOCKING —
|
…place traits (P9) Review-round fix for #63 (pr-validator: the checkLocalTarget de-branch was NOT behaviour-neutral for an external deploy-class substrate). deployTraitsFor uses providerRegistry.ResolveKind, which resolves only KIND-class words; an EXTERNAL deploy:<word> substrate (exampledeploy) is served by a deploy-target plugin, so it returned nil traits -> Venue=="" -> the new venue-only checkLocalTarget returned false -> CheckLiveCmd routed it to resolveContainer -> "container not running" for a deploy that builds no container. The green check-exampledeploy bed broke and was wrongly omitted from the roster. Fix: deployTraitsFor returns the external-in-place Venue "none" trait for a recognized external deploy substrate (isExternalDeploySubstrate -- a registry-recognition D-item, not a kind-word switch); checkLocalTarget host-routes the "none" venue alongside "shell"/"parent". Restores the behaviour the retired isExternalDeploySubstrate guard gave, now BY TRAIT (word-switch gate stays clean, teeth-verified on both trees). Docstring divergence swept. Proven on the check-exampledeploy disposable bed: PASS 5/5 -- check-live green (the step the regression broke) + the fresh update gate + zero-residue teardown, no scope-shrinking flags. go test ./... green; golangci-lint run+fmt clean; gofmt/vet clean. Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅ (re-validation after review-round fix 196257f)Change class: charly/sdk Go — deploy-resolution refactor (RUNTIME class) Fresh, independent re-derivation (no inheritance from the author or the prior verdict). Head validated: Checklist
Review-round fix — independently verified
Re-run by the validator (fresh)
Decision: The prior blocker (external DEPLOY-class substrate → nil traits → Assisted-by: Claude (analysed on a live system) |
pr-validator merge-time version stamp for #63 — renames the placeholder CHANGELOG entry to the generated merge-time CalVer and aligns its H1. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01W8GPhuyWWs5XwJyJYtCaxE
sdk PR #63 (status-substrate wire narrowing) merged as 1368316 via squash; plugins PR #80 (K5 status-subsystem skill sync) merged as 1a14544 via squash. Both squashes mint new commits distinct from the branch-tip commits this PR previously pinned (62894a3 / 6e28c72, both now orphaned, unreachable-from-main commits). Re-bumped to the real merged SHAs. Verified the assembled build is clean with both pins. Assisted-by: Claude Code Claude Sonnet 5 (fully tested and validated)
…imeout non-fix RCA on a live check-k3s-vm bed REFUTED #61's stated root cause (kubeconfig-wait timeout too tight): with wait_second bumped 120->300 the bed STILL failed at 5m, while guest inspection showed k3s healthy (API up ~44s) and the kubeconfig present and world-readable. The real defect is charly's artifact-retrieval reading a context that can't see the present guest file (intermittent — passed 07-25) — a separate, deeper bug that gets its own RCA cutover. Reverted the non-fix (wait_second back to 120); the batch lands the one genuine, proven fix (#57 command expect_non_zero, check-pod 13/13 live+fresh-rebuild). #58/#63 already-fixed on main; #60 probe absent. Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
…tness batch The `command:` check verb gains an `expect_non_zero` field (additive, optional) to assert a command SHOULD fail when the exact non-zero code is non-deterministic or irrelevant — the negative-expectation class that the base #Op exit_status matcher (one exact code) could not express. SDD: candy/plugin-command/schema/command.cue is the single source; task cue:gen regenerated params/cue_types_gen.go (reproducible no-op). RunVerb asserts exitCode != 0 when set and ignores exit_status; default false preserves the historic behaviour. Coverage: 3 unit tests (fail without the field) + a live check-expect-non-zero step in check-stack-layer, proven on check-pod 13/13 with exit=1 PASS in both fresh-rebuild phases. The post-#118 bed-robustness batch narrowed under RCA to this one genuine fix: #58 and #63 were already fixed on main, #60's described probe does not exist, and #61's stated root cause was refuted on a live bed (k3s healthy, kubeconfig present+readable) and reverted. CHANGELOG/2026.209.2249.md. Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
…hain's pins (#1230) * feat(plugins): publish the content kinds, and adopt the owned-skill chain's pins The host half of ops.OpContent (opencharly/sdk#598), and the five pins of the chain that installs a composed candy's owned skills. - buildCapMeta records ProvidedCapability.contents for a class:kind capability (capMeta.IsContentKind implements spec.ContentKindCarrier). The validate-word-sets leg publishes the declaring kind words, sorted, as content_kinds. They are read off each provider's own capability, never a per-kind branch. That set is what plugin-build's render-prep and plugin-box's validate ask. - The charly-skill-shelf's validate-satisfying no-op run: step is deleted: an owned skill node is install content now. - Pins, all merged and tagged: spec v0.2026325.913 (#415), sdk v0.2026325.921 (#607), plugin-box v0.2026325.928 (#92), plugin-build v0.2026325.959 (#62, #63), plugin-harness-kind v0.2026325.1012 (#13). They move together: the old plugin-box pin calls deploykit.CollectSkillBodies, which the new sdk deletes. Claude-Session: https://claude.ai/code/session_01Tvdn3vtn8FoWTMqGwqn4ZT Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942 Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system) * fix(deps): adopt the shared sdk/spec pins in the tools modules The required go check failed TestContractPinsMatchShared: the tools/generate-packages, tools/golden-cloudinit and tools/golden-compile modules still required sdk v0.2026324.1928 / spec v0.2026324.1914 while charly/go.mod moved to sdk v0.2026325.921 / spec v0.2026325.913. The previous commit moved the pins with go get inside charly/ only. charly task mods-tidy adopts the shared pins in every lockstep module and tidies them. The whole ci.yml go job passes locally: go test ./charly/..., every tools/* module (GOWORK=off -count=1), gofmt over charly and tools, and golangci-lint over both. Claude-Session: https://claude.ai/code/session_01Tvdn3vtn8FoWTMqGwqn4ZT Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942 Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)
Summary
The superproject (consumer) half of P9 (traits/descent de-branching). Every deploy/check CONSULT site that branched on HOW a substrate behaves (venue, machine-ness, chain-leaf) now reads the plugin-declared
#DeployTraitsstamped ontonode.Descent, never aswitch/==on the concrete substrate kind word — closing the boundary-law incomplete-seams. Producer: opencharly/sdk#26 (merged + taggedv0.2026192.2018).What moved to trait-reads
candy/plugin-substrate/plugin.godeclares the canonical per-wordDeployTraitstable (pod=container+image_backed+image_context; vm=ssh+machine_venue+exclusive_venue; local=shell+machine_venue; k8s=shell+image_context+leaf_only; android=parent) — the single sourcekit.StampDescentstamps from.plugin_provider_common.go/install_plan.go:capMeta.traits+declaredDeployTraits()+deployTraitsCarrier(mirrors Structural/Validates).deploy_tree.go:deployTraitsFor/effectiveTarget/nodeTraits/deployTraitDescent;stampBundleDescentsviakit.StampDescent.node.Target == "<word>"):bundle_add_cmd,bundle_members,check_venue,check_cmd,check_score_kind,ephemeral_lifecycle,install_build_services,preempt.HostContext.Target(never "vm" — a dead arm) retired for aMachineVenuebool.The structural gate (with teeth on BOTH trees)
no_substrate_word_switch_gate_test.go(new) — an AST scan over bothcharly/*.goANDsdk/deploykit/*.gothat FAILS on any regrown.Target (==|!=) "<substrate>"behaviour-branch, allowlisting only: the loader/classifier (word-PRODUCING Data), the validators, the status collectors (P14), andsdk/deploykit/deploy_state.gofindVmDeploy— the one persisted-state site wherenode.Descentis stripped on save, so it must read the persistedTarget(a tracked persist-descent follow-up). Teeth verified: injecting.Target == "vm"into a charly consult file AND intosdk/deploykit/deploy_chain.goboth trip the gate; revert → pass.Change class
charly Go touching deploy resolution → RUNTIME class. Gate:
go test ./...+task build:charly+ disposable beds exercising every substrate. Behaviour-neutral.Review-round fix (196257f)
The first evaluation FAILED on a real regression: the
checkLocalTargetde-branch was NOT behaviour-neutral for an external DEPLOY-class substrate.deployTraitsForusesResolveKind(KIND-class only), so an externaldeploy:<word>substrate (exampledeploy, served by a deploy-target plugin) got nil traits →Venue==""→ the venue-onlycheckLocalTargetreturned false →check livehit "container not running". Fixed:deployTraitsForreturns the external-in-placeVenue:"none"trait for a recognized external deploy substrate (isExternalDeploySubstrate— a registry-recognition D-item, not a kind-word switch);checkLocalTargethost-routes thenonevenue alongsideshell/parent. Restores the retiredisExternalDeploySubstrateguard's behaviour, now BY TRAIT (the word-switch gate stays clean). Thecheck-exampledeploybed I wrongly omitted is now in the roster and green.R10 evidence
check-exampledeploy(external deploy substrate) — PASS 5/5 (the regression bed): deploy-add · bring-up-members · check-live (6s — the step the regression broke, now green) · update (29s, fresh-rebuild gate) · cleanup (zero-residue teardown). exit 0,total_seconds: 63, no scope-shrinking flags.check-charly-vm(vm) — PASS 7/7,total_seconds: 229(.check/check-charly-vm/2026.192.1956/summary.yml): vm-build · vm-create · deploy-add · bring-up-members · check-live · update (99s, the R10 fresh-rebuild gate) · cleanup. Exercises vm descent +findVmDeploy+ deploy/teardown live.check-substrate(all 5 substrate kind resolutions) ·check-group(pod+vm+android+teardown, live — built a qcow2 VM + drove appium) ·check-structkind·check-local— all PASS.go test ./...green;golangci-lint run0 issues +golangci-lint fmt --diffclean;gofmt -l charly/*.go/go vetclean.CLAUDE.md rule compliance
findVmDeploy) is genuinely separable (persisted-state, Descent stripped on save); disclosed + gate-allowlisted + tracked as a follow-up cutover, not an "out of scope" dodge.descentForTarget/dead post-order walk were the dups (removed in the sdk half).HostContext.Targetretired;git grepon the de-branched identifiers is clean.charly updaterebuild; the deployed binary matches source (--dev-local-pkg).Assisted-by: Claude (fully tested and validated)