Repository navigation
fix(deploy,preempt): land the sdk#94 charly consumer — resource-arbiter reads via resolved-project envelope - #184
Conversation
…HostArbiter retirement Extracted from the unmerged feat/k1-unblock-wave1 branch (commit f548e27, authored by k1-alpha3, code unchanged here) and landed as its own standalone, atomic PR to resolve a hazard the un-consumed sdk-main change otherwise leaves open: opencharly/sdk#94 already retired ExecutorService.HostArbiter / spec.ArbiterSeamGather / ArbiterSeamResources / ArbiterGatherReply / ArbiterResourcesReply on sdk's main (93d5632), but this repo's consumer (candy/plugin-preempt/arbiter.go) still called the retired API. Any charly cutover bumping its sdk gitlink past that already-merged sdk change breaks go build ./charly/... outright, independent of what that cutover is actually about -- discovered when fix/deploy-volume-persistence's own PR review hit exactly this break. candy/plugin-preempt/arbiter.go's hostGather/hostResources now call Executor.HostBuild(ctx, "resolved-project", ...) and do their own holder-filtering / gpu-vendor projection in-plugin via the portable sdk/deploykit helpers (MergedDeployTree, FilterPreemptibleHolders, HolderAddrFor, GpuVendorTokens), instead of Executor.HostArbiter(ctx, spec.ArbiterSeamGather/Resources, nil). charly/arbiter_host.go (the now unreachable host-side HostArbiter RPC handler) deleted. charly/preempt.go's gatherDeployNodes/gatherPreemptibleHolders/lookupVMClaimant/holderAddrFor/ sortedHolderKeys deleted (superseded by the portable deploykit helpers); gatherResources kept (core-internal GPU-allocation callers outside the arbiter). charly/host_build_config_resolve.go's VM-claimant lookup repoints to the same portable deploykit.FindVMClaimant. The HostArbiter reverse-channel server methods, the F11 ExecutorService allowlist entry, and candy/plugin-kube's fake-client stub for the retired method are removed. charly/deploy_preserve_test.go's TestGatherDeployNodesPerHostWins retargeted to exercise deploykit.MergedDeployTree directly. sdk gitlink bumped from 168169d to sdk's current main bbb6aca9 (v0.2026205.742, which already carries #94's retirement plus the unrelated sdk#95 wire-type additions); charly/go.mod's require bumped to match. Cherry-picked verbatim (git cherry-pick -n f548e27), one file (charly/deploy_preserve_test.go) auto-merged, zero conflict markers. Re-verified in full against the assembled state: go build/vet/test clean across charly, candy/plugin-preempt, candy/plugin-kube, and sdk; gofmt clean; golangci-lint 0 issues (charly, plugin-preempt); charly box validate exit 0. A genuinely fresh binary (task build:binary, content-marker verified) re-earned check-preempt-arbiter-pod's own R10 claim: 12/12 steps PASS, including its internal charly update fresh-rebuild gate, with both arbiter-claim-recorded and driver-switch-dryrun green. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: charly-or-sdk Go Independently re-derived against head Good news: the CODE fix itself is sound and independently R10-provenI built a genuinely fresh binary myself ( Both changed-path assertions (
Blocking finding — the claim-keyed doc sweep (R1/R5) is still incomplete, and this PR's own body under-scopes itThe PR body's R2 section acknowledges ONE stale reference ("
This is explicit, textual, and leaves no discretion for a validator to treat it as deferrable. Additionally, per item 13(b) of my own checklist, a parking phrase is only legitimate when "the diff itself visibly moves toward that exit" — this diff touches ZERO of the affected files, so naming a future batch doesn't discharge the obligation. Full scope (identifier-level grep is clean; this is a CONCEPT-level/claim-level sweep, confirmed via
None of these three files are in this PR's diff.
Comments considered: none — the PR carries no comments. Cross-PR interactions considered: Decision: CHANGES REQUESTED. The functional fix is correct, complete, and independently R10-proven by my own fresh live re-run — this is good, careful extraction work and I have no functional concerns. But it cannot merge with a CLAUDE.md-explicit BLOCKING R1 item left open, especially one touching the ADE-mandated, OCI-label-baked candy description with a materially false claim. Required to fix, in the SAME PR: update the Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system) |
…round 1) val-volfix failed PR #184 on stale HostArbiter references surviving the doc sweep this cutover already claimed complete. Per-file R1 classification confirmed every occurrence was a comment/docstring/error-string/test-comment (none live code -- the arbiter already builds against sdk main, which retired HostArbiter outright). Swept all of them: - candy/plugin-preempt/{arbiter.go,charly.yml,holder_dispatch.go,plugin.go} and charly/{preempt.go,resolved_project_host.go,uniform_api_gate_test.go} -- stale comments naming the retired identifier, reworded to describe the current mechanism without naming HostArbiter. - box/fedora/charly.yml's check-preempt-vm-live comment -- same treatment, landed on box/fedora's own fix/arbiter-envelope-consumer branch (a06cd314, pushed), gitlink bumped here. git grep -n HostArbiter -- ':!CHANGELOG' now returns empty tree-wide (superproject + box/fedora). go build/vet/test clean across charly/ and candy/plugin-preempt/. Comment/docstring-only -- zero behavior change. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; documentation reviewed)
pr-validator — CHANGES REQUESTED ❌ (round 2)Change class: Documentation-only for THIS round's delta (comment/docstring sweep, zero behavior change); the PR's overall change class remains charly-or-sdk Go (the R10-proven functional change from round 1 is unaffected). Independently re-derived against head R5 sweep: CONFIRMED COMPLETE and accurateBoth independently re-run by me, both empty, exactly as claimed. I also spot-checked the actual replacement prose in
Blocking finding —
|
| # | Check | Verdict |
|---|---|---|
| 0 | security & anti-tampering | PASS |
| 1 | description complete | PASS |
| 2 | change-class gate | PASS for this round's actual delta (doc-only, correctly gated by the non-runtime standards); the PR's overall functional R10 remains the round-1 bed run, unaffected |
| 3 | attribution tier | PASS — documentation reviewed correctly used for THIS round's commit trailer; the PR's overall tier (fully tested and validated) still stands on the unaffected functional change |
| 4 | R0 skills | PASS |
| 5 | R1 RCA, zero warnings | PASS — the round-1 finding is now fully, accurately addressed |
| 6 | R2 no out-of-scope split | PASS — no parking phrase this round; the sweep was completed, not deferred |
| 7 | R3 no duplication | PASS |
| 8 | R4 no ad-hoc workaround | PASS |
| 9 | R5 hard cutover + grep | PASS — confirmed empty tree-wide, independently re-run |
| 10 | R6/R8/R9 | PASS |
| 11 | R10 | PASS (unaffected by this doc-only round; round-1's fresh bed run stands) |
| 12 | RDD/ADE/SDD | ADE PASS — the candy's baked description: is now accurate |
| 13 | concurrency + anti-cheat | PASS |
| 14 | hard cutover | FAIL — see the blocking finding: the cutover is not landable as a single coherent unit while one of its two repos has no merged (or even PR'd) counterpart |
| 15 | ARCHITECTURE GATE | PASS — no new charly/*.go structural change this round, prose-only |
| 16 | disposable-only autonomy | PASS |
| 17 | clean architecture + go gates | PASS |
| 18 | CHANGELOG present | PASS — both repos' CHANGELOG entries correctly formatted, box/fedora's own CHANGELOG/2026.205.0100.md also filename/H1-compliant (checked) |
Comments considered: none — the PR carries no comments (the round-1 finding was relayed via teammate message + the PR comment I posted, not a PR comment from the author).
Cross-PR interactions considered: opencharly/charly#183 — still open, unaffected, verified-non-blocking (per the already-communicated sequencing, it waits on this PR). opencharly/charly#118 — no overlap, verified-non-blocking. opencharly/distro-fedora — zero open or historical PRs for fix/arbiter-envelope-consumer — this IS the blocking cross-repo gap detailed above, not a PR-vs-PR interaction but a missing-PR interaction with the SAME cutover's own second repo leg.
Decision: CHANGES REQUESTED. The content fix (R5 sweep) is complete, accurate, and independently confirmed — no further content changes needed there. The sole remaining blocker is procedural: box/fedora's a06cd314 needs its own PR opened and merged on distro-fedora before this superproject PR can legitimately reference it. Once that lands, repoint this PR's gitlink to the merged (not branch-tip) commit and I'll re-validate immediately — expect this to be fast, since the content is already proven.
Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
…fedora main opencharly/distro-fedora PR #8 (the R5 HostArbiter prose-sweep completion, companion to this PR) merged as afb9237b (squash) on distro-fedora main. Repoint this PR's box/fedora gitlink from the branch-tip commit (a06cd314, which was never on distro-fedora's protected main) to the merged commit -- the half-assembled-base hazard B2 warns about (a superproject PR must never reference a submodule commit its own main has never seen). git -C box/fedora fetch origin main confirms afb9237b is origin/main's tip; git diff --cached --submodule=short shows the gitlink advancing FORWARD to the descendant merge commit, never re-pinning the older branch tip. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; documentation reviewed)
pr-validator — APPROVED ✅ (round 3)Change class: charly-or-sdk Go (this round's own delta: a single-file gitlink repoint, docs-only class; overall PR = the round-1 functional change, already R10-proven) Independently re-derived against head
Everything from round 2's full checklist (R0–R18) that this round didn't touch stands as independently verified there — the functional R10 bed run, the ADE-accurate candy description, the architecture placement trace, golangci-lint 0 issues, gofmt, go test — none of that surface changed in this round. Comments considered: none — the PR carries no comments. Cross-PR interactions considered: Decision: APPROVE. The functional fix (round 1), the doc sweep (round 2, cross-validated via the now-merged Assisted-by: Claude Code Claude Sonnet 5 (fully tested and validated) |
pr-validator merge-time version stamp for PR #184. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
…ditional val-volfix's review surfaced a regression in the volume-persistence fix: resolveDeployVolumes gated its project-declared-volume fallback on len(deployVolumes) == 0, which is ALSO true for an ALREADY-CONFIGURED, genuinely volume-less deploy (any sibling group member whose overlay entry exists from its initial bundle-add but carries no volume) -- so every subsequent charly config/charly update re-config re-triggered a full project LoadUnified round-trip on every single call, a redundant per-call cost the pre-fix shape never paid. Fix: gate the project fallback on overlay-key ABSENCE (!ok), not on len(overlay.Volume) == 0. An existing overlay entry is now authoritative regardless of content, restoring the original zero-lookup path for every already-configured deploy (same sticky-once-resolved pattern persistResourceCaps/ResolveDeployPorts already use, R3). A brand-new deploy (no overlay entry yet) still consults the project exactly once. New regression test TestResolveDeployVolumes_AlreadyConfiguredVolumeLess- SkipsProjectLookup verified to FAIL against the pre-fix code (confirmed via git stash) and PASS with it. NOT YET PUSHED: this commit sits on top of the arbiter cherry-pick (d0af504) pending charly#184's merge; per the locked landing chain this branch rebases to drop that now-duplicate commit once #184 merges, then re-runs the full R10 (check-enc-pod + a member charly config case) before this PR reopens for validation. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…arbiter cherry-pick) charly#184 (the resource-arbiter K1-unblock consumer catch-up + its full R5 HostArbiter doc sweep) merged to main as f8677fb while this branch carried its own now-redundant cherry-pick of an earlier version of the same change (d0af504). Per the locked landing chain, #184 lands first; this branch merges main to pick up the FINAL, fully-swept version and drops its own stale copy -- resolved every conflict by taking origin/main's already-R10'd content for the 6 touched arbiter files (candy/plugin-preempt/{arbiter.go, holder_dispatch.go,plugin.go}, charly/{preempt.go,resolved_project_host.go, uniform_api_gate_test.go}); charly.yml and candy/plugin-preempt/charly.yml auto-merged and verified byte-identical to origin/main. box/fedora gitlink resolved to the descendant afb9237b (origin/main's value); sdk gitlink and charly/go.mod already matched origin/main pre-merge (both had already advanced to sdk's bbb6aca9 independently). git grep -n HostArbiter -- ':!CHANGELOG' confirmed empty post-merge. This branch now carries ONLY its own scope: 82b9357 (volume-persistence fix) + 392fcbe (conditional-lookup fix, itself superseded by the next commit per team-lead's round-3 BLOCKING finding -- the ported-deploy project-volume hole). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
Summary of changes
Lands the
charly-side consumer adaptation foropencharly/sdk#94's already-merged breaking retirement ofExecutorService.HostArbiter/spec.ArbiterSeamGather/ArbiterSeamResources/ArbiterGatherReply/ArbiterResourcesReply. This adaptation was already authored and R10-tested on the unmergedfeat/k1-unblock-wave1branch (commitf548e270, credited to k1-alpha3 — the code is unchanged here, only the landing vehicle is new: a fresh worktree off currentorigin/main, cherry-picked verbatim, re-verified against sdk's actual currentmain).Why this lands now, as its own PR: sdk's
mainalready carries #94's retirement. Any OTHER charly cutover that bumps itssdkgitlink past that already-merged commit breaksgo build ./charly/...outright (6 compile errors), independent of whatever that cutover is actually about — discovered whenfix/deploy-volume-persistence's (#183) own PR review hit exactly this. Landing this consumer adaptation onmainnow, standalone, clears the hazard for every concurrent and future charly sdk-pin bump — a correctness necessity, not a discretionary cutover.Concrete edits (cherry-picked verbatim from
f548e270, one file auto-merged, zero conflict markers):candy/plugin-preempt/arbiter.go—hostGather/hostResourcesnow callExecutor.HostBuild(ctx, "resolved-project", ...)+ the portablesdk/deploykithelpers (MergedDeployTree,FilterPreemptibleHolders,HolderAddrFor,GpuVendorTokens) instead of the retiredExecutor.HostArbiter.charly/arbiter_host.go— deleted (the host-sideHostArbiterRPC handler, now unreachable).charly/preempt.go—gatherDeployNodes/gatherPreemptibleHolders/lookupVMClaimant/holderAddrFor/sortedHolderKeysdeleted (superseded by the portable helpers);gatherResourceskept (core-internal GPU-allocation callers outside the arbiter,gpu_allocate.go/gpu_imply.go).charly/host_build_config_resolve.go— thecharly vmconfig-resolve seam's VM-claimant lookup repoints to the same portabledeploykit.FindVMClaimant(R3).charly/plugin_executor_reverse.go/plugin_inproc_reverse.go— theHostArbiterreverse-channel server methods deleted (the RPC no longer exists on the wire).charly/uniform_api_gate_test.go—HostArbiterdropped from theExecutorServicefixed-method-set (F11) allowlist.candy/plugin-kube/k3s_post_forwards_test.go— the fakeExecutorServiceClient's now-nonexistentHostArbiterstub removed.charly/deploy_preserve_test.go—TestGatherDeployNodesPerHostWinsretargeted to exercisedeploykit.MergedDeployTreedirectly against a real on-disk project + per-host overlay.sdkgitlink bumped168169d→bbb6aca9(sdk's currentmain, tagv0.2026205.742— carries docs(skills): bump plugins → 3ea3805 — five wave-2 orchestration/landing insights #94's retirement plus the unrelatedopencharly/sdk#95wire-type additions);charly/go.mod's require bumped to match.CHANGELOG/2026.204.0001.md(placeholder CalVer, original authoring content preserved + a re-verification section added for this landing).Change class
charly-or-sdk Go.
How R10-tested — exact gate, commands, and pasted output
charly check run check-preempt-arbiter-pod(box/fedora) — the bed this exact adaptation's own commit message claims as its R10 witness; re-run here against the FRESH assembled state (sdk at its real currentmain, not the branch tip the original authoring used).check-preempt-arbiter-pod | pod (group, 2 members) | ok | 12 steps | ~3m40s total— binary version content-marker-verified (strings bin/charly | grep -c 'resolved-project (resources)'= 1), run root.check/check-preempt-arbiter-pod/2026.205.0813/.task build:binary— clean, nogo.work.sumdrift. The bed's own internal[update]step performed a destroy+rebuild (1m13s) andfeature-run-rebuildre-validated post-rebuild.arbiter-claim-recorded(the resolved-project-envelopehostGatherpath, dispatchingAcquireExclusivethrough the new mechanism) anddriver-switch-dryrun(the GPU driver-switch dry-run) executed live and passed (exit=0each).resolved-projectREAD path only (gather/resources), not the ledger/lock/lifecycle write paths; not run under the concurrent/verify-bedsroster.Attribution tier
fully tested and validated— the CODE was already fully tested at original authoring (check-preempt-arbiter-pod12/12); THIS landing re-earned that same claim against a genuinely fresh binary built from the assembled state (sdk at its real current main), with both changed-path checks (arbiter-claim-recorded,driver-switch-dryrun) executing live.Harness rulebook compliance
/charly-internals:go,/charly-internals:plugin,/charly-internals:strict-policy,/charly-internals:git-workflow,/charly-internals:cutover-policy— already loaded this session (extraction of an in-scope wave's own tested work, same rule set applies).box/fedora/charly.yml'sarbiter-claim-recordedcheck description still names "the HostArbiter reverse channel" in prose (now stale; the assertion itself is unaffected and passes) — correctly routed to the next docs/lessons thematic batch (a separate submodule text-only fix, not blocking this cutover's own claim) rather than fixed here or deferred as an unscheduled "someday".host_build_config_resolve.gorepoints to the SAME portabledeploykit.FindVMClaimantthe arbiter plugin uses (one implementation, not two) — this was already true in the original authoring and is preserved verbatim.HostArbiterRPC + its wire types + every reverse-channel/allowlist/test-stub reference to it are deleted in this SAME commit (git grep HostArbiterincharly/+candy/after this commit returns no live hits — only sdk's own historical/CHANGELOG mentions, which are that repo's concern).git worktree add ../charly-wt-arbiter -b fix/arbiter-envelope-consumer origin/main), no destructive git ops; cherry-pick verified clean (no conflict markers) before proceeding.charly check run check-preempt-arbiter-pod) ran against a fresh binary — pasted above.task build:binary, content-marker verified for the changed code path); no new runtime OS dependency.check-preempt-arbiter-podisdisposable: true; both the changed-path checks execute live and pass; this is the bed the original authoring itself claims as its acceptance proof, now re-earned against the real assembled state.HostArbiter-based code and the new resolved-project path do not coexist — full replacement in one commit, matching the original authoring).check-preempt-arbiter-podisdisposable: true; every destroy/rebuild ran against it.gofmt -lempty;golangci-lint run ./...0 issues (charly,candy/plugin-preempt);go vetclean;go test ./...green in every touched module.CHANGELOG/2026.204.0001.mdstaged (placeholder CalVer; original authoring content + a re-verification section for this landing; the pr-validator finalizes the CalVer at merge).Credit: the code in this PR is
f548e270's, originally authored onfeat/k1-unblock-wave1(k1-alpha3). This PR is a mechanical extraction + fresh re-verification to land it as a standalone correctness cutover, unblockingfix/deploy-volume-persistence(#183) and any other in-flight charly cutover from the same sdk-pin hazard.