Skip to content

feat(deploykit)!: owned content — render-prep asks the content kinds, the render installs what they contribute - #607

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/install-owned-skills
Nov 21, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/install-owned-skills

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

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 declares contents, through ops.OpContent, and installs what the kind replies:

  • Request. OwnedContentRequestFor builds 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. For arch.arch that scope is the imported namespace's own document. Reading the root's nodes for an imported box gave it no skills at all.
  • Render-prep. Render-prep asks through the new Generator.Content seam, an OwnedContentSource (kinds = the envelope's content_kinds; Ask wired by the plugin driving the build). The files become the box's owned_content render cache, and the labels become BakedLabelSet.Contributed. A kind's diagnostics fail the build, as does a label two kinds both claim, or declared kinds with no Ask.
  • Render. EmitOwnedContent stages the files into .build/_content/<box>/ and emits ONE COPY --chown=<uid>:<gid> … <home>/, reading nothing but the box (the plugin-build render runs with Config nil). WriteLabels writes contributed labels through the JSON label writer, so non-ASCII skill prose is never %q-escaped.
  • Deleted, because it is the skill kind's behaviour (D-PLUG-1): CollectSkills, CollectSkillBodies, projectSkill, readSkillFile (skills_collect.go). Its rules and tests move to opencharly/plugin-harness-kind (table below).
  • Deleted, because its only users were the skill carriers' copy: .agents/skills steps (measured org-wide), which this cutover removes: the scratch stage's root-relative copy probe, rootCopySources (the partial sdk#444 fix).
  • Kept and shared:
    • ProjectCandy is the one candy projection both resolve scopes use.
    • UnionOwnedSkills merges ownership across scopes.
    • candyRepoRoot gains direct tests for every loader shape; its coverage used to come only through the deleted collector.
  • FillNamespaceBoxViews takes the content source.
  • buildBakedMetadata can no longer fail, and loses its error return.
  • sdk.ProvidedCapability maps Contents onto the wire, and sdk.OpContent re-exports the selector.
  • The /charly-internals:skills skill (.agents/skills/skills/SKILL.md) is rewritten where it described the retired carrier install.
  • The sdk-skill-shelf's no-op 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:

deleted here equivalent
TestCollectSkills_UnionOfComposedOnly, TestCollectSkills_StillEmptyWithoutABox plugin-harness-kind TestSkillContent_OnlyTheComposedOwnersSkills, TestSkillContent_ProjectScopeChecksEveryNode
TestCollectSkills_ProseComesFromTheFile TestSkillContent_ProseFromTheFileRoutingFromTheNode
TestCollectSkills_ReferenceLessEntryWireForm TestSkillContent_ReferenceLessEntryWireForm
TestCollectSkills_BodylessSkillFailsLoud, …AgentBodylessFailsLoud TestSkillContent_BodylessAndInlineOnlyNodesAreDiagnosed
TestCollectSkills_MalformedFileFailsLoud TestSkillContent_MalformedFileIsDiagnosed
TestCollectSkills_AgentBodyComesFromTheAgentsTree, …AgentBodyInTheWrongTreeIsNotFound TestSkillContent_AgentBodyComesFromTheAgentsTree
TestCollectSkillBodies_UnresolvableOwnerIsNamedAsSuch, …FirstFailureIsDeterministic TestSkillContent_OwnerRules, TestSkillContent_DiagnosticsAreDeterministic
TestCollectSkillBodies_AtTheRepoRoot, …BesideTheCandyIsNotAHome, …RootLevelCandyUsesItsOwnDir, …RemoteSubpathCandyResolvesToRepoRoot here, deploykit/candy_repo_root_test.go TestCandyRepoRoot_EveryLoaderShape (the base derivation stays in sdk), plus plugin-harness-kind TestSkillContent_ProjectScopeChecksEveryNode (body beside the candy)
TestRootCopySources, the rootCopySources arm of TestCandyCopySource_ImportedNamespaceOrigin the probe is deleted. The behaviour it served (carrier bodies reaching the image) is covered by TestOwnedContent_RenderInstallsTheReplyFromTheEnvelope and the live skill-bodies-installed proofs below. The scratch-stage origin assertion stays in loaderkit/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 spec v0.2026325.913 (GOWORK=off, GOTOOLCHAIN=go1.26.8, the go.mod toolchain):

$ GOWORK=off go test ./... -count=1     # rc=0, 21 ok, 0 FAIL
$ GOWORK=off golangci-lint run ./...    # 0 issues.

R7. Each behaviour was mutated by a harness that aborts with MUTATION NOT APPLIED unless the change applied, and its test failed:

$ python3 -I mut.py '<rule>' && go test ./deploykit/ ./ -run 'OwnedContent|CandyRepoRoot|ContentsRoundTrip' -count=1
mutation failing test
owning scope ignored TestOwnedContent_NamespacedBoxAsksWithItsOwningNamespace
non-composed candies added TestOwnedContent_TheRequestIsTheBoxs
diagnostics ignored TestOwnedContent_DiagnosticsAndConflictsFailTheBuild
--chown dropped TestOwnedContent_RenderInstallsTheReplyFromTheEnvelope
default mode 0600 same (staged mode = -rw-------, want the default 0644)
contributed label not written same
OwnedContent dropped by the envelope adapter same
label-conflict check off TestOwnedContent_DiagnosticsAndConflictsFailTheBuild
local-candy candy/<name> suffix not stripped TestCandyRepoRoot_EveryLoaderShape
mismatched subpath accepted same
Contents not mapped to the wire TestBuildCapabilitiesContentsRoundTrip

Live, 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):

  • Remote import. From pod-kde-cstream, which imports distro-arch REMOTELY, charly box build arch.arch failed before ("/.agents/skills": not found) and succeeds after. The Containerfile carries COPY --chown=1000:1000 .build/_content/arch.arch/ /home/user/, staging the six SKILL.md files the ai.opencharly.skill label also names.
  • In-image, skill-bodies-installed PASS with 1 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.
  • Validate. plugin-box check-box-local: 11 steps: 11 passed, 0 failed, 0 skipped. charly box validate is 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:

    • a render-time nil-Config panic (the render reads only envelope caches, hence the render cache);
    • a golangci-lint crash (environmental, go 1.27 vs a go1.26-built linter; reproduced on a pristine tree, gated with GOTOOLCHAIN);
    • an imported candy losing its skill ownership (measured; fixed here and in plugin-build);
    • candyRepoRoot coverage 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. ProjectCandy and composed ownership 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 validate behave as documented, and the skill install is now real.

  • R5: the collector, rootCopySources, pathExists and their tests are deleted, not deprecated. The sweep git grep -n -i -E 'CollectSkills|CollectSkillBodies|EmitComposedSkills|skillInstallEntries|composedSkillFilter|boxSkillNodes|projectSkill|rootCopySources|cfg\.Skills|Config\.Skills' -- . ':!CHANGELOG' returns nothing (rc=1), while CollectHooks (a live sibling) still matches.

  • R6: git status clean before branching; branch feat/install-owned-skills off fresh origin/main, and origin/main re-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.CollectSkills and deploykit.CollectSkillBodies; deploykit.FillNamespaceBoxViews gains 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 same ai.opencharly.skill label. Rollback: revert this PR and its consumers' pin bumps; there is no data migration.

Filed issues

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 session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942
Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)

