Repository navigation
feat(spec,deploykit,loaderkit): CandyReader agent/terminal-profile accessors - #75
Conversation
…cessors Closes a gap surfaced while merging origin/main's federated control-plane commit (56b1a6b) into the W9 loader-cone retype: render_baked_metadata.go's per-box agent/terminal aggregation needs the candy-declared agent_provide/ terminal_profile data through spec.CandyReader, which the W9 retype's CandyView carried AgentProvide for but never TerminalProfiles, and never exposed either through the interface. Adds terminal_profiles to #CandyView, regenerates, adds AgentProvide()/HasAgentProvides()/TerminalProfiles() to CandyReader + specCandyAdapter, and populates them in loaderkit.scanFromParsed. Verified via GOWORK=off go build/test/vet + golangci-lint (0 issues) on the sdk module standalone; go.mod tidy is a no-op. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…ccessors The prior commit (de7e8ae) added AgentProvide()/HasAgentProvides()/ TerminalProfiles() with no coverage exercising them — a change whose new functionality has no test that would fail without it isn't landable. Add adapter-level and scan-level regression tests; verified both fail (nil slice, InSystems-lookup miss) when the population fix is reverted. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — APPROVED ✅Change class: charly-or-sdk Go — sdk contract-module addition ( Head verified: Checklist
Comments considered: none — the PR carries no comments ( Cross-PR interactions considered:
Decision: PASS. Every rule verified from my own independent re-derivation (fresh disposable worktree, full battery, reproducibility regen, and a live revert-test proving the new coverage is non-vacuous) rather than the author's paste. Proceeding to Phase 3: finalize the merge-time CalVer, merge (squash), tag Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system) |
|
Status POST: Proceeding to CalVer finalization + merge. Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system) |
pr-validator merge-time version stamp for PR #75 (CandyReader agent/terminal-profile accessors). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
|
Merge: Proceeding to tag Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system) |
|
Tag: Landing complete. Disposable validator worktree removed. Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system) |
Summary of changes
Adds
agent_provide/terminal_profilesupport tospec.CandyReader— closing a gapdiscovered while merging
origin/main's federated control-plane commit into the charlyconsumer branch
feat/w9-loader-cone(the W9Candy→CandyReader/CandyModel/CandyViewretype). Pre-existing state:
#CandyViewalready carried anagent_providefield (added bythe earlier W9 sdk work, b24b168) but no
terminal_profilesfield, andspec.CandyReaderexposed neither through its interface — so
charly/render_baked_metadata.go's per-boxagent/terminal-profile OCI-label aggregation (added by the control-plane commit, which reads
these off a live
*Candy) has nothing to call once the retype removes the concrete*Candytype.
Concrete edits:
schema/resolvedproject.cue: addterminal_profiles?: {[string]: #TerminalProfile}to#CandyView(mirrors the existingagent_providefield + the identical field already on#BoxMetadata/#BakedLabelSet).spec/candy_reader.go: addAgentProvide() []AgentRuntimeCapability,HasAgentProvides() bool,TerminalProfiles() map[string]TerminalProfileto theCandyReaderinterface (regular already-methods naming, matching the pre-retype*Candy.AgentProvide()/HasAgentProvides()methods these replace).deploykit/spec_candy_adapter.go: implement all three onspecCandyAdapter, readingdirectly off the wrapped
CandyView.loaderkit/scan_candy.go:populateFromYAMLnow carriesly.AgentProvide/ly.TerminalProfiles(the authoredspec.CandyYAMLfields) onto theCandyViewat scantime.
deploykit/spec_candy_adapter_test.go+loaderkit/scan_candy_test.go: new regressiontests for both the wrap-time accessors and the scan-time population (see R10 below).
origin/main's independent advance (sdk#72 F-CLI-NEST: the CUE-generatedKongreflection surface + protocol-schema field additions) via a clean merge — noconflicts, this PR's own files (
resolvedproject.cue/candy_reader.go/spec_candy_adapter.go/scan_candy.go) don't overlap feat(proto,spec): F-CLI-NEST — declared subcommand catalogs for command-class plugins #72's (protocol/schema/plugin.cue,schema.go,kong_reflect.go).Change class
charly-or-sdk Go (a schema/interface addition to the sdk contract module, consumed by the
charly cutover
feat/w9-loader-cone, currently pinned in-tree via the modulereplacedirective — no other consumer yet).
How R10-tested — exact gate, commands, and pasted output
sdkis a standalone-consumed contract module with nodisposable check bed of its own (it has no
charly.yml) — its gate is the full standaloneGo battery (build/vet/test/lint/tidy/verify) plus CUE-generation reproducibility, per
/charly-internals:git-workflow"Per-module verification". The consuming charly cutover(
feat/w9-loader-cone) will separately prove this surface through its own bed roster oncethis PR merges and its
go.modrequire is bumped to the merged tag (B6 producer→consumersequencing).
charly.ymlbed exists for thesdkmodule itself; see gate above.GOWORK=off go build ./...from a cleangit statusaftergit merge origin/main— zero warnings.accessors/population and assert on real (non-zero) values, not just compile-safety. Verified
each test FAILS when the fix is reverted (see below) — proving the tests are not vacuous.
store/resource-arbiter/VM-pod-lifecycle); it's a pure additive interface/schema surface.
Attribution tier
fully tested and validated— the new code paths (both interface methods + scan-timepopulation) executed against non-trivial fixture data in the new tests, and each test was
independently proven to fail without its corresponding fix.
Harness rulebook compliance
/charly-internals:go(SDD / CUE generation pipeline) and/charly-internals:git-workflow(multi-repo B2/B6 sequencing, per-module verification) —both loaded and followed for the schema-then-generate-then-implement order and the
producer-before-consumer landing order.
TerminalProfilesfield/accessor was found byreading the actual
render_baked_metadata.goconsumer code (not assumed) after the charlymerge surfaced a broken build; gate output above has zero warnings.
in the same branch before push, not deferred.
(
GetStatus/GetDescription/IsPluginCandy/…) already onCandyReader— no newabstraction invented.
methods, new adapter methods, new population lines, new tests); nothing renamed or removed,
so there is no
<removed-id>to grep for.git status/git diff --statchecked before and after every merge/commitstep; no destructive git action taken.
sdkmodule itself (no bed of its own); the consumingcharly cutover's own R10 bed roster is the runtime gate for this surface, run separately by
the orchestrator after this PR merges.
sdkitself (the charly consumer's
render_baked_metadata.gois what emits theai.opencharly.agent_provide/terminal_profileslabels from this data; that's charly-side)."Test-fails-without-fix proof" above.
resolvedproject.cue) was edited FIRST, thentask cue:genregeneratedcue_types_gen.go(diff = exactly the intended 2 lines), then theGo interface/adapter/population code was written against the generated type;
task cue:genreruns as a no-op. RDD — this is a low-risk additive schema change (not a
composition-at-latest-versions unknown), so no bed spike was needed; ADE/N/A (sdk ships no
candy plan).
test coverage) — both will squash into ONE commit on
sdkmainat merge; noPhase-2/deferred scope left.
sdkcontract-module addition, not acharly/core change; doesn't touch the kernel/plugin boundary.gofmt -l .empty,golangci-lint run= 0 issues,go vetclean,go test ./...green — all pasted above.CHANGELOG/2026.200.2200.mdstaged (placeholder CalVer; the pr-validatorfinalizes it at merge).
Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)