Skip to content

fix(charly,candy)!: SDD-conversion consumer fixes — GroupAccessible + VFIOGpu - #181

Merged
atrawog merged 3 commits into
mainfrom
feat/sdd-wire-conversion-consumers
Jul 22, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/sdd-wire-conversion-consumers

Conversation

@atrawog

@atrawog atrawog commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Companion to opencharly/sdk#92 (merged, v0.2026203.1311): bumps the sdk
gitlink + charly/go.mod require, and updates every consumer of the two
representation reshapes that PR's HostProbeReply.GroupAccessible and
VFIOGpu CUE conversion required (both wire-format-identical, Go-source
breaking).

  • sdk gitlink bumped to 922b3469; charly/go.mod require bumped to
    v0.2026203.1311.
  • HostProbeReply.GroupAccessible is now map[string]bool (was
    map[int]bool) — updated charly/host_build_hostprobe.go (construction,
    keyed via strconv.Itoa) and candy/plugin-doctor/command.go (read, same
    key form).
  • VFIOGpu no longer embeds VFIOPCIDevice anonymously — every
    VFIOGpu{VFIOPCIDevice: d} composite literal replaced with the new
    spec.NewVFIOGpu(d) constructor: candy/plugin-gpu/{detect,switch}.go
    (1 site each) + test fixtures candy/plugin-gpu/switch_test.go (2 sites),
    charly/gpu_prereq_test.go (2 sites), charly/gpu_allocate_test.go
    (restructured into 2 named spec.NewVFIOGpu(...) calls).
  • candy/plugin-build/schema/build.cue — one stale doc-comment citation of
    the now-deleted sdk/spec/deploy_wire.go repointed to
    sdk/schema/buildwire.cue (R5 sweep; out of sdk#92's own grep scope
    since this file lives in this repo).

candy/plugin-vm/vmshared_aliases.go's dangling ValidateLibvirtSnippet
alias needed NO fix here — opencharly/charly#179 already deleted it;
verified absent on this branch's base before scoping this cutover.

Change class

