Skip to content

feat(resolve): render-prep asks the content kinds; imported candies carry the skills they own - #63

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/namespace-candies-own-skills
Nov 21, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/namespace-candies-own-skills

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The build plugin's half of opencharly/sdk#598:

  • ownedContentSource builds render-prep's way to reach the content kinds, once per build resolve:

    • the kind words come from the host's validate-word-sets leg (content_kinds, a registry fact only the host holds);
    • Ask is a peer InvokeProvider of kind:<word> ops.OpContent, carrying the request verbatim.

    It is wired into the root render-prep (Generator.Content) and threaded to the namespace fill. The resolves that render nothing (build:project, tolerant validate) pass the zero source, which asks no kind.

  • The namespace fold projects candies through deploykit.ProjectCandy and merges ownership with deploykit.UnionOwnedSkills. It used to copy RawCandyPair alone and skip any candy another scope had recorded first, so an imported skill-owning candy read as empty and validate refused it. Measured on pod-kde-cstream importing distro-arch: arch-skills was recorded by a scope holding none of its 8 skill nodes, so the arch namespace that owns 6 of them was skipped.

file change
candy/plugin-build/owned_content.go, owned_content_test.go new — the source, and a fake-executor test of the two RPCs
candy/plugin-build/resolve.go dg.Content wired before render-prep
candy/plugin-build/resolve_legs.go the namespace fold's projection and ownership merge; the source threaded
candy/plugin-build/resolve_project_word.go, resolve_project_tolerant.go, resolved_project_projection_test.go the zero source for the non-rendering resolves
candy/plugin-build/go.mod, go.sum the merged spec v0.2026325.913 and sdk v0.2026325.921

How tested

Head ae124921f1be5afd2930c9c1b72cafe1ccad88fd; git diff --stat --diff-algorithm=myers origin/main...HEAD: 9 files changed, 199 insertions(+), 26 deletions(-). This repo's gate, in candy/plugin-build/, on that tree against the PUBLISHED pins (GOWORK=off, GOTOOLCHAIN=go1.26.8):

$ GOWORK=off go test ./... -count=1     # ok  plugin-build
$ GOWORK=off golangci-lint run ./...    # 0 issues.

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

