Repository navigation
fix(spec): CUE-convert the arbiter wire types + remove the qemu-shutdown-only state_dir field - #90
Conversation
…Unit-8B) candy/plugin-preempt now dispatches the 6 movable arbiter host-seams (running/stop/start/switchMode/ensureCDI/gpuCDI) directly via sdk.Executor.InvokeProvider instead of over ExecutorService.HostArbiter (paired superproject cutover, FLOOR-SLIM-proper Unit-8B), so their wire types are dead weight. Deletes ArbiterSeamRunning/Stop/Start/Switch/ EnsureCDI/GpuCDI + their request/reply types (ArbiterHolderReq/ ArbiterBoolReply/ArbiterErrReply/ArbiterSwitchReq/ArbiterSwitchReply/ ArbiterGpuCDIReply) — confirmed unused anywhere in the tree via git grep. Only ArbiterSeamGather/ArbiterSeamResources remain, matching the 2 seams that stay genuinely host-coupled (both LoadUnified-project-config-coupled). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly-or-sdk Go (hand-written wire-type trim, no CUE) Checklist
Blocking finding — SDD CUE mandate (item 12c/12d)This PR edits The project's own precedent is directly on point: The PR's own rationale — "This is a hand-written wire type... predates the CUE-gen This is R2-blocking, not a follow-up: the objective separability test asks whether Attribution tierReassessed: Comments consideredNone — the PR carries no comments. Cross-PR interactions considered
Order-coupling check (requested by the orchestrator)Independently verified: charly This is NOT an order-coupling defect requiring re-sequencing. The superproject's DecisionFAIL. Fix the SDD CUE-sourcing gap for Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system) |
…own-only state_dir field
Standing operator directive: any wire type a PR touches converts to CUE now,
regardless of prior status. Since Unit-8B's arbiter_wire.go trim already
modified this hand-written file, it now converts fully:
- New sdk/schema/arbiter.cue: CUE defs for all 9 arbiter wire/persisted-state
types (HolderAddr, PreemptedHolder, PreemptLease, PreemptLedger,
HolderDescriptor, ArbiterGatherReply, ArbiterResourcesReply,
ArbiterInvokeInput, ArbiterInvokeReply). None are open-tailed, so none
qualify for the hand_state_types.go exception — all convert as plain
seam/state structs.
- spec/cue_types_gen.go regenerated via task cue:gen; TestGenReproducible
green. One generation-driven type change: PreemptLease.OwnerPID widens
int -> int64 (CUE int has no narrower-width annotation) — every
construction/comparison call site in the paired charly PR's
candy/plugin-preempt updated to match.
- New spec/arbiter_consts.go (hand-written): the 3 small string-enum const
groups this domain carries are NOT wire-type structs, so they stay
hand-written, mirroring the existing spec/gpu_consts.go precedent.
- spec/arbiter_wire.go deleted entirely.
- One schema-honesty fix: ArbiterInvokeInput.ClaimAddr's original
`omitempty` on a non-pointer struct field was already a no-op in
encoding/json; the CUE def marks claim_addr as required instead, changing
nothing about the actual wire bytes.
Second-order cleanup (paired with the charly PR's qemu-shutdown case
deletion, per the standing operator directive that proven-dead code is
deleted where found, never registered for later): schema/vmclient.cue's
#VmPluginEnv.state_dir field served ONLY the now-fully-senderless
"qemu-shutdown" VmOp (confirmed via git grep 'VmPluginEnv{' across
charly/candy/sdk — zero remaining setters) and is removed in the same
change, regenerated via task cue:gen.
Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — APPROVED ✅ (round 2)Change class: charly-or-sdk Go (hand-written wire-type → full CUE conversion) This supersedes my round-1 verdict (FAIL, SDD CUE-mandate gap). The blocking finding is resolved. Checklist (deltas from round 1; unchanged items omitted)
Independent re-verification of the CUE conversionI did not take any of this on trust — full independent re-run in a fresh worktree at this head:
Comments consideredOnly my own round-1 verdict comment — Cross-PR interactions consideredUnchanged from round 1: DecisionPASS. Finalizing the merge-time CalVer and merging now. The author should repoint Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system) |
pr-validator: rename CHANGELOG placeholder to the merge-time CalVer stamp. Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
…litiesFromLabels (#202) Task 2 (sdk half) of the VM-box cutover: a VM box is an OCI image whose labels carry the VM metadata contract (spec.VmBoxMetadata, whole-struct JSON on ai.opencharly.vm.box) and whose layer carries the disk artifact. - bump github.com/opencharly/spec to v0.2026246.554 (the tag-on-merge tag of spec PR #90, which landed VmBoxMetadata/VmBoxSource/LabelVmBox/VmBoxLabelMap) - EmitVmBox: scratch Containerfile (COPY disk /disk.qcow2 + vm.box/version/ description labels) via podman build into local storage - VmCapabilitiesFromLabels: engine inspect -> ai.opencharly.vm.box -> unmarshal - tests: label round-trip, spec completeness gate, live podman emit/read-back
Summary of changes
candy/plugin-preemptnow dispatches the 6 movable arbiter host-seams (running/stop/start/switchMode/ensureCDI/gpuCDI) directly viasdk.Executor.InvokeProviderinstead of overExecutorService.HostArbiter(paired superproject cutover, FLOOR-SLIM-proper Unit-8B). This PR does two things tosdk/spec:1. Trim + full CUE conversion of the arbiter wire types (standing operator directive: any wire type a PR touches converts to CUE now, regardless of prior status — since this PR already modified the hand-written
arbiter_wire.go, it converts fully):sdk/schema/arbiter.cue: CUE defs for all 9 arbiter wire/persisted-state types (HolderAddr,PreemptedHolder,PreemptLease,PreemptLedger,HolderDescriptor,ArbiterGatherReply,ArbiterResourcesReply,ArbiterInvokeInput,ArbiterInvokeReply). None are open-tailed, so none qualify for thehand_state_types.goexception — all convert as plain seam/state structs per the skill's own "plain seam request/reply structs convert, period."spec/cue_types_gen.goregenerated viatask cue:gen;TestGenReproduciblegreen. One generation-driven type change:PreemptLease.OwnerPIDwidensint→int64(CUEinthas no narrower-width annotation) — every construction/comparison call site in the paired charly PR'scandy/plugin-preemptupdated to match (a mechanical width-widening, not a behavior change).spec/arbiter_consts.go(hand-written): the 3 small string-enum const groups this domain carries (PreemptStopShutdown/etc.,ArbiterSeamGather/ArbiterSeamResources, the 7ArbiterAction*names) are NOT wire-type structs — plain string literals have no JSON/YAML shape forcue exp gengotypesto generate — so they stay hand-written, mirroring the existingspec/gpu_consts.goprecedent.spec/arbiter_wire.godeleted entirely.ArbiterInvokeInput.ClaimAddr's originalomitemptyon a non-pointer struct field was already a no-op inencoding/json; the CUE def marksclaim_addras required instead — changes nothing about the actual wire bytes.2. Second-order dead-field removal (paired with the charly PR's deletion of the now-fully-senderless
"qemu-shutdown"VmOp case incandy/plugin-vm/provider.go, per the standing operator directive that proven-dead code is deleted where found, never registered for a later batch):schema/vmclient.cue's#VmPluginEnv.state_dirfield served ONLY that VmOp — confirmed viagit grep 'VmPluginEnv{'acrosscharly/+candy/+sdk/, zero remaining setters — removed in the same change, regenerated viatask cue:gen.Change class
charly-or-sdk Go (schema + generated types, full CUE conversion)
How R10-tested — exact gate, commands, and pasted output
charly check run <bed>roster (this sdk change is a pure wire-contract conversion, entirely consumed by the superproject cutover — see the paired charly PR for the live bed evidence; this repo's own gate is the reproducibility + unit-test battery below).check-preempt-arbiter-pod,check-preempt-live-pod,check-preempt-vm-live,check-k3s-vm) — see that PR for<bed> | substrate | ok | steps | secondslines.task cue:genregeneration verified reproducible (TestGenReproducible, below).(Note: an earlier full-battery run hit a 600s timeout in
sdk/kitunder heavy concurrent host load from other in-flight teammate/validator processes — RCA'd via immediate isolated re-run,go test ./kit/... -v, which passed cleanly in 10.5s with the identical, unmodified code; zero overlap between this PR's diff andsdk/kit. Documented here per R1, not silently dismissed.)Attribution tier
fully tested and validated — every generated wire type is exercised by real, live gRPC/in-proc traffic in the paired superproject cutover's disposable bed roster, not merely compiled; the generation itself is proven reproducible.
Harness rulebook compliance
/charly-internals:go(SDD, the CUE-gen recipe + the spike-proven CAN/CANNOT reference table),/charly-internals:plugin(F10 InvokeProvider) — loaded before editingsdk/spec/*.goand again before the CUE conversion.state_dirfield were surfaced bygolangci-lint'sunusedcheck /git grep, not guessed; theOwnerPIDint→int64 generation-driven type change was root-caused and every call site fixed; the transientsdk/kittest-timeout was RCA'd (see above) rather than dismissed.*_wire.gofiles are a separate SDD-conversion thematic batch, not touched here (only the file THIS PR modifies converts, per the operator directive's own scoping).arbiter_consts.gomirrors the EXISTINGgpu_consts.gopattern verbatim rather than inventing a new one.git grepon every deleted identifier (arbiter_wire.go's contents,state_dir,qemu-shutdown) acrosssdk/AND the pairedcharlyworktree — zero remaining references outsideCHANGELOG/history.git status/git logchecked before every destructive-adjacent action; no stash used in this repo.TestGenReproducible+ the fullgo test ./...above.task cue:genregenerated the types,TestGenReproducibleconfirms a clean tree reproduces byte-identically, and the hand-written source is deleted in the SAME change.gofmt -l .empty,go vetclean,go test ./...green,golangci-lint run .0 issues (checked in the paired charly worktree'scandy/plugin-preemptandcandy/plugin-vm, the modules that consume these types).CHANGELOG/2026.203.1600.mdupdated (placeholder CalVer, finalized bypr-validatorat merge).Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)