charly Go code (cross-repo companion to opencharly/sdk#92, already merged).

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: go test ./... + go vet +
    task build:binary (R9) + the check-exampledeploy disposable bed (the
    ONE bed composing the changed deploy/check-wire consumer surface —
    InstallPlanView/InstallStepView/ReverseOp round-trip through the
    external deploy plugin; check-pod/check-local/check-k3s-vm do not
    touch GroupAccessible/VFIOGpu at all, so this is the correct, not an
    over-broad, gate).
  • Eval beds run: check-exampledeploy | local (pod) | ok | 6 steps | ~80s total,
    run TWICE on charly version 2026.203.1305 — once pre-merge (via a
    temporary go.work override pointed at the then-unmerged sdk branch, see
    sdk#92's own evidence) and once here against the REAL merged+tagged sdk
    pin (.check/check-exampledeploy/2026.203.1326/) — both PASS identically.
  • Fresh rebuild: yes — task build:binary ran clean from this exact
    commit (sdk gitlink + go.mod bump included) before either bed run.
  • Did the CHANGED code path execute live? Yes — candy/plugin-doctor
    reads GroupAccessible and candy/plugin-gpu constructs VFIOGpu via
    spec.NewVFIOGpu in their own unit tests (both green below); the bed run
    exercises the OTHER converted deploy-wire types end-to-end (this PR's own
    changed lines are consumer glue for a doctor/GPU-detection surface that
    has no disposable GPU hardware on this host to drive live — the unit
    tests are the correct exerciser for THIS PR's specific lines, the bed is
    the R10 proof that the shared sdk pin bump breaks nothing else).
  • Concurrency: N/A — no loader/ledger/store/arbiter shared-state path touched.
$ task build:binary
(clean)
$ ./bin/charly version
2026.203.1305

$ cd charly && go vet ./...
(clean)
$ go test ./...
ok  github.com/opencharly/charly/charly  145.254s
ok  github.com/opencharly/charly/charly/internal/pluginsgen  (cached)

$ cd candy/plugin-gpu && go test ./...
ok  github.com/opencharly/charly/candy/plugin-gpu  0.005s
$ cd candy/plugin-doctor && go test ./...
ok  github.com/opencharly/charly/candy/plugin-doctor  0.005s

$ golangci-lint run ./...   # charly/, candy/plugin-gpu, candy/plugin-doctor
0 issues.  (x3)

$ ./bin/charly check run check-exampledeploy
charly check run check-exampledeploy: [deploy-add] PASS after 37.699s
charly check run check-exampledeploy: [bring-up-members] PASS after 0s
charly check run check-exampledeploy: [check-live] PASS after 6.057s
charly check run check-exampledeploy: [update] PASS after 18.065s
charly check run check-exampledeploy: [cleanup] PASS after 18.083s
charly check run check-exampledeploy: [cleanup-members] PASS after 0s
charly check run check-exampledeploy: PASS (steps=6)

$ cat .check/check-exampledeploy/2026.203.1326/check-live.log
Local deploy: check-exampledeploy [host (local)]
  PASS  check command=test -f /tmp/charly-exampledeploy/check-exampledeploy/probe && echo EXAMPLEDEPLOY-PROBE-PRESENT  [exampledeploy-applied]  exit=0
  PASS  check the external deploy plugin EXECUTED the file-write step ...  [exampledeploy-step-write]  exit=0
  PASS  check the external deploy plugin EXECUTED the shell-hook (env:) step ...  [exampledeploy-step-env]  exit=0
  PASS  check the external deploy plugin PUSHED a file via the new reverse-channel PutFile leg ...  [exampledeploy-putfile]  exit=0
  PASS  check F3 — the external deploy plugin drove the RunHostStep reverse leg ...  [exampledeploy-f3-buildstep]  exit=0
5 steps: 5 passed, 0 failed, 0 skipped

Attribution tier

fully tested and validated — every changed code path (GroupAccessible
read/write, NewVFIOGpu construction) executed live in green unit tests
against a fresh rebuild, plus the composing R10 bed proving the shared sdk
pin bump is behaviorally inert, run twice (pre- and post-merge) with
identical results.

Harness rulebook compliance

  • R0 skills: /charly-internals:go, /charly-internals:plugin,
    /charly-internals:strict-policy, /charly-internals:git-workflow loaded.
  • R1 RCA + zero warnings: one RCA'd finding this cutover — a first
    go test ./... run FAILED with TestPluginInstallstepEnvelopeParity
    errors; traced to my OWN worktree's uninitialized box/fedora submodule
    (git submodule update --init box/fedora), NOT a code regression —
    confirmed by a clean re-run immediately after. Zero warnings in the final
    battery (vet/lint/test all clean).
  • R2 no out-of-scope: gofmt -l charly/ flags 8 files with a
    trailing-blank-line nit, ALL last touched by opencharly/charly#179 (the
    dead-code radical-removal batch) and NONE touched by this PR — confirmed
    via git log -1 -- per file. Genuinely unrelated (R2); reported in the
    CHANGELOG for its own lint-sweep batch, not folded in here.
  • R3 no duplication: the spec.NewVFIOGpu constructor is the ONE shared
    fix point for all 6 embed-flatten call sites (not per-site spreading).
  • R4 no workaround: no sleep/retry/magic-number; the two temporary
    go.work/go.mod overrides used DURING pre-merge verification (documented
    in sdk#92) were reverted before this commit — this commit's go.mod
    change is the real, permanent require bump.
  • R5 hard cutover + grep: git grep 'ValidateLibvirtSnippet' confirms
    zero hits (deleted by fix(charly,plugin-vm): dead-code radical-removal batch (superproject leg) #179, verified before scoping this PR to exclude
    it); git grep 'sdk/spec/deploy_wire.go' in this repo returns only the
    ONE citation this PR fixes (now zero after).
  • R6 git safety: worked in a dedicated worktree
    (git worktree add feat/sdd-wire-conversion-consumers off origin/main);
    no destructive action on the shared checkout.
  • R7 runtime gate: the check-exampledeploy bed IS the end-to-end gate.
  • R8 artifact invariants: N/A — no Containerfile/OCI-label surface changed.
  • R9 binary == source + deps: task build:binary + charly version
    matches (2026.203.1305); no new runtime OS deps.
  • R10 disposable + coverage: check-exampledeploy is disposable: true;
    the existing TestGpuModeFromDriver/TestSelectGPUByVendor/etc. unit
    tests (unchanged, still passing) are the coverage that would FAIL without
    these fixes (a stale map[int]bool/embedded-field reference would not
    compile at all).
  • RDD / ADE / SDD: N/A / N/A / this PR consumes an already-SDD-converted
    type, no new schema surface.
  • Hard cutover: ONE atomic commit; no transitional/dual-mode path.
  • Kernel/plugin boundary law: N/A — pure consumer-type-shape fix, no
    kernel/plugin placement change.
  • Disposable-only autonomy: the bed is disposable: true; charly update ran unattended per standing authorization.
  • Clean architecture + Go gates: gofmt -l clean for every file this PR
    touches (the 8 unrelated pre-existing hits noted above are NOT in this
    diff); golangci-lint run ./... 0 issues (3 modules); go vet clean;
    go test ./... green.
  • CHANGELOG: CHANGELOG/2026.203.1330.md staged (placeholder CalVer).

Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)

atrawog added 2 commits July 22, 2026 15:30
… VFIOGpu

Companion to opencharly/sdk#92 (merged, v0.2026203.1311): bumps the sdk
gitlink + charly/go.mod require, and updates every consumer of the two
representation reshapes that PR's HostProbeReply.GroupAccessible and
VFIOGpu conversion required (both wire-format-identical, Go-source
breaking).

GroupAccessible is now map[string]bool (was map[int]bool) — updated the
two real construction/read sites (charly/host_build_hostprobe.go,
candy/plugin-doctor/command.go) to key via strconv.Itoa. VFIOGpu no
longer embeds VFIOPCIDevice anonymously — every VFIOGpu{VFIOPCIDevice: d}
composite literal replaced with the new spec.NewVFIOGpu(d) constructor
across candy/plugin-gpu/{detect,switch,switch_test}.go and
charly/{gpu_prereq_test,gpu_allocate_test}.go. One doc-comment citation
in candy/plugin-build/schema/build.cue repointed (R5 sweep, out of
sdk#92's own grep scope since the file lives in this repo).

Breaking: matches the upstream sdk breaking change these types now carry.

Verified: task build:binary clean, go vet clean, go test ./... green
(charly + candy/plugin-gpu + candy/plugin-doctor), and the
check-exampledeploy R10 composing bed (deploy/check wire types) run
TWICE — once pre-merge via a go.work override, once here against the
real merged sdk pin — both 6/6 steps + 5/5 checks PASS.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)


Mechanical gofmt -w on 8 files flagged by `gofmt -l charly/`
(checkrun_act.go, deploy.go, distro.go, distro_test.go, engine.go,
shellcollect.go, sidecar_test.go, update_deploy_dispatch_test.go) —
#179's dead-code radical-removal batch left each with a
stray trailing blank line at EOF. None are otherwise touched by this
PR's own cutover.

Verified whitespace-only: `git diff --stat` shows exactly 1 line removed
per file (8 total); `git diff --ignore-blank-lines` is empty, confirming
zero semantic change. go build/go vet clean after.

Fixed now rather than left for the next validator to independently
rediscover via the same gofmt -l check.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
@atrawog

atrawog commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly Go code (cross-repo companion to opencharly/sdk#92, already merged & tagged v0.2026203.1311)

Head verified: 9b1c510266e0519357a8b93d137605f312e0e3aa (via git ls-remote origin refs/heads/feat/sdd-wire-conversion-consumers)

# Check Verdict
0 Security & anti-tampering (T1–T4) PASS — no exfiltration/scope-mismatch/weakened-gate/supply-chain finding; no instruction-injection attempt in PR body/comments/code
1 Description complete PASS — Summary, change class, R10 evidence w/ pasted output, attribution tier, full R0–R10+RDD/ADE/SDD compliance table all present
2 Change-class gate matches evidence PASS — go test/go vet/task build:binary + check-exampledeploy (the ONE bed composing the changed deploy/check-wire consumer surface — check-pod/check-local/check-k3s-vm don't touch GroupAccessible/VFIOGpu, so this is correctly-scoped, not over-broad)
3 Attribution tier justified PASS — fully tested and validated: independently confirmed (own re-run below)
4 R0 skills honored PASS — /charly-internals:go, /charly-internals:plugin, /charly-internals:strict-policy, /charly-internals:git-workflow — all consistent with the diff
5 R1 RCA / zero warnings PASS — documented RCA for the uninitialized-submodule go test false-start; gofmt/vet/lint all zero-warning in my own re-run
6 R2 no pre-existing/out-of-scope split PASS — the 8-file gofmt rider is a genuinely separable, unrelated pre-existing gofmt break from #179 (verified via git log per file — last touch is #179, not this PR's substantive diff), fixed here rather than deferred, correctly reasoned as non-blocking-but-fixed rather than parked
7 R3 no duplication PASS — one shared spec.NewVFIOGpu constructor fix-point for all 6 call sites
8 R4 no ad-hoc workaround PASS — no sleep/retry/magic-number; temporary go.work overrides used only during sdk#92's own pre-merge verification, reverted before this commit
9 R5 hard cutover + grep self-test PASS — git grep ValidateLibvirtSnippet zero hits (already removed by #179); git grep 'sdk/spec/deploy_wire.go' now zero after the one doc-comment fix
10 R6/R8/R9 artifact + binary integrity PASS — R9: content-marker check on my OWN fresh rebuild confirms map[string]bool-keyed GroupAccessible + NewVFIOGpu compiled in; no new runtime OS deps. R8 N/A (no Containerfile/label surface touched)
11 R10 disposable/fresh-rebuild/coverage PASS — see independent re-run below
12 RDD/ADE/SDD PASS — pure consumer of an already-CUE-sourced type (sdk#92's own responsibility); NewVFIOGpu is a hand-written convenience constructor beside the generated struct (sdk/spec/gpu_methods.go), not a hand-written TYPE — no new schema surface introduced by this PR
13 Concurrency mandate / anti-cheat N/A — no loader/ledger/store/arbiter shared-state path touched; no forbidden framing used anywhere in the PR body
14 Hard cutover — one atomic commit PASS — two commits on the feat branch (the fix + a follow-up gofmt rider), correctly folded by squash at merge; no Phase-2/TODO
15 Architecture gate — placement PASS — placement: CORRECT. Per-item trace for every staged charly/*.go file: host_build_hostprobe.go (existing HostBuild/M-mechanism seam, unchanged placement, only adds stdlib strconv import — no new kit import), checkrun_act.go/deploy.go/distro.go/engine.go/shellcollect.go + the 3 _test.go files (gofmt whitespace-only, zero semantic change), gpu_allocate_test.go/gpu_prereq_test.go (test-fixture literal restructuring only), go.mod (version bump only). No new/grown alias file. No new kit import. No *Legacy* relocation smell.
16 Disposable-only autonomy PASS — check-exampledeploy bed is disposable: true; both the PR's own runs and my independent re-run used unattended charly check run/charly update
17 Clean architecture + Go gates PASS — independently re-ran: gofmt -l charly/ candy/plugin-gpu candy/plugin-doctor candy/plugin-build → empty; go vet ./... (workspace mode, per /charly-internals:go "charly is a WORKSPACE MEMBER") → clean; golangci-lint run (isolated GOLANGCI_LINT_CACHE per module) → 0 issues ×3; go test ./... → green (charly 147.9s, plugin-gpu, plugin-doctor)
18 CHANGELOG present PASS — CHANGELOG/2026.203.1330.md; H1 byte-matches filename; CalVer not already used as a tag or CHANGELOG file on current main

Independent re-verification performed (not taken on the author's word)

  • Wire-format-identity claims, verified mechanically: wrote and ran a standalone Go program confirming json.Marshal(map[int]bool{...}) byte-equals json.Marshal(map[string]bool{...}) with the decimal-string-equivalent keys — the GroupAccessible reshape is provably wire-identical. The VFIOGpu embedding-flatten is a pure Go-source change (Go's JSON field-promotion already produced the same wire shape for the embedded form).
  • Gitlink: sdk @ 922b3469 verified to be origin/main HEAD on the sdk repo exactly (git log -1 origin/main matches); base pin 6a86528e verified to be its ancestor.
  • Worktree artifacts: /home/atrawog/Atrapub/o/charly-wt-sddconvert/.check/check-exampledeploy/2026.203.1326/summary.yml exists, ok: true, 6/6 steps, total_seconds: 80 — matches the pasted table exactly.
  • Fresh rebuild + re-run, myself, on the exact PR head (9b1c5102): git submodule update --init sdk pkg/arch box/fedora, task build:binary (clean), go test ./... (charly, plugin-gpu, plugin-doctor — all green), go vet ./... (workspace mode, clean), gofmt -l (empty across every touched dir), golangci-lint run (0 issues × 3 modules with isolated caches), then re-ran charly check run check-exampledeploy myself on the freshly-built binary → PASS, 6/6 steps, matching the claimed result.
  • gofmt rider: git diff -w --ignore-blank-lines HEAD~1 on the 8 files is empty (whitespace-only, confirmed); git log per file confirms last substantive touch was #179, not this PR.

Comments considered: none (PR carried zero comments).

Cross-PR interactions considered: charly#118 (RED-by-design kernel-manifest gate, "merges LAST") — zero file overlap with #181 (comm -12 on touched-file lists is empty) → none-found. plugins#106 — the intentional companion docs PR for this same SDD-conversion chain, sequenced to validate/merge AFTER this one per its own dependency (repoints citations to files this PR's sibling sdk#92 already landed) → not a blocking interaction to #181 itself. No other open PRs in charly, plugins, or sdk.

Decision: All 19 checklist items PASS, verified independently (not from the author's claims alone) including a from-scratch rebuild + bed re-run on the exact PR head. Approved for merge.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)

pr-validator merge-time stamp for PR #181.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
@atrawog
atrawog merged commit 30238d1 into main Jul 22, 2026
@atrawog
atrawog deleted the feat/sdd-wire-conversion-consumers branch July 22, 2026 13:50
@atrawog

atrawog commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Merged ✅

  • Squash-merged as 30238d1d94d6529b06f32551788c431efc5e24a4
  • CalVer finalized: 2026.203.1349 (CHANGELOG/2026.203.1349.md)
  • Tagged v2026.203.1349 on the merged main HEAD — pushed, verified via git ls-remote --tags origin v2026.203.1349
  • Branch feat/sdd-wire-conversion-consumers deleted

Proceeding to validate the companion docs PR opencharly/plugins#106 next.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)

atrawog added a commit to opencharly/marketplace that referenced this pull request Jul 22, 2026
…c/*_wire.go files land

Documentation-only sweep: repoints every skill reference to the 13
hand-written `sdk/spec/*_wire.go` files (`deploy`/`init`/`gpu`/`doctor`/
`enc`/`feature`/`k8sgen`/`resource`/`settings`/`substrate_template`/`agent`/
`distro`/`vm`) to their new CUE homes, following `opencharly/sdk#92`
(merged, `v0.2026203.1311`) and its companion `opencharly/charly#181`
(merged, `v2026.203.1349`).

- Rewrites the "Generation coverage" bullet in `internals/skills/go/SKILL.md`
  to mark the whole `sdk/spec/*_wire.go` class LANDED.
- Repoints the deploy-wire file-map rows in `internals/skills/install-plan/SKILL.md`,
  `internals/skills/plugin/SKILL.md`, `check/skills/android/SKILL.md`,
  `automation/skills/enc/SKILL.md`, `core/skills/charly-doctor/SKILL.md`.
- Closes an R1 divergence: `internals/agents/pr-validator.md`'s
  `arbiter_wire.go` worked example updated from "still in-flight" to its
  actual LANDED state.

Independently re-verified by a fresh pr-validator against the real merged
sdk content (every cited CUE/Go file confirmed to exist at sdk 922b3469;
sdk/spec/*_wire.go confirmed EXTINCT; R5 grep self-test re-run from scratch).

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; documentation reviewed)
atrawog added a commit that referenced this pull request Aug 16, 2026
plugins/main currently holds the PROJECTION of prose whose SOURCE is in this PR,
so a regeneration from a current charly tree would revert it. This bump reconciles
the pair, and this PR landing is what closes that window.

The pin is re-derived from plugins origin/main immediately before validation rather
than reused from an earlier reading: eb805ee8 is the current tip and carries both
the regenerated skills (06f1071) and #181 beneath it.

Assisted-by: Claude Code Claude Opus 5 (documentation reviewed)
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