Repository navigation
feat(deploykit)!: owned content — render-prep asks the content kinds, the render installs what they contribute - #607
Conversation
… the render installs what they contribute The build kit's half of ops.OpContent (#598, #444). Render-prep builds one OwnedContentRequest per content kind for each box (OwnedContentRequestFor: the image user, the composed candies with their repo roots, the scope's images, and the kind's raw nodes from the box's OWNING scope — a namespace's own document for arch.arch), asks it through the new Generator.Content seam (kinds = the envelope's content_kinds, Ask wired by the plugin driving the build), keeps the files as the box's owned_content render cache and bakes the labels as BakedLabelSet.Contributed; a kind's diagnostics, a label two kinds claim, and declared kinds with no Ask all fail the build. The render stages the files into .build/_content/<box>/ and emits one COPY --chown onto the image user's home; contributed labels go through the JSON label writer. The skill collector (CollectSkills, CollectSkillBodies, projectSkill, readSkillFile) is DELETED from sdk: the skill kind's rules belong to kind:skill (opencharly/plugin-harness-kind, D-PLUG-1), where its tests move. ProjectCandy is the one candy projection both resolve scopes use and UnionOwnedSkills merges ownership across scopes. FillNamespaceBoxViews takes the content source; buildBakedMetadata can no longer fail and loses its error return. sdk.ProvidedCapability maps Contents onto the wire. go.mod pins the merged contract, github.com/opencharly/spec v0.2026325.913 (opencharly/spec#415). sdk.OpContent re-exports the selector beside sdk.OpLoad. The sdk-skill-shelf's validate-satisfying no-op run: step is deleted (an owned skill node is install content). The scratch stage's root-relative copy probe (rootCopySources, the partial sdk#444 fix) is DELETED: measured org-wide, its only users were the three skill carriers' copy: .agents/skills steps (distro-arch, distro-debian, distro-ubuntu), which this cutover removes. candyRepoRoot gains direct tests for every loader shape (its coverage used to come through the deleted collector). Every behaviour is mutation-checked. 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)
|
HOLDING HOLDING — this PR is the second producer of the #598 chain (it pins the merged contract, opencharly/spec#415
Agent: |
Review — PASSHead SHA: Change class: code/config (deploykit + loaderkit + root Comment disposition: @aitrawog's Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
CLEARED CLEARED — merged (tag Agent: |
Summary
The build kit's half of #598, on the contract merged in opencharly/spec#415 (
v0.2026325.913). A node of a plugin kind can be owned by a candy, and what it contributes to an image is now the KIND's to say (DESIGN §1.1 M1, D-PLUG-1). This kit stops interpreting skill nodes. Instead it asks every kind that declarescontents, throughops.OpContent, and installs what the kind replies:OwnedContentRequestForbuilds one box's request: the image user, the composed candies with the roots of the repos that author them (candyRepoRoot), the scope's images, and the kind's raw nodes from the box's owning scope. Forarch.archthat scope is the imported namespace's own document. Reading the root's nodes for an imported box gave it no skills at all.Generator.Contentseam, anOwnedContentSource(kinds = the envelope'scontent_kinds;Askwired by the plugin driving the build). The files become the box'sowned_contentrender cache, and the labels becomeBakedLabelSet.Contributed. A kind's diagnostics fail the build, as does a label two kinds both claim, or declared kinds with noAsk.EmitOwnedContentstages the files into.build/_content/<box>/and emits ONECOPY --chown=<uid>:<gid> … <home>/, reading nothing but the box (the plugin-build render runs withConfignil).WriteLabelswrites contributed labels through the JSON label writer, so non-ASCII skill prose is never%q-escaped.CollectSkills,CollectSkillBodies,projectSkill,readSkillFile(skills_collect.go). Its rules and tests move to opencharly/plugin-harness-kind (table below).copy: .agents/skillssteps (measured org-wide), which this cutover removes: the scratch stage's root-relative copy probe,rootCopySources(the partial sdk#444 fix).ProjectCandyis the one candy projection both resolve scopes use.UnionOwnedSkillsmerges ownership across scopes.candyRepoRootgains direct tests for every loader shape; its coverage used to come only through the deleted collector.FillNamespaceBoxViewstakes the content source.buildBakedMetadatacan no longer fail, and loses its error return.sdk.ProvidedCapabilitymapsContentsonto the wire, andsdk.OpContentre-exports the selector./charly-internals:skillsskill (.agents/skills/skills/SKILL.md) is rewritten where it described the retired carrier install.run:step is deleted.Where the deleted tests went (none dropped: each now runs against the code that owns the behaviour). The kind tests are on opencharly/plugin-harness-kind branch
feat/skill-owned-content(6be96acbc67390bdbbfcbdab07cf3e5b0d00cfa1), whose PR opens as soon as this merges, since it consumes this module:TestCollectSkills_UnionOfComposedOnly,TestCollectSkills_StillEmptyWithoutABoxTestSkillContent_OnlyTheComposedOwnersSkills,TestSkillContent_ProjectScopeChecksEveryNodeTestCollectSkills_ProseComesFromTheFileTestSkillContent_ProseFromTheFileRoutingFromTheNodeTestCollectSkills_ReferenceLessEntryWireFormTestSkillContent_ReferenceLessEntryWireFormTestCollectSkills_BodylessSkillFailsLoud,…AgentBodylessFailsLoudTestSkillContent_BodylessAndInlineOnlyNodesAreDiagnosedTestCollectSkills_MalformedFileFailsLoudTestSkillContent_MalformedFileIsDiagnosedTestCollectSkills_AgentBodyComesFromTheAgentsTree,…AgentBodyInTheWrongTreeIsNotFoundTestSkillContent_AgentBodyComesFromTheAgentsTreeTestCollectSkillBodies_UnresolvableOwnerIsNamedAsSuch,…FirstFailureIsDeterministicTestSkillContent_OwnerRules,TestSkillContent_DiagnosticsAreDeterministicTestCollectSkillBodies_AtTheRepoRoot,…BesideTheCandyIsNotAHome,…RootLevelCandyUsesItsOwnDir,…RemoteSubpathCandyResolvesToRepoRootdeploykit/candy_repo_root_test.goTestCandyRepoRoot_EveryLoaderShape(the base derivation stays in sdk), plus plugin-harness-kindTestSkillContent_ProjectScopeChecksEveryNode(body beside the candy)TestRootCopySources, therootCopySourcesarm ofTestCandyCopySource_ImportedNamespaceOriginTestOwnedContent_RenderInstallsTheReplyFromTheEnvelopeand the liveskill-bodies-installedproofs below. The scratch-stage origin assertion stays inloaderkit/project_candies_test.go.How tested
Head
952a82b298c93b798beaf5c26f720a435e18b8f4;git diff --stat --diff-algorithm=myers origin/main...HEAD:31 files changed, 776 insertions(+), 1136 deletions(-). This repo's gate, on that tree, against the PUBLISHED specv0.2026325.913(GOWORK=off,GOTOOLCHAIN=go1.26.8, the go.mod toolchain):R7. Each behaviour was mutated by a harness that aborts with
MUTATION NOT APPLIEDunless the change applied, and its test failed:TestOwnedContent_NamespacedBoxAsksWithItsOwningNamespaceTestOwnedContent_TheRequestIsTheBoxsTestOwnedContent_DiagnosticsAndConflictsFailTheBuild--chowndroppedTestOwnedContent_RenderInstallsTheReplyFromTheEnvelope0600staged mode = -rw-------, want the default 0644)OwnedContentdropped by the envelope adapterTestOwnedContent_DiagnosticsAndConflictsFailTheBuildcandy/<name>suffix not strippedTestCandyRepoRoot_EveryLoaderShapeContentsnot mapped to the wireTestBuildCapabilitiesContentsRoundTripLive, on a worktree-local dev build over this branch, the merged spec and the consumer branches (plugin-harness-kind, plugin-build, plugin-box, charly, the carriers):
charly box build arch.archfailed before ("/.agents/skills": not found) and succeeds after. The Containerfile carriesCOPY --chown=1000:1000 .build/_content/arch.arch/ /home/user/, staging the sixSKILL.mdfiles theai.opencharly.skilllabel also names.skill-bodies-installedPASS with1 step: 1 passed, 0 failed, 0 skipped, each on the exact image just built:ghcr.io/opencharly/arch:2026.325.0437;ghcr.io/opencharly/debian:2026.325.0859;ghcr.io/opencharly/ubuntu:2026.325.0902, which installs to/home/ubuntu, the adopt-mode home.check-box-local:11 steps: 11 passed, 0 failed, 0 skipped.charly box validateis clean on every changed repo.Rulebook compliance
R0: loaded
/charly-internals:git-workflow,/charly-internals:go,/charly-internals:plugin,/charly-internals:strict-policy,/charly-internals:root-cause-analyzer,/charly-internals:capabilities,/charly-internals:skills,/charly-internals:marketplace,/charly-build:build,/charly-build:generate,/charly-build:validate,/charly-image:image,/charly-check:check, and the design skill (read from the corpus by path). Honest ordering: go, strict-policy and the design skill were loaded after this change's first draft. Re-deriving against them led to the operator-chosen redesign this PR implements.R1: every anomaly got an RCA before remediation:
Configpanic (the render reads only envelope caches, hence the render cache);GOTOOLCHAIN);candyRepoRootcoverage that the deleted collector carried (restored here).Separable findings are filed below.
R2: one generic seam for every content kind. The kit never names
skill.ProjectCandyandcomposedownership are each defined once.R3: no workaround: no carrier-side copy, no
../source, and no Go restatement of the CUE path confinement (D-SCH-1).R4:
box build/box validatebehave as documented, and the skill install is now real.R5: the collector,
rootCopySources,pathExistsand their tests are deleted, not deprecated. The sweepgit grep -n -i -E 'CollectSkills|CollectSkillBodies|EmitComposedSkills|skillInstallEntries|composedSkillFilter|boxSkillNodes|projectSkill|rootCopySources|cfg\.Skills|Config\.Skills' -- . ':!CHANGELOG'returns nothing (rc=1), whileCollectHooks(a live sibling) still matches.R6:
git statusclean before branching; branchfeat/install-owned-skillsoff freshorigin/main, andorigin/mainre-checked before this push (0 behind); PR-only, no force-push, no hook bypass.R7: each behaviour in the mutation table (above) is proven by a mutation that applied and failed its test. Emitted artifacts were checked at their boundary (above): the Containerfile line, the staged files and the in-image check.
R8: no service is mocked. The kind is faked only in unit tests; the live runs used the real plugin.
R9: the live runs used a worktree-local dev build stamped
2026.324.2014; the gate ran on this exact commit against the published spec.R10: this repo's gate passed on this commit; the changed path ran live end to end, including through a remote import. The disposable acceptance beds re-run on the merged consumer pins.
R11 (D-PLUG-1, D-LAW-3, D-LAW-8, D-SCH-1, D-IR-1): the skill kind's rules leave this kit for the plugin that owns the kind, and the capability is a row of M1. Image builds still do not consume the IR (pre-existing D-IR-1 debt). Apply mode is Apply mode: local/vm deploys install no owned content (the content kinds are asked only for image builds) #606.
Change classification
Behaviour change in the build kit (deploykit/loaderkit) plus removed exports.
Breaking change + rollback: removed exports
deploykit.CollectSkillsanddeploykit.CollectSkillBodies;deploykit.FillNamespaceBoxViewsgains a parameter (OwnedContentSource). Their in-org consumers are plugin-box (CollectSkillBodies) and plugin-build (FillNamespaceBoxViews), both rewritten in this cutover's next PRs, which pin this tag. Until they bump, they keep building against their current sdk pin unchanged. Images built either way carry the sameai.opencharly.skilllabel. Rollback: revert this PR and its consumers' pin bumps; there is no data migration.Filed issues
local:/vm:deploys install no owned content yet (claimed).skill:nodes never reach the composing project (pre-existing).#SkillInput/#Skillstill declare in-line body fields.Config.Local/Config.SidecarduplicateConfig.PluginKindsentries.Closes #598 (with the carrier PRs) and #444 · contract: opencharly/spec#415 · tracking opencharly/opencharly#1201.
https://claude.ai/code/session_01Tvdn3vtn8FoWTMqGwqn4ZT
Agent:
kde-cstream· Claude Code session25c0bf9d-28ad-4716-bc1b-5ca2118cc942Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)