Skip to content

fix(bed): the VM path's deploy carries the run tag, as the pod path already does - #117

Merged
github-actions[bot] merged 1 commit into
mainfrom
chore/bump-pi-goal-v0.2.0
Sep 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
chore/bump-pi-goal-v0.2.0

Conversation

@atrawog

@atrawog atrawog commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

charly deploy add with no --tag resolves "the newest local CalVer" of the box, so a box with more than one local build can have its pod or VM run an artifact this run did not build. The bed runner had grown this pin by hand, at ONE call site — the pod arm (addArgs = withRunTag(addArgs, d.ImageTag)), whose sibling configStartArgs(…, d.ImageTag, …) covered the other half. The VM path had no tag at any of its three sites.

This PR makes the two paths symmetric, and claims exactly that. The pin now lives where every deploy already passes — bedAdd — as a separate, TYPED parameter:

func bedAdd(refs []string, tag string) []string { … return withRunTag(append([]string{"deploy", "add"}, append(args, "--dev-local-pkg")...), tag) }

All eight call sites pass d.ImageTag (VM root, VM host-rooted children, the in-place local arm, the pod arm), and the pod path's hand-written withRunTag is deleted as redundant — one home, so the next caller cannot miss it (R2).

What this PR does NOT claim, stated first rather than defensively: that carrying the tag is sufficient to pin the artifact. It is not, and the record already measures that: a pod bed that already passed --tag <run calver> still ran a base image baking 0.48.1 while the run's own build bakes 0.51.0 and its own check box step asserted 0.51.0 and passed (one run, two steps apart — opencharly/plugin-check#115). Symmetry is what this change buys; pinning is what #115 must still establish, and its HANDING OVER names the one measurement that decides it (which field --tag matches: the image's CalVer tag or its ai.opencharly.version label) and the three candidates that separates. An earlier revision of this body asserted the guarantee in its title; that claim was refuted by this very measurement and is withdrawn.

Why the signature is the way it is, because the first attempt proves the point: I first made the tag a variadic FIRST argument (bedAdd(tag string, args ...string)), and the existing test immediately showed what that costs — a caller passing a ref where the tag belongs produced --tag openclaw.check-openclaw-pod, i.e. a deploy pinned to the wrong thing, the same defect class this change exists to remove. The suite caught it (TestBedAddConvertsTheRosterAddress FAILED) and the type now makes it unrepresentable.

How tested

Change class: compiled-in plugin Go code (candy/plugin-check/), so the class gate is charly's assembled disposable bed driven by a binary that embeds this diff.

$ cd .worktrees/dsh-opencharly/plugin-check-vacuous && git rev-parse HEAD ; git rev-parse HEAD^{tree}
2f4a2670e08c2fb4e43df9e7adc621aae1614993
e133de44eff9c1481cb186ee50ea0a6964473979
$ cd candy/plugin-check && go build ./... ; echo rc=$?          rc=0
$ gofmt -l .                                                     (empty)
$ go test -count=1 ./...                                         ok  …/candy/plugin-check  10.613s