$ python3 -I mut.py '<rule>' && GOWORK=off go test . -count=1
mutation failing test
kinds not taken from the host leg TestOwnedContentSource_KindsFromTheHostAskThroughInvokeProvider (kinds = [], want the host's content_kinds)
wrong op invoked same (invoked kind:skill load …, want kind:skill content)
fold merge removed (UnionOwnedSkills line) TestFoldNamespaceCandy_LaterScopeMergesOwnership (Skills = [], want the later scope's ownership merged in)
first record not kept (its return dropped) same (want the first scope's record kept whole) — this mutation SURVIVED a weaker assertion, which was then strengthened

R10 beds (every one disposable: true), on worktree-local dev build 2026.325.0457. It was built by scripts/bootstrap-charly.sh --dev-plugin from charly feat/content-kinds with this head, opencharly/plugin-build ae124921, opencharly/plugin-harness-kind 2d92e2b7 and opencharly/plugin-box at its merged tree, over the published spec v0.2026325.913 and sdk v0.2026325.921:

  • check-box-local (opencharly/plugin-box, a local: target): PASS (steps=6), exit=0, check-live 11 steps: 11 passed, 0 failed, 0 skipped. Its box-skill-image-owner and box-skill-owner-is-install-content steps run the project-scope diagnostics this chain adds.

  • check-tmux-pod (opencharly/distro-arch, a pod on base: arch, fresh rebuild). Every step that exercises this change passed:

    • image-build PASS (1m51s): rebuilt arch with COPY --chown=1000:1000 .build/_content/arch/ /home/user/ (.build/arch/Containerfile:37), staging arch arch-builder arch-cloud-vm arch-coder arch-test charly-arch.
    • check-image PASS, including skill-bodies-installed exit=0.
    • deploy-add / config / start / wait-ready PASS.

    The bed's overall verdict is FAIL: 23 steps: 19 passed, 1 failed, 3 skipped. The failing step is tmux-roundtrip, the terminal provider, which nothing here touches; it was killed at its 120 s never-hang ceiling. That failure predates this change. Its probe makes ~20 charly calls, each paying ~5.6 s of project resolve. Run verbatim, it passes every stage in 123 s. The per-call cost is the same on the released binary (charly cmd check-tmux-pod true: dev 5628/5623 ms, release 2026.323.2024 5714/5508 ms). Filed as check-tmux-pod: tmux-roundtrip needs ~123 s against a 120 s never-hang ceiling (~20 charly calls × 5.6 s project resolve) distro-arch#75, root fix named, no ceiling bump.

    The image-scope runs (box build, check box) deploy nothing.

Live (a worktree-local dev build stamped 2026.324.2014 over this branch and the rest of the opencharly/sdk#598 chain):

  • 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, with 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, on the exact image just built: arch:2026.325.0437, debian:2026.325.0859 and ubuntu:2026.325.0902.
  • 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:plugin, /charly-internals:go, /charly-internals:strict-policy, /charly-internals:root-cause-analyzer, /charly-build:build, /charly-build:generate, /charly-build:validate, /charly-image:image, /charly-check:check, /charly-internals:skills, /charly-internals:marketplace, /charly-internals:capabilities, and the design skill (read by path), plus this repo's AGENTS.md list.
  • R2: one kind-agnostic op (ops.OpContent), the one shared request builder (deploykit.OwnedContentRequestFor), and one candy projection (deploykit.ProjectCandy). No rule is restated in a second place.
  • R3: no workaround: no carrier copy step, no ../ source, no special-cased kind word.
  • R4: box build / box validate behave as documented, and the skill install is now real.
  • R6: git status clean before branching; branch off fresh origin/main (0 behind before this push); PR-only, no force-push, no hook bypass.
  • R8: no service is mocked in the live runs; only unit tests fake the peer.
  • R9: the live runs used a worktree-local dev build stamped 2026.324.2014; this repo's gate ran on this exact commit against the PUBLISHED spec v0.2026325.913 and sdk v0.2026325.921.
  • R10: this repo's gate passed on this commit (above), and both disposable: true beds ran on this head (above): check-box-local all green, and check-tmux-pod green on every step this change exercises, with one pre-existing live failure measured on the released binary and filed (check-tmux-pod: tmux-roundtrip needs ~123 s against a 120 s never-hang ceiling (~20 charly calls × 5.6 s project resolve) distro-arch#75). No acceptance run is deferred.
  • R1: the empty imported carrier was measured with a probe on the live resolve (then removed) before the fix; separable findings are filed below. Round 2: the ProjectCandy error is now reported BEFORE the ok test, so "never dropped silently" no longer rests on an unstated contract. No behaviour changes today (ProjectCandy returns a nil error whenever ok is false, sdk deploykit/resolved_project.go:108), so no test can fail on it; removing the report only fails to compile.
  • R5: the fold's insert-if-absent-only projection is replaced, not kept beside the merge.
  • R7: each rule in the mutation table (above) is proven by a mutation that applied and failed its test; the namespace-ownership fix is proven by the live remote-import build (above).
  • R11 (D-LAW-3, D-PLUG-1): the plugin wires a kind-agnostic seam; it names no kind.

Change classification

Additive: no wire or flag change; the build now installs what the content kinds contribute.

Filed issues

Part of opencharly/sdk#598 · contract opencharly/spec#415 · kit opencharly/sdk#607 · 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)

…arry the skills they own

opencharly/sdk#598. ownedContentSource builds the render's way to reach the content kinds — the kind words from the host's validate-word-sets leg (content_kinds) and an Ask that is a peer InvokeProvider kind:<word> ops.OpContent — once per build resolve, wired into the root render-prep (Generator.Content) and threaded to the namespace fill (resolves that render nothing pass the zero source). The namespace fold projects candies through deploykit.ProjectCandy and merges ownership with deploykit.UnionOwnedSkills: it used to copy RawCandyPair alone and skip a candy another scope had recorded first, so an imported skill-owning candy read as empty (measured on pod-kde-cstream importing distro-arch). Tested with a fake executor answering exactly the two RPCs; both rules 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 is one of the three consumers of opencharly/sdk#607 in the opencharly/sdk#598 chain. It holds opencharly/charly (which pins it), then the carriers in opencharly/distro-arch, opencharly/distro-debian and opencharly/distro-ubuntu, and with them owui-full-stack's CachyOS whisper build (opencharly/opencharly#1204). CLEARED follows on merge.

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 — BLOCK

Head SHA: d922df7728c0e6347f53e19a7a1f7153b545a395 (branch: feat/namespace-candies-own-skills)

Change class: code/config — plugin-build candy runtime code (resolve*, owned_content*) plus spec/sdk pin bumps. Security screen: PASS (no embedded directives, no secrets/egress, no guardrail or rulebook edit, pin bumps are to the org's own published chain modules and match go.sum).

Blocks

  1. R10 / R7 — the PR's headline fix ships no test that would fail without it. candy/plugin-build/resolve_legs.go:479-512: the new cross-scope ownership merge (recorded.Skills = deploykit.UnionOwnedSkills(recorded.Skills, m.Skills) when a candy was already recorded by another scope) — the behaviour the Summary says was measured broken on pod-kde-cstream — has no test in the diff. resolved_project_projection_test.go is touched only to thread the new content parameter; neither TestFillNamespacedBoxes_QualifiedView nor TestFillNamespacedBoxes_DiamondImportWalksBothPaths exercises a candy recorded by a skill-less scope and then owned by another. The body's mutation table lists only two mutations, both against ownedContentSource, so its claim "Each rule was mutated by a harness … and its test failed" does not hold for the merge. Add a test (diamond-import fixture: scope A records the candy with no owned skills, scope B owns them; assert the merged CandyModels[name].Skills) that fails without the merge, and put it in the mutation table.

  2. R10 — the disposable-target runtime proof is deferred, not pasted. The body's own R10 answer is future tense: "The disposable acceptance beds re-run on the merged pins." No target named in the live evidence (pod-kde-cstream, arch:2026.325.0437, debian:2026.325.0859, ubuntu:2026.325.0902) is stated to be disposable: true, and the disposable acceptance-bed output for this head is not pasted. Paste the disposable (disposable: true) bed run for d922df7…, or state explicitly which of the pasted runs executed on a disposable: true target.

  3. R1 — a projection error can be dropped silently, contradicting the code's own comment. candy/plugin-build/resolve_legs.go:487-494: the if !ok { continue } guard precedes if err != nil { stderrWarn(...) }, so any ProjectCandy result with ok == false and err != nil is discarded with no diagnostic — while the comment immediately above asserts a malformed skill node is "reported as a gate-failing warning, never dropped silently." The control flow does not establish that guarantee. Either check err before the ok short-circuit, or state the ProjectCandy contract (ok == false ⇒ err == nil) in the body and in the comment.

Comments considered

  • @aitrawog, comment 7060553053 (HOLDING) — coordination metadata, not a finding: opens with a closed-set label, names both sides (this PR holds the opencharly/charly pin, then the distro-arch/debian/ubuntu carriers and owui-full-stack's CachyOS whisper build via Update the local AI stack, consolidate Open WebUI, and fork Qwen3-TTS opencharly#1204), and carries a well-formed Agent:/Assisted-by: footer. COORD satisfied. Not a sign-off (none required here: no DESIGN or security-machinery change).

Verdict: BLOCK


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

View action run

…on error first

Review round 2 of #63.

- The namespace fold's record-or-merge is extracted into
  foldNamespaceCandy and tested by
  TestFoldNamespaceCandy_LaterScopeMergesOwnership. It fails with the
  merge removed, and with the first record no longer kept whole.
- The ProjectCandy error is reported before the ok test, so the
  comment's "never dropped silently" holds whatever ProjectCandy
  returns beside it. No behaviour changes today: ProjectCandy returns
  a nil error whenever ok is false.

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

STATUS

STATUS — round 2. Every finding in the round-1 BLOCK is fixed, in ae124921f1be5afd2930c9c1b72cafe1ccad88fd (committed, not yet pushed):

  1. R7, the untested headline fix. The fold's record-or-merge is now foldNamespaceCandy, tested by TestFoldNamespaceCandy_LaterScopeMergesOwnership. Two mutations each applied and failed it: removing the UnionOwnedSkills merge (Skills = [], want the later scope's ownership merged in), and dropping the first record's return (want the first scope's record kept whole). The second mutation first SURVIVED a weaker assertion, so the assertion was strengthened.
    Missed control: my mutation table covered each new FILE rather than each behaviour the Summary claims. The merge was proven only live. From now on the table has one row per Summary claim.
  2. R10, the deferred bed. As on feat(skill): kind:skill serves owned content — the composed skills' install and label, and the project's skill diagnostics plugin-harness-kind#13: the disposable: true bed check-tmux-pod is running on this head with a fresh rebuild, and its output replaces the deferral.
  3. R1, the error after the short-circuit. The error is now reported BEFORE the ok test, so the guarantee no longer rests on an unstated contract. This changes no behaviour today, because ProjectCandy returns a nil error whenever ok is false (sdk deploykit/resolved_project.go:108). So no test can fail on it, and the body says so instead of claiming one.

Gate on the commit: gofmt clean, go vet ok, golangci-lint 0 issues., go test ok. The push follows the bed's verdict.

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: ae124921f1be5afd2930c9c1b72cafe1ccad88fd (branch: feat/namespace-candies-own-skills)

Security screen: PASS
Checklist: All applicable rules PASS or NA. Placement: CORRECT (plugin-local wiring in candy/plugin-build/, kind-agnostic seam over sdk deploykit; no core/sdk capability pull-in, no alias growth).

Comments considered: 7060553053 (@aitrawog, HOLDING) — coordination metadata, opens with a closed-set label, names both sides and the downstream chain, well-formed footer; not a finding. 7060563464 (@github-actions[bot], round-1 BLOCK) — all three findings re-derived against the current diff and now resolved: the cross-scope ownership merge is covered by foldNamespaceCandy + TestFoldNamespaceCandy_LaterScopeMergesOwnership and two mutation rows (R7/R10); the disposable: true beds check-box-local and check-tmux-pod are pasted for this head with the one failing step (tmux-roundtrip, untouched terminal provider) root-caused and filed as opencharly/distro-arch#75, not deferred (R10/R1); the ProjectCandy error is now reported before the ok short-circuit, and the body states the contract that makes it behaviour-neutral (R1). 7060712696 (@aitrawog, STATUS) — corroborated by the current diff and commit ae124921.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 21, 2026 09:59
@github-actions
github-actions Bot merged commit 3ed6dce into main Nov 21, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 21, 2026
@aitrawog

Copy link
Copy Markdown
Contributor Author

CLEARED

CLEARED — merged, tagged v2026.325.0959. opencharly/charly pins this together with opencharly/plugin-box v2026.325.0928 and opencharly/plugin-harness-kind#13, which is in review round 3, plus the merged spec and sdk.

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.

1 participant