Skip to content

fix(deploykit): drop the dead group-root self-skip guard — spec #105 deleted Deploy.IsGroup() - #224

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/drop-group-guard
Sep 6, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/drop-group-guard

Conversation

@atrawog

@atrawog atrawog commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

spec #105 (v0.2026249.2106) deleted Deploy.IsGroup() as part of the hard group-kind cutover (group: removed from #ResourceKind; group deploys now migrate onto a primary substrate with deploy-level sibling members). sdk's deploykit/bed_session.go:71 still called it — the group-root self-skip guard in PersistBedDeployOverrides — so every consumer compiled against spec 2106 failed: plugin-check and plugin-preempt (both with in-flight IsGroup migration PRs) and charly's next consumer bump. This PR re-pins the sdk to spec v0.2026249.2106 and removes the guard.

RCA — delete, not re-derive

The one nuance checked before deletion: could a PRE-cutover persisted state file still deliver a group-shaped deploy root to this code path? No — two independent proofs:

  1. The node argument never originates from persisted state. It is the bed's folded node from the caller's CURRENT project config (a LoadUnified'd project under the spec feat(sdk)!: #118 core-min producer leg — deploykit/loaderkit/spec kits + wire types for the plugin-host end-state #105 schema): a group: root cannot be authored or parsed post-cutover, and charly migrate rewrites pre-cutover group deploys onto the primary substrate + deploy-level siblings before anything reaches this function.
  2. The persisted per-host overlay structurally cannot contain a group root. SaveDeployState (the only writer) takes SaveDeployStateInput = spec's type, which carries ZERO member fields (verified at spec 2106 spec/cue_types_gen.go:4868 — Ports/Env/Volume/Tunnel/... only). This is exactly why the deleted guard's own comment documented that persisting a group root would write a memberless bed: pre-cutover persisted state is substrate-shaped only.

The targetless member-bearing deploy shape the guard defended against is unauthorable post-migrate — the guard is dead code. Deleted outright per R5 (no positional re-derivation, no stale-state tolerance comment needed). The local/host-rooted (fleet.HostRooted(&node)) and in-place-external (externalInPlace) self-skips at the same site REMAIN — they are live, load-bearing guards.

IsGroup sweep

spec #105's merge note said bed_session.go:71 was the only known sdk call site — verified: git grep -n IsGroup on the committed HEAD returns ZERO matches. The IsGroup occurrences remaining in spec 2106 itself are the seam.cue/arbiter.cue wire FIELDS (is_group?: bool @go(IsGroup)) deliberately kept for plugin-check/plugin-preempt consumers — a different type, untouched here. deploy_state.go's remaining member handling (InSubstrateMembers, n.Member) is the member-tree IR that SURVIVED the cutover — not group-kind code.

How tested

$ go build ./... ; echo BUILD_EXIT:$?
BUILD_EXIT:0
$ go vet ./... ; echo VET_EXIT:$?
VET_EXIT:0
$ go test ./... -count=1 ; echo TEST_EXIT:$?
TEST_EXIT:0
ok  	github.com/opencharly/sdk	0.078s
ok  	github.com/opencharly/sdk/agentkit	0.434s
ok  	github.com/opencharly/sdk/buildkit	0.007s
ok  	github.com/opencharly/sdk/candywalk	0.002s
ok  	github.com/opencharly/sdk/deploykit	2.559s
ok  	github.com/opencharly/sdk/enginekit	0.004s
ok  	github.com/opencharly/sdk/kit	0.986s
ok  	github.com/opencharly/sdk/loaderkit	2.202s
ok  	github.com/opencharly/sdk/packagekit	0.014s
ok  	github.com/opencharly/sdk/vmshared	0.115s
$ git grep -n "IsGroup" HEAD ; echo SWEEP_EXIT:$?
SWEEP_EXIT:1   # zero matches on the committed tree

Rulebook compliance

  • R0 — git-workflow skill loaded before first git action; sdk CLAUDE.md signpost followed (spec is the contract module; this is a consumer pin bump + dead-code removal, no schema change here).
  • R1 — RCA performed before remediation (above), including the stale-persisted-state nuance, resolved to NO by two independent proofs (node provenance + SaveDeployStateInput field set).
  • R2 — n/a (no plan file).
  • R3 — No duplication: the guard was the sole remaining consumer of the deleted method in this module; nothing re-implemented.
  • R4 — No workarounds: plain deletion, no shims, no keep-alive stubs for the deleted method.
  • R5 — Hard cutover: the dead group-root arm AND its now-false comment block die in the same commit as the pin bump. The surviving HostRooted/externalInPlace guards are live behavior, not legacy.
  • R6 — git status clean before commit; no force-push; no direct main push; no hook bypass.
  • R7/R10 — build/vet/test run with -count=1 on the final committed tree (R7 paste above); the IsGroup sweep executed via git grep HEAD on the COMMITTED tree (not the working tree).
  • R8 — CHANGELOG is the PR body (tag-on-merge writes it at merge).
  • R9 — n/a (no submodule pins changed in this repo; the spec require moves to a MERGED tagged release, v0.2026249.2106 — pin discipline holds).
  • R10 — Fresh disposable proof: gates run after the final commit, sweep on HEAD.

Note for the wave: this tag unblocks the two waiting consumer workers (plugin-check, plugin-preempt IsGroup migrations) and charly's CC-1 consumer PR re-pin.

Change classification

  • Change class: library dead-code removal (R5 cutover residue) + dependency pin bump — no exported API change in this module (the deleted call was internal to PersistBedDeployOverrides; its signature is unchanged).
  • Verification gate: go build / go vet / go test -count=1 all GREEN on the committed tree + executed git grep sweep (zero IsGroup matches on HEAD).
  • Attribution tier: fully tested and validated — full local gate passed on the final committed tree, changed path (deploykit) executed live by the test run.

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 1f071130788b44dca2c0ce605ff959bf8c1a3244 (branch: fix/deploykit-drop-group-root-guard)

Security screen: PASS — no instruction injection, no scope mismatch (removal + pin bump both accounted for), no secrets/exfiltration, no weakened guardrails, no supply-chain anomaly (spec pin moves to a merged tagged release).

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: body complete, gate (build/vet/test + grep sweep) matches code-change class, fully tested and validated justified — changed deploykit path executed live in the test run; footer in exact required form.
  • R1: RCA provided (two independent proofs the guard is dead); zero warnings in output.
  • R3/R4/R5: clean deletion, no duplication, no workaround; dead guard + false comment die in the same commit as the pin bump; grep sweep executed on HEAD with pasted output (zero IsGroup matches).
  • R10: fresh -count=1 run on committed tree, internally consistent pasted output; deletion needs no new failing-without-it test.
  • B16 placement: CORRECT — dead-code removal within deploykit (right layer), no alias growth, no new core imports.
  • SDD/ADE/RDD: n/a (no schema/cue/candy changes; consumer pin bump only).
  • No comments on thread to adjudicate.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 6, 2026 21:13
@github-actions
github-actions Bot merged commit 5fdba91 into main Sep 6, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 6, 2026
@aitrawog
aitrawog deleted the feat/drop-group-guard branch September 25, 2026 19:07
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