The changed path executed live, on the VM path this PR changes — check-local-vm, whose deploy-add step is the path that had no tag, driven by /tmp/charly-vacuous-build/charly-tagfix (built from this worktree; the run's own summary.yml names the driver and its version):

$ charly check run check-local-vm
[vm-build]             PASS 48.006s
[vm-create]            PASS 1m30.945s
[deploy-add]           PASS 5m17.027s     <- THE VM DEPLOY, now carrying `--tag <run calver>`
[bring-up-members]     PASS 1ms
[check-live]           PASS 4m11.709s
[update]               PASS   (fresh rebuild)
[check-live-rebuild]   PASS   (live again, after the rebuild)
[cleanup] [cleanup-members]  PASS
charly check run check-local-vm: PASS (steps=10)

The ten step names come from that run's summary.yml, pasted rather than counted by hand.

Coverage that fails without the change, over every deploy flavour the runner has:

# tag dropped from bedAdd, everything else identical:
--- FAIL: TestBedDeployCarriesTheRunTag
    vm root:  argv = [deploy add check-arch-vm arch --dev-local-pkg], want it to carry `--tag 2026.288.1207` …
    vm child: argv = [deploy add check-arch-vm/arch-host --dev-local-pkg], want …
    (+ the in-place local arm, the pod arm, and the no-tag must-not-invent case)
# restored:
ok  …/candy/plugin-check

# and the tests that assert the roster→deploy-key conversion still hold under the new signature:
--- PASS: TestBedAddConvertsTheRosterAddress (0.00s)   (all five sub-cases)
--- PASS: TestBedDeployCarriesTheRunTag (0.00s)

The four findings of the previous verdict, answered

Finding Answer
1. A2/R7/R10 — the class bed cannot fail on the change; the fix is unproven. Narrowed, not papered over. R7 asks two things: coverage that fails without the change — TestBedDeployCarriesTheRunTag, pasted above with its negative control over all four flavours — and the changed path executed live — the VM bed's deploy-add, pasted above, on the path that previously passed no tag at all. The verdict's stronger demand (that the BED itself fail when the artifact differs) is not met by this PR, and the claim is now small enough that it does not need to be: the bed cannot assert artifact identity, and this body no longer says it does. That capability is opencharly/plugin-check#116, open, with its mechanism named.
2. R1 — #116 mislabels a BLOCKING finding as filed. Correct as stated against the old claim, and the classification changes with the claim. R1's test for non-blocking is "the change is correct and complete without the fix, and the finding can genuinely be separated from it." The old claim ("a run cannot certify an artifact it did not build") was false without the artifact-identity bed, so filing it was the forbidden split. The claim now made — the VM path carries the run tag as the pod path does — is correct and complete without that bed, and the bed is a separable capability (it would guard every bed in the fleet, not this argument). So #116 is filed, not deferred, and it stays open.
3. RDD — the high-risk assumption is proved by code reading. Correct, and the assumption is no longer relied upon. The narrowed claim asserts nothing about whether the tag pins the artifact, so there is no high-risk assumption left in this change to spike. The measurement it does need is named in #115's HANDING OVER: which field --tag matches — the image's own CalVer tag or its ai.opencharly.version label — with the three candidates it separates; and the reading I offered (resolveDeployRefLocal(… c.Tag …), resolvePodRuntimeImage(… opts.Tag …)) is about the pod resolver, which is why it cannot settle the VM path and is no longer presented as if it did.
4. A1 — the body's central claim is contradicted by its own evidence. Fixed by withdrawing the claim — the title and summary now say what the change does (symmetry) and record, in the same breath, the measurement that refutes the guarantee (the pod path was already tagged and still ran 0.48.1 for a 0.51.0 build). The two no longer contradict each other, because only one of them is asserted.

Rulebook compliance

Rule / check Answer
T1–T4 No secrets, no egress, no dependency change, no gate/validator/rulebook edit, no supply-chain change.
A1 Four required sections present; every diff path accounted for (bed_run.go's bedAdd + eight call sites + the deleted hand-tag, bed_deploy_tag_test.go new, bed_container_ref_test.go updated for the new signature); the claim does not exceed the evidence (finding 4 above); ## Filed issues present; footer last.
A2 Change class named; the class bed RAN on the VM path this PR changes, pasted, and the class gate's reach is stated rather than implied.
A3 Tier fully tested and validated: the class gate passed on the final tree (fresh rebuild + live re-run), the changed path executed live, and the changed argument construction has a covered test that fails without it.
R0 /charly-check:check, /charly-internals:plugin, :go, :go-quality, :git-workflow, :strict-policy loaded before the first tool call; this repo's AGENTS.md read.
R1 Every finding of the round answered above: two fixed (the claim, the classification), two rebutted with pasted evidence (R7's two-part requirement; the assumption is no longer depended upon). The anomaly I introduced myself — the arg-order ambiguity — is root-caused in the summary. The one capability this PR does not have is filed and open (#116).
R2 One home for the pin: bedAdd carries the tag for every caller, and the pod path's duplicate hand-written withRunTag is deleted in the same change.
R3 No sleep, retry, suppression or ad-hoc command; a typed parameter replaces a positional convention that could silently mis-bind.
R4 Product first: a deploy that resolves a different artifact than the run built is the defect, fixed at the argument-construction site rather than documented around.
R5 Claim-keyed sweep below, run and pasted.
R6 git status --short stated before staging; one commit; no amend/force-push/bypass; no direct push to main; the bed's VM is disposable: true and was destroyed by its own cleanup step.
R7 Coverage fails without the change (TestBedDeployCarriesTheRunTag, pasted negative control) and the changed path executed live (the VM bed's deploy-add, pasted). The emitted-artefact boundary here is the deploy argv, asserted for all four flavours.
R8 No service boundary is mocked; the bed runs against the real guest over SSH.
R9 The driver was rebuilt from source with a CalVer stamp and the run's summary.yml records it (/tmp/charly-vacuous-build/charly-tagfix, 2026.288.0644).
R10 Class gate run green on this head — fresh rebuild (update) plus a live re-run after it (check-live-rebuild), 10 steps, count taken from summary.yml.
HC One cutover: the helper, all eight call sites, the deleted duplicate, the new test and the updated existing test move together; nothing deferred inside the scope.
PIL — ADE/SDD No candy plan: or schema/wire shape is touched; the change is to the bed runner's own argument construction.
PIL — RDD The assumption the previous revision rested on is no longer asserted; the measurement that would establish it is named in #115.
CONC CONC(b)'s paste requirement met throughout; the capability this change lacks is filed and open rather than deferred in prose.
ARCH The change stays in the plugin that owns the bed runner; no new core or sdk symbol crosses the boundary.
DISP The mutated target is the bed's own disposable: true VM, created and destroyed by the run.
QUAL gofmt -l empty, go build/go test ./... green on the head (pasted).
COORD CLAIM on #115; HANDING OVER on #115 naming the resolver measurement and its three candidates; BLOCKS refreshed on plugin-crabbox#8 naming #115 as the owner of its red; #116 open.

R5 sweep, executed (the claim-keyed shape, org-wide in this repo):

$ grep -rn 'bedAdd(' candy/plugin-check/ | grep -v '_test.go'
candy/plugin-check/bed_run.go:202:func bedAdd(refs []string, tag string) []string {
candy/plugin-check/bed_run.go:1065: … bedAdd([]string{name, d.VMTemplate}, d.ImageTag) …
candy/plugin-check/bed_run.go:1072/1085/1095/1113/1137/1338/1344: … bedAdd(…, d.ImageTag) …
$ grep -rnE 'withRunTag\(bedAdd|addArgs = withRunTag' candy/plugin-check/ ; echo "exit=$?"
exit=1

Read precisely: every deploy call site passes the tag, and the hand-written withRunTag that guarded only the pod path is gone (exit=1 = no match), so the two paths can no longer drift.

Change classification

fully tested and validated — the class gate passed on the final tree (fresh rebuild + live re-run on the VM path this PR changes), the changed path executed live, and the changed argument construction has coverage that fails without it. The claim is limited to what those proofs establish; the stronger guarantee is not claimed anywhere in this body.

Filed issues

  • opencharly/plugin-check#116 — a bed whose live phase does not assert WHICH artifact it deployed, so its green is evidence about some image (open). Genuinely separable from this change by R1's test, and now correctly classified as such because the claim no longer depends on it. It names the mechanism (DeployRecord.ResolvedImage + runTaggedImageRef) and records what this round learned about reaching it: the bed runner has no executor seam (run_cmd.go re-enters the CLI rather than threading one — bed_ephemeral_timers.go reaches the deploy overlay through the session's executor, not the runner's), and charly deploy add --dry-run --format json emits the InstallPlan, not the resolved image reference — so the guard needs either an executor on the runner path or a CLI verb that names the resolved artifact. A successor should not have to rediscover that.
  • opencharly/plugin-check#115 — the parent defect, with a HANDING OVER naming the one measurement that decides its fix and the three candidates it separates. This PR does not close it: the pod path was already tagged and still ran a stale base, so the pod-side cause is that row's. opencharly/plugin-crabbox#8 therefore stays held, its stock-plugin control the proof that its red is foreign.

Agent: dsh-opencharly
Assisted-by: dsh deepseek-v4.1-flash (fully tested and validated)

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 0ab513f388c8 (branch: chore/pi-bump-pi-goal-v0.2.0)

Change class: configuration (pi package pin bump, 1 file / 1 line).

Security screen: PASS — single pin bump git:github.com/opencharly/[email protected] → v0.2.0 within the org's own fork; no scope mismatch, no secrets, no guardrail weakening, no unexpected ref target. Body contains no embedded directives.

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: body fully accounts for the single diff line; config-class gate (pr-validator) matches; analysed on a live system tier is justified by the pasted ls-remote + fork-side test evidence, not inflated; attribution footer present in the exact required form.
  • R5 pin discipline: bump to a merged, tagged release on the org fork, verified via ls-remote — internally consistent with the diff.
  • R10: config pin bump, no runtime code path; body verifies the pin against the live org fork and the fork release's committed tree. No bed required for this class.
  • R1/R2/R3/R4/R4a/R6/R8/R9/B13/B14/B15/B17/B18: N/A or satisfied — no failures/warnings, no surfaced issues, no duplication, no ad-hoc workarounds, no docs, no destructive actions, no generation changes, no candy/schema changes, single atomic commit, no autonomous destroy, no Go changes.
  • B16 placement: CORRECT — config pin in .pi/settings.json, no architecture concern.
  • Comment intake: no comments on the thread.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 3, 2026 07:49
@github-actions
github-actions Bot merged commit ec82840 into main Sep 3, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 3, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 11, 2026
Bump the docs submodule pin from 1a37f2ee (pre-#117, tag-on-merge head) to
3ec7cac61a8dfb85623ca78c5b66f70d49212987 — the current docs main HEAD after
#117 and its tag-on-merge. Nothing else changed:

  scripts/verify-pins.sh -> verify-pins: OK — 400 submodules, policy B holds

The docs repo is NOT charly-pinned (policy B); it pins to its own default
branch like every non-pinned repo.

Co-authored-by: atrawog <[email protected]>
@aitrawog
aitrawog deleted the chore/bump-pi-goal-v0.2.0 branch September 25, 2026 18:25
@aitrawog aitrawog changed the title chore(pi): bump pi-goal fork pin v0.1.7 -> v0.2.0 fix(bed): the VM path's deploy carries the run tag, as the pod path already does Oct 15, 2026
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