… 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)
@aitrawog

Copy link
Copy Markdown
Contributor Author

HOLDING

HOLDING — this PR is the second producer of the #598 chain (it pins the merged contract, opencharly/spec#415 v0.2026325.913), and it holds:

  • the next consumers, whose PRs open as soon as this merges and tags, because each pins this module: opencharly/plugin-harness-kind (where the moved skill tests live), opencharly/plugin-build, opencharly/plugin-box, and then opencharly/charly. After them come the carriers in opencharly/distro-arch, opencharly/distro-debian and opencharly/distro-ubuntu;
  • owui-full-stack's CachyOS whisper build (Update the local AI stack, consolidate Open WebUI, and fork Qwen3-TTS opencharly#1204), which unblocks when the distro-arch carrier lands.

CLEARED is posted here and on those threads when this merges.

Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942
Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 952a82b298c93b798beaf5c26f720a435e18b8f4 (branch: feat/install-owned-skills)

Change class: code/config (deploykit + loaderkit + root ops.go/schema.go + spec pin) plus a docs skill update and a charly.yml step removal.
Security screen: PASS — no secrets/egress, no weakened gate, no scope mismatch (all 31 files accounted for in the summary), spec pin v0.2026325.913 is the cited merged contract.
Placement: CORRECT — the skill capability moves OUT of the kit into the owning plugin (plugin-harness-kind) via a kind-blind ops.OpContent seam; the kit keeps only a reusable mechanism, no charly/ alias growth, no new core imports, no *Legacy* smell.
Checklist: All applicable rules (A1–A3, R0–R11, PIL/ADE/SDD, CONC, HC, ARCH, DISP, QUAL, COORD) PASS or NA. Mutation table + live skill-bodies-installed/check-box-local output are internally consistent with the diff; deleted coverage is remapped (no drop).

Comment disposition: @aitrawog's HOLDING comment — valid coordination comment (closed-set label first, both sides named, footer present); coordination metadata, not a finding.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

Copy link
Copy Markdown
Contributor Author

CLEARED

CLEARED — merged (tag v0.2026325.921). The hold moves to its consumers, opened now and pinned to this tag: opencharly/plugin-harness-kind#13, opencharly/plugin-build#63, opencharly/plugin-box#92.

Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942
Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)

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.

build: a skill carrier candy copies .agents/skills from the candy dir, but the bodies live at the repo root

1 participant