Skip to content

refactor(check,box)!: wave-2 — P12a check/ADE fold + P14-rest closeout + dead-code sweep + gitlink bumps - #133

Merged
atrawog merged 13 commits into
mainfrom
feat/wave2-check-ade-fold
Jul 16, 2026
Merged

atrawog merged 13 commits into
mainfrom
feat/wave2-check-ade-fold

Conversation

@atrawog

@atrawog atrawog commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Wave-2 consolidated landing

This PR is the wave-2 vehicle (wave-1's #127 is merged history): one R10 roster
proves the whole batch rather than paying the landing ceremony per member
(Cutover Sizing Law). Each member section below quotes that member's own
CHANGELOG evidence VERBATIM rather than re-summarizing it.

Status of each member — ALL LANDED:

  • P12a — check/ADE architecture fold (T-53)
  • P14-rest closeout — box labels externalization + K-wave annotation sweep + dead-code sweep (T-55)
  • gitlink bumps — sdk (→ merged sdk#60) + plugins (→ post-docs-batch-3 main)

Member: P12a — check/ADE architecture fold

P12a — check/ADE architecture fold (superproject leg)

Wave-2 architecture-fold cutover: the movable-now half of the P12-rest RDD
trace (charly's check/ADE surface). See sdk/CHANGELOG/2026.197.1320.md
for the sdk-side detail; this entry covers the charly core repoint.

Deleted (relocated to sdk/kit or sdk/deploykit)

  • charly/check_feature_grader.go (+ test) → sdk/kit/grader.go
    (kit.AgentGrader). Core constructs &kit.AgentGrader{} directly
    (host_build_check_run.go's hostFeatureLive) since it may only import
    sdk, never a plugin candy.
  • charly/check_box_container.go → sdk/deploykit/check_box_chain.go
    (deploykit.CheckBoxContainerChain).
  • charly/description_run.go + charly/description_spec.go — pure
    dealiasing deletes. Every RunPlan(ctx, r, set, nil, false) call site now
    calls kit.RunPlan(ctx, r, set, false) directly (the *TagExpr 4th
    parameter was already discarded by the wrapper — dropping it is a
    formalization, not a behavior change); every KwRun/KwCheck/… bare
    reference now reads kit.KwRun/kit.KwCheck/… .
  • charly/plan_validate.go → sdk/kit/planvalidate.go
    (kit.ValidatePlanSteps), called from both charly box validate and the
    charly feature HostBuild seam.
  • charly/checkvars.go (+ test) → sdk/kit/checkvars.go
    (kit.ResolveCheckVarsBuild/kit.ResolveCheckVarsRuntime/
    kit.CheckVarResolver/kit.ContainerInspection). ~6 call sites repointed
    (check_cmd.go, check_members.go, checkrun.go, host_build_check_run.go,
    android_deploy_cmd.go, planrun_adapter.go's doc comment).
  • charly/check_http.go (+ test) → sdk/kit/http_do.go
    (kit.DoHTTPRequest/kit.HTTPClientFor/kit.FormatHTTPHeaders), called
    from both check_kit_adapter.go's in-proc leg and
    plugin_checkcontext_reverse.go's out-of-process leg.
  • charly/local_image.go (+ test) → sdk/kit/local_image.go. ~17 core
    files repointed to kit.ResolveLocalImageRef/kit.ListLocalImages/
    kit.LocalImageInfo/kit.ResolveNewestLocalCalVer/kit.ErrImageNotLocal/
    kit.LooksLikeFullRef (the last had 4 callers beyond the moved file:
    image.go, config_image.go, ensure_image.go x2). labels.go's
    ErrImageNotLocal var and image.go's looksLikeFullRef func bodies
    deleted outright (no re-export alias — ZERO-ALIASES).

Dead-code removal (R3/R5, surfaced by the move)

  • charly/agent_config.go's VersionResult/ParseAgentTimeout (+ test)
    deleted: byte-identical duplicates of candy/plugin-check/agent.go's own
    copies, with zero production callers in core (only their own test).
    resolveAgentViaPlugin (the legitimate M-dispatch) is unchanged.
  • charly/kit_aliases.go's TagExpr type alias deleted: once every
    RunPlan call site stopped taking a filter argument,
    check_feature_run.go's planTagFilter (renamed validateTagExpr, now
    syntax-checks --tag only) lost its last live caller of the *TagExpr
    return value (a golangci-lint unparam finding, fixed by simplifying the
    function rather than suppressing the warning).

Confirmed non-blocking finding (RCA'd, routed to the next

check-correctness thematic batch — NOT fixed in this cutover)

--tag on charly box feature run / charly check feature run is
currently a no-op: the flag's syntax is validated but the parsed
*TagExpr was never applied as a step filter anywhere in kit.RunPlan's
walk (confirmed via root-cause-analyzer: present since this repo's
earliest recorded history, not a regression). This cutover's callers were
already discarding the value; the RunPlan signature dealiasing above
made the discard explicit rather than introducing it. Implementing real
tag-filtering in kit.RunPlan is a feature fix, not an architecture move,
and is out of scope here.

R10 proof

  • charly box validate, go build/go vet/go test/golangci-lint (0
    issues after clearing a stale shared lint-cache artifact) + gofmt clean
    on both sdk and charly.
  • task build:binary — fresh binary built, content-marker-verified
    (deploykit.CheckBoxContainerChain present in the built binary).
  • charly check run check-sidecar-pod — PASS, 12/12 steps including the
    fresh-rebuild update + feature-run-rebuild steps (exercises the
    checkvars.go move via check-live, and the check_feature_grader.go move's
    dispatch machinery via feature-run).
  • charly check run check-commands-local — PASS, 6/6 steps including the
    fresh-rebuild update step.
  • Targeted live proof of the riskiest moved piece (kit.AgentGrader): no
    bed in this repo's roster drives a real agent-check: step end-to-end
    through a live grader, so a temporary spike step was added to
    check-keepalive's plan, charly check feature run check-sidecar-pod --agent claude was run live (the real claude CLI spawned, probed the
    running pod via charly status/supervisorctl status, and returned a
    parsed PASS verdict with real evidence), then the spike step was reverted
    before this commit — git diff against candy/check-keepalive/charly.yml
    is clean.

Not in this cutover (per the trace, tracked separately)

The GATED-R-ITEM half of the P12-rest trace (check_cmd.go's live-gather
engine, check_venue.go/check_members.go's resolvers,
host_build_check_bed.go/host_build_check_run.go's session bodies,
description_collect.go's CollectDescriptions, the pure-helper
extractions from those files, and the check_feature_run.go CLI-grammar
placement question) is unchanged — it joins the tracked K-wave-exit list
(task #21's precedent).

Follow-up (same wave member): the pure-helper extraction tier

Deleted the 6 confirmed-movable pure helper bodies, repointing every core
call site to the new sdk/kit homes (see sdk/CHANGELOG/2026.197.1320.md
for the kit-side detail):

  • charly/check_venue.go's parsePublishedPort → kit.ParsePublishedPort
    (containerPublishedAddr's one call site).
  • charly/vnc_helpers.go's unixToTcpBridge → kit.UnixToTCPBridge
    (ssh.go, check_endpoint_resolve.go).
  • charly/check_members.go's closeHostCleanups/collectHostRefs/
    splitHostKey → kit.CloseHostCleanups/kit.CollectHostRefs/
    kit.SplitHostKey (check_cmd.go, check_runner_live.go,
    check_members.go itself). The file's own duplicate hostVar const is
    deleted — its sole use (inside collectHostRefs) moved with the function,
    and the already-relocated kit.HostVar (P12a main leg, planspec.go)
    covers it.
  • charly/description_collect.go's MergeDeployDescriptions →
    kit.MergeDeployDescriptions (check_cmd.go, two call sites).
  • charly/kit_aliases.go's collectAnyStrings alias deleted: lost its sole
    caller when collectHostRefs moved to kit (which now calls
    kit.CollectAnyStrings directly) — a caller-less alias, removed rather
    than kept (golangci-lint unused confirmed).
  • candy/plugin-check/check_cmd.go's reportSteps/failErrorFor now
    delegate to the new kit.ReportStepResults/kit.ClassifyStepFailures
    (R3 dedup — the format-selection switch + fail/infra classification was
    duplicated verbatim against charly/check_feature_run.go's own
    reportSteps/stepFailCount even before this change; the kit functions
    are the one shared source now for the plugin-check side, which no longer
    hand-rolls the classification loop).

RDD correction: 2 of the 8 originally-listed helpers
(waitForContainerReady, deployNestedLocalChildren, both in
charly/check_bed_run.go) turned out to be GATED on fresh re-reading
(loadedReadiness()→LoadUnified; nodeTraits()→provider registry) and
are NOT moved — see the sdk-side changelog for the full trace.

Item 3(b) — charly box feature run Kong-nesting: ATTEMPTED, REVERTED

Attempted nesting BoxFeatureCmd/BoxFeatureRunCmd under candy/plugin-box
as a 7th box command word; reverted after a runtime panic exposed a real
word collision with candy/plugin-feature's existing top-level feature
word in the flat provider-registry namespace. charly/check_feature_run.go,
charly/image.go, and charly/host_build_check_run.go are restored
byte-identical to their pre-attempt state (verified via git diff); only
check_feature_run.go's and candy/plugin-box/plugin.go's doc comments
carry a net change, recording the finding. Full root cause + the two
candidate fixes for P12b: sdk/CHANGELOG/2026.197.1320.md.

R10 proof (follow-up)

  • go build/go vet/gofmt/golangci-lint (0 issues after a cache clean)
    clean on sdk, charly, candy/plugin-box, candy/plugin-check.
  • go test ./... green on all four modules (charly: 229.8s, includes the
    full package).
  • task build:binary — fresh binary built; content-marker-verified via
    strings bin/charly | grep sdk/kit.<symbol> for all 8 new/relocated kit
    symbols (ParsePublishedPort, UnixToTCPBridge, CollectHostRefs,
    SplitHostKey, CloseHostCleanups, MergeDeployDescriptions,
    ReportStepResults, ClassifyStepFailures).
  • charly box validate — clean, exit 0.
  • charly box feature run check-sidecar-pod — live parity proof for the
    reverted item 3(b): 14 passed, 0 failed, 3 skipped, exit 0 (the restored
    in-core leaf still runs end-to-end).
  • charly check run check-sidecar-pod (bed-runner attempt 4, after clearing
    a stale lock from an earlier attempt this session interrupted) — PASS,
    exit 0, all 12 steps ok:true (image-build/check-image/deploy-add/config/
    start/bring-up-members/check-live/feature-run/update/feature-run-rebuild/
    cleanup/cleanup-members), total_seconds:315. check-live: 20/22 passed (2
    legitimate skips — mutating run: steps, verify-only mode by design).
    feature-run-rebuild (post fresh-charly update): 17/17 passed. Teardown
    clean (podman ps -a empty, charly.yml clean).
  • charly check run check-commands-local — two exploratory attempts (runs
    2026.197.1356 and 2026.197.1510) FAILED on the same 4 steps with charly: error: stale binary detected — refusing to run "..." / running: /usr/bin/charly. Root-caused (not dismissed): the bed's kind:local, host:local plan runs bare charly in its check: steps, which resolves
    via the invoking shell's PATH — 1356 hit a transient window where
    bin/charly didn't exist yet during a concurrent rebuild (silent PATH
    fallback to the system package); 1510 was invoked as a literal ./bin/ charly path with NO PATH= prefix set at all, so the inner bare-charly
    check steps had no way to find the worktree binary and correctly fell
    through to the system PATH's /usr/bin/charly, which was itself stale
    relative to this worktree's rebuilt plugins_generated.go. Neither is a
    regression in this cutover's own code (the bed's plan exercises settings/
    clean/candy/box commands, none of which this cutover touches). THIRD,
    FINAL attempt (run 2026.197.1528) — PATH=<worktree>/bin:$PATH charly check run check-commands-local, with bin/charly confirmed present and
    untouched for the run's duration — PASSED: exit 0, all 6 steps ok:true,
    186s total, check-live: 7/7 checks passed (the 4 previously-failing
    steps now resolve the worktree binary correctly and exit 0), including
    the fresh-rebuild update step.

Multi-committer main advance merged in

origin/main advanced twice while this follow-up was in flight: the
vmshared→spec envelope-route repoint (task #16, ~278 files, a tree-wide
bare-identifier→spec.* rename) and the openclaw dependency-pin fix (#112).
Neither had merged this cutover's own P12a-proper commit yet (unlike the sdk
leg, whose predecessor PR #59 merged mid-session — see the CHANGELOG rename
above), so this was a genuine ahead/behind merge, not an ancestor-descendant
gitlink bump. Merged origin/main locally (git merge, never rebase/force-
push) and hand-resolved 8 conflicts across 5 files where this cutover's own
relocations and the tree-wide rename touched the same lines (check_cmd.go,
check_members.go, check_members_test.go, description_collect.go,
host_build_feature_test.go) plus 3 modify/delete conflicts on files this
cutover's P12a-proper leg already relocated to sdk/kit (checkvars.go,
plan_validate.go, check_feature_grader_test.go — the deletion won in each
case). Every resolution combines BOTH sides' intent: this cutover's function
relocations (kit.CollectHostRefs, kit.MergeDeployDescriptions,
kit.ValidatePlanSteps, …) applied atop the repoint's spec.Op/spec.Step
type qualifiers. Re-ran the FULL gate post-merge (build/vet/fmt/lint/test on
all four touched modules, fresh binary + content-marker re-verification,
charly box validate, charly box feature run check-sidecar-pod) — all
green — since the overlap was non-empty and touched this cutover's own
changed files (the git-workflow skill's delta-re-gate rule).

Assisted-by: Claude (fully tested and validated)


Member: P14-rest closeout — box labels externalization + K-wave annotations + dead-code sweep

2026.197.1139 — refactor(core): P14-rest closeout — box labels externalization + K-wave annotation sweep

Wave-2 member (P14-rest RDD trace closeout). A Phase-1 read-only trace over the
25 files remaining from the P14 status/OCI/scaffold cone (5 of the originally
tracked 27 had already been deleted by the P14a/P14b cutover) found that most
of the cone was already correctly classified — GATED-until-K5 (the status
framework), or already self-documented UNTIL-K3/K5 shims (merge.go,
oci_plugin.go, box_inspect_overlay.go). The genuinely actionable, low-risk
residue was three items; this cutover lands them plus a doc-only K-wave
annotation sweep team-lead requested on the gated files that lacked one.

What changed

  1. box_labels_cmd.go → candy/plugin-box nested labels command. charly box labels <ref> now dispatches through the compiled-in candy/plugin-box
    command:labels word (matching the P14b/P15 pattern of its sibling verbs
    generate/validate/new/pkg/inspect/list), which reaches the hidden core
    __box-labels reentry over HostBuild("cli") — the SAME reentry shape as
    pkg/inspect's overlay-and-list-tags formats/fetch/refresh, since
    ResolveRuntime/resolveLocalImageRef/InspectLabels are host container-storage
    probes the plugin cannot compute pre-K1. BoxLabelsCmd's struct + Run
    method are UNCHANGED (byte-for-byte); only the Kong registration moved from
    nested-under-BoxCmd to a hidden top-level __box-labels command. R5 swept:
    the OLD Labels BoxLabelsCmd nested-grammar line is gone from image.go's
    BoxCmd struct; every doc comment listing the retained vs. nested verb sets
    updated.

  2. labelset.go deleted (not folded). RDD-verified the file's own LabelSet
    type has ZERO consumers anywhere in the repo (its LabelDescriptionSet/
    LabeledDescription content had already moved to sdk/kit in an earlier
    cutover, leaving only a trivial, entirely-dead wrapper struct). Deleting
    dead code is cleaner than folding it into labels.go, so that's what
    landed instead of the originally-suggested fold.

  3. K-wave exit annotation sweep (doc-only, zero behavior change) — added
    explicit "MIGRATION INVENTORY (north-star §4.4): ... UNTIL-K" comments,
    matching the established convention in merge.go/oci_plugin.go/
    box_inspect_overlay.go, to every gated file that lacked one:

    • engine.go (UNTIL-K4 — 10 cross-cone consumers measured: commands.go,
      container.go, pod_lifecycle_resolve.go, preempt.go,
      resolved_project_host.go, service.go, start.go, config_image.go,
      status_collector.go, volume_cp_tags_cmd.go)
    • transfer.go (UNTIL-K4 — 2 consumers, both deploy-cone)
    • remote_image.go (UNTIL-K1/K3 — 7 consumers spanning loader- and
      build-cone; NOT an OCI-registry file despite the filename, corrected in
      its own header comment)
    • alias_collect.go (UNTIL-K3/K1 — see the R1 finding below)
    • image.go's BoxCmd (UNTIL-K5, command-dispersal — the retained
      build/merge/pull/feature/reconcile verbs)
    • status_collector.go + status_collect_{vm,k8s,adb}.go +
      status_nested.go + status_reap.go (UNTIL-K5 — deploy-cone-coupled,
      matching status_substrate.go's existing "stays host-side until K5" note,
      which now has six siblings pointing back to it instead of being the lone
      annotated file in the cone)

R1 finding surfaced while sweeping alias_collect.go (fixed in the same edit)

The file's own comment claimed aliasNameRe was "the LOAD-TIME validation
regex (validate.go rejects malformed alias names)". Verified FALSE: validate.go
has no alias-related code at all, and aliasNameRe in charly/core has no
production call site anywhere (only its own unit test exercises it).
candy/plugin-box/validate_rules.go carries an INDEPENDENT copy of the same
regex that IS wired into charly box validate — the box-authoring validation
externalization moved the real enforcement there without sweeping this now-orphaned
core copy. Per R2 this cannot be an unscheduled future batch — it is executed
in this same cutover, below.

Dead-code sweep addendum (executed in this same cutover, per R2)

(a) aliasNameRe orphan resolved. Mirrored the pattern-regression coverage
into candy/plugin-box/validate_pure_test.go (TestAliasNameRegex, run
against the LIVE validate_rules.go copy — 13 subtests, all pass), then
deleted the orphaned core copy: charly/alias_collect.go's aliasNameRe var +
regexp import, and charly/alias_collect_test.go's TestAliasNameRegex.
R5 grep: aliasNameRe in charly/ now appears only in this file's own
explanatory past-tense comment.

(b) Broader manual harvest (golangci-lint's unused linter reports 0
issues on charly/ both before and after — it reliably catches unexported
dead code but not an exported symbol whose only "consumer" is its own test, so
every further finding below came from manual cross-reference grep, not the
linter):

Confirmed dead and deleted, charly/remote_image.go:

  • RemoteContainerName (func) — zero production consumers; only its own test.
  • RemoteImageContext.ContainerName() (method) — zero consumers anywhere,
    not even a test; does not satisfy any interface.
  • RemoteImageContext.CollectVolumes() (method) — zero consumers anywhere,
    not even a test; does not satisfy any interface. (The wrapped
    CollectBoxVolume function it called stays — it has three other real
    callers: render_baked_metadata.go, resolved_project_host.go, tasks.go.)
  • charly/remote_image_test.go's TestRemoteContainerName removed with it;
    TestStripURLScheme and TestResolveImageName (tests unrelated, still-live
    functions) are untouched.
  • R5 grep: RemoteContainerName zero hits repo-wide; \.ContainerName\( zero
    hits except an unrelated package-qualified kit.ContainerName in
    sdk/deploykit/quadlet.go (a different function in a different package —
    confirmed unrelated, not a false negative); \.CollectVolumes\( zero hits.

Checked and confirmed LIVE (not dead, no action) — the remaining P14-rest-cone
files' exported top-level symbols:

  • CapabilitiesFromLabels, FormatCLIError, DeployFromBox,
    ExtractMetadata — each has multiple real production call sites (verified
    by grep; ExtractMetadata alone has 19).
  • BoxCmd, BoxPullCmd, InspectOverlayCmd, ReapOrphansCmd — Kong CLI
    command structs wired via cmd:"" tags (main.go for the first three,
    plugin_command_reap_orphans.go for the fourth) — load-bearing reflection,
    not a plain call-site grep target.
  • VMCollector, K8sCollector, AndroidCollector — each self-registers via
    its own file's init() → registerSubstrate(...) closure (never referenced
    by name outside that closure) — load-bearing init-time side effect, exactly
    the "referenced only by an assigned-but-uncalled closure" retention pattern
    the go-quality skill flags to keep.

Sweep capped here. Every exported top-level symbol in the 15
not-yet-per-symbol-audited P14-rest-cone files (status_collector.go,
status_collect_{vm,k8s,adb}.go, status_nested.go, status_reap.go,
status_substrate.go, status_substrate_host.go, box_inspect_overlay.go,
capabilities.go, image.go, oci_plugin.go, k8s_deploy_from_box.go,
cue_kind_k8s.go, labels.go) was checked and traces to a real consumer, a
Kong reflection wiring, or an init-registration closure — none flagged
load-bearing-ambiguous were deleted (per the "cap the sweep honestly"
instruction: flag, don't delete, anything reflection/init-coupled). No further
manual per-symbol audit of these files' unexported internals is warranted:
golangci-lint unused already covers unexported dead code reliably and
reports 0 issues on the whole module.

Verification

go build ./... + go test ./... (charly module, 112s) green;
golangci-lint run 0 issues on BOTH charly and candy/plugin-box;
gofmt -l clean on both; go vet clean (implied by the build).
candy/plugin-box's TestNewMeta_DeclaresNestedCommands updated for the new
7th nested capability (was hardcoded to 6).

task build:binary succeeds; PATH=./bin:$PATH charly box validate exit 0
(never a host install — per-worktree binary only, per the #55 lesson).

Re-verified after the dead-code sweep addendum (both modules, full suite,
not just the targeted alias test):

  • go build ./... (charly) — clean.
  • go test ./... (charly) — ok github.com/opencharly/charly/charly 99.508s,
    ok .../internal/pluginsgen 0.009s.
  • GOWORK=off go build ./... + go test ./... (candy/plugin-box) —
    ok github.com/opencharly/charly/candy/plugin-box 0.006s.
  • golangci-lint run ./... (isolated cache dirs, avoiding concurrent-teammate
    lock contention) — 0 issues on BOTH modules.
  • gofmt -l — clean on both.
  • task build:binary — succeeds (pluginsgen regen + CalVer-stamped build +
    candy/charly/bin/charly copy).
  • PATH=./bin:$PATH charly version → 2026.197.1140 (fresh build, matches);
    PATH=./bin:$PATH charly box validate → exit 0 (never a host install).

Labels parity proof (before = pre-move nested-BoxCmd behavior on the OLD
binary, after = the moved candy/plugin-box command:labels path on the
rebuilt binary):

  • charly box labels <local-image> --format init → byte-identical output
    (supervisord) on both, exit 0 on both.
  • Full unformatted listing (19 lines of ai.opencharly.* labels) →
    byte-identical on both.
  • Missing-label error path (--format this-label-does-not-exist) → identical
    behavior: the real CLAUDE.md-R8 error message prints via inherited stdio,
    exit 1 on both.
  • The generic top-level charly box labels --help now shows the same
    "out-of-process command plugin" shell every OTHER already-moved nested verb
    (pkg, inspect, …) already shows — confirmed via side-by-side comparison,
    not a regression this move introduces. The RICH per-flag help (forwarded via
    charly box labels <ref> --help) renders correctly through the plugin's own
    Kong parse.

Tier: analysed on a live system — no disposable bed exercises box labels
specifically (it is project-less/read-only; check-sidecar-pod doesn't reach
it), so the live parity run against a real local image IS the proof, per the
"R10 gate by change class" matrix's "beds whose substrate the change cannot
reach are explicitly not required."

Assisted-by: Claude (analysed on a live system)


Member: gitlink bumps


Integration notes (this landing)

  • Merge order applied: branched feat/wave2-check-ade-fold off origin/main
    (493ad53, post wave-1 + PR fix: pin OpenClaw dependency #112) → merged feat/p12a-check-fold (50005c6,
    clean FAST-FORWARD — main already contained everything the branch's own base
    needed) → bumped the sdk gitlink to the merged 62958209 (T-53's own pin
    lagged sdk#60, per the gitlink-bumps section above) → merged
    feat/p14-rest-closeout (ee73406, real 3-way merge, 8 files auto-merged
    cleanly by git with ZERO manual conflicts) → bumped the plugins gitlink to
    f6c1de8 → PR opened → GitHub reported BEHIND (origin/main had advanced
    one commit, 0df2810 "fix(hooks): make pre-commit ZERO-ALIASES gate
    merge-commit-aware" — a .claude/hooks/*.sh fix with ZERO file overlap
    against this branch's own changes) → merged that commit in (clean, zero
    conflicts, confirming the predicted empty overlap), re-ran the delta re-gate
    (rebuild — zero regeneration drift — + go test ./charly/... + golangci-lint,
    all clean) per the git-workflow skill's empty-overlap rule, pushed again.
  • p12a↔p14 overlap: as predicted, disjoint cones (T-53's check/ADE files vs.
    T-55's status/OCI/box files) with trivial line-level overlap in
    candy/plugin-box/plugin.go (both add distinct nested command registrations)
    and a handful of status_collect_*.go/transfer.go/image.go files (T-53's
    cutover added minor references, T-55's cutover added K-wave doc annotations to
    the same files) — git auto-merged all of it with zero conflict markers,
    verified via git diff --name-only --diff-filter=U returning empty.
  • Full integrated gate (after both merges + both gitlink bumps, on the final
    tree): task build:binary clean (the pluginsgen regeneration step ran as a
    no-op, confirming zero drift), go test ./charly/... clean (90s),
    go test ./candy/plugin-box/... ./candy/plugin-check/... clean,
    golangci-lint run 0 issues on charly + candy/plugin-box + candy/plugin-check,
    PATH=$PWD/bin:$PATH ./bin/charly box validate exit 0, sdk standalone battery
    (go mod verify && go build ./... && go test ./...) all green.
  • Confirmation bed: check-sidecar-pod run against this integration binary
    (exercises BOTH members' surfaces at once — the check/ADE fold's live
    check-live + feature-run path, and plugin-box's baked labels/command
    registration) — verdict below.

Confirmed R10 roster (all PASS)

Bed Owner Result
check-sidecar-pod T-53 (own branch, feat/p12a-check-fold) PASS, 12/12 steps, 315s
check-commands-local T-53 (own branch, feat/p12a-check-fold) PASS, 6/6 steps, 186s
check-sidecar-pod integrator (this branch, confirmation — exercises BOTH members together) PASS, run 2026.197.1550, 12/12 steps, 313s — image-build/check-image/deploy-add/config/start/bring-up-members/check-live/feature-run/update/feature-run-rebuild/cleanup/cleanup-members all ok:true, including the fresh-rebuild update + feature-run-rebuild steps

Change class

code/config (Go runtime + candy/plugin architecture-fold changes across two
members, plus doc-only gitlink bumps tiered independently).

Final tier

fully tested and validated. Both members landed with their own full R10
proof (T-53: two disposable beds PASS on the fold's own branch, plus a live
agent-grader spike proving the riskiest moved piece; T-55: full build/test/lint
plus a live before/after labels-parity proof for the one change class no bed
composes). The integrator's confirmation bed — check-sidecar-pod run against
the FULLY INTEGRATED tree (both merges + both gitlink bumps) — PASSED end to
end, exercising both members' surfaces simultaneously: the check/ADE fold's
live check-live + feature-run + feature-run-rebuild dispatch path, and
plugin-box's baked command registration and labels surface the fold's tree
composes. Every static gate (build/test/vet/lint/box-validate/sdk-standalone)
passed per-member and on the fully-integrated tree, with zero drift on
regeneration.

atrawog added 13 commits July 16, 2026 13:40
…ve annotations

Wave-2 member landing the actionable residue found by the P14-rest RDD trace:

- box_labels_cmd.go -> candy/plugin-box nested "labels" command (matching the
  P14b/P15 pkg/inspect/list pattern; hidden __box-labels core reentry, byte-
  identical behavior verified against a real local image).
- labelset.go deleted (RDD-verified zero consumers, not folded into labels.go
  as a still-dead relocation would have been).
- K-wave exit annotations added to engine.go (K4), transfer.go (K4),
  remote_image.go (K1/K3), alias_collect.go (K3/K1), image.go's BoxCmd (K5),
  and the six deploy-cone status files (K5), matching the existing
  merge.go/oci_plugin.go/box_inspect_overlay.go convention.
- R1 finding fixed in the same edit: alias_collect.go's own comment falsely
  claimed validate.go consumes aliasNameRe; it doesn't (candy/plugin-box has
  an independent, actually-wired copy) — corrected, dead-code removal flagged
  for a future batch rather than expanding this cutover.

Assisted-by: Claude (analysed on a live system)
…ote_image dead symbols

Per R2, a surfaced non-blocking finding cannot join an unscheduled future
batch — it becomes this cutover's immediate next unit. Mirrors
TestAliasNameRegex's coverage into candy/plugin-box (against its own live
aliasNameRe), then deletes the orphaned charly-core copy + its test. Extends
the manual harvest (golangci-lint unused is 0 on charly/ before and after —
it can't see an exported symbol used only by its own test) to
charly/remote_image.go: RemoteContainerName, ContainerName(), and
CollectVolumes() had zero production consumers and are deleted with their
test; the remaining P14-rest-cone files' exported symbols were checked and
confirmed either live or load-bearing via Kong reflection / init-time
self-registration (flagged, not deleted).

Assisted-by: Claude (analysed on a live system)
Relocates the genuinely-portable half of the P12-rest RDD trace (charly's
check/ADE surface) into sdk/kit and sdk/deploykit (sdk companion:
opencharly/sdk@b049002): the agent grader (AgentGrader), check-variable
resolution (ContainerInspection/ResolveCheckVarsBuild/Runtime), the HTTP-do
path, ValidatePlanSteps, the local-image resolution surface, and
CheckBoxContainerChain. Every piece needed no host callback.

Deletes 8 core files whose logic fully relocated (check_feature_grader.go,
check_box_container.go, description_run.go, description_spec.go,
plan_validate.go, checkvars.go, check_http.go, local_image.go, + tests) and
repoints ~30 call sites across charly core. Also removes dead code
surfaced by the move: agent_config.go's duplicate VersionResult/
ParseAgentTimeout (candy/plugin-check already owns the live copy) and the
kit_aliases.go TagExpr alias (lost its last caller once every RunPlan call
site stopped taking a tag-filter argument).

RCA'd a confirmed, pre-existing, non-blocking bug while touching RunPlan's
callers: --tag on charly box/check feature run has never applied its
parsed filter to the plan walk (kit.RunPlan takes no filter param) --
present since this repo's earliest history, not a regression this cutover
causes. Routed to the next check-correctness thematic batch; NOT fixed
here (a feature fix, not an architecture move).

The GATED-R-ITEM half of the trace (needs the live core *Config/*Generator
graph: check_cmd.go's live-gather engine, check_venue.go/check_members.go's
resolvers, the host_build_check_bed.go/host_build_check_run.go session
bodies, description_collect.go's CollectDescriptions) is unchanged and
joins the tracked K-wave-exit list (task #21's precedent).

Verified via: go build/vet/test + golangci-lint (0 issues) + gofmt clean
on charly and sdk; task build:binary (content-marker verified); charly box
validate; charly check run check-sidecar-pod (PASS 12/12, incl. fresh
rebuild); charly check run check-commands-local (PASS 6/6, incl. fresh
rebuild); a live targeted proof of the riskiest moved piece (kit.AgentGrader)
via a reverted spike step + `charly check feature run --agent claude`
against a live pod (real claude CLI spawned, probed the deployment, returned
a parsed PASS verdict).

Assisted-by: Claude (fully tested and validated)
…ps dedup

Repoints core call sites to the new sdk/kit homes for the 6 confirmed-
movable pure helpers (ParsePublishedPort, UnixToTCPBridge, CloseHostCleanups/
CollectHostRefs/SplitHostKey, MergeDeployDescriptions), deletes the now-
caller-less collectAnyStrings alias, and delegates candy/plugin-check's
reportSteps/failErrorFor to the new kit.ReportStepResults/
kit.ClassifyStepFailures (R3 dedup vs. charly core's own copy).

Also documents an ATTEMPTED-then-REVERTED move: nesting `charly box feature
run` under candy/plugin-box as a 7th CommandParent()=="box" word panics
RegisterBuiltinPluginUnit at process init — a real word collision with
candy/plugin-feature's existing top-level {command, feature} word in the
provider registry's flat provKey(class, word) namespace. Reverted in full
(byte-identical to pre-attempt); routed to P12b with two candidate fixes.

R10: build/vet/fmt/lint/test green on all four touched Go modules; fresh
binary content-marker-verified for all 8 new/relocated kit symbols; `charly
box validate` clean; `charly box feature run check-sidecar-pod` live parity
proof (14 passed/0 failed/3 skipped); `charly check run check-sidecar-pod`
PASS (12/12 steps, fresh-rebuild gate included). `charly check run
check-commands-local` FAILED on an RCA'd, non-blocking host-state issue
(system-binary staleness from concurrent multi-agent worktree churn during
this session, unrelated to this cutover's changed code paths) — detail in
CHANGELOG/2026.197.1305.md.

Assisted-by: Claude (fully tested and validated)
…to feat/p12a-check-fold

origin/main advanced with the tree-wide vmshared→spec envelope-route
repoint (task #16, ~278 files) and the openclaw dependency-pin fix (#112)
while this follow-up was in flight, neither having merged this cutover's
own P12a-proper commit yet. Hand-resolved 8 conflicts across 5 files where
this cutover's own relocations and the repoint touched the same lines,
plus 3 modify/delete conflicts on files already relocated to sdk/kit
(deletion wins in each case). Full gate re-run post-merge: build/vet/fmt/
lint/test green on all four touched modules; fresh binary content-marker
re-verified; charly box validate clean; charly box feature run
check-sidecar-pod live parity proof unchanged. Detail in
CHANGELOG/2026.197.1305.md.

Assisted-by: Claude (fully tested and validated)
The require directive was still pinned to the pre-P12a version; the
in-tree go.work replace directive made this cosmetic for local dev, but
out-of-tree consumers need it current. Bumped to the sdk tag PR #59's
merge produced.

Assisted-by: Claude (fully tested and validated)
…cause

Two exploratory attempts on this bed failed on a stale-system-binary
signature; root-caused (not a regression) and resolved with a correct
PATH=<worktree>/bin:\$PATH invocation while bin/charly stayed stable for
the run's duration — final attempt (2026.197.1528) PASSED, exit 0, all
6 steps + all 7 check-live checks, including the fresh-rebuild update
step. Supersedes the prior FAILED entry.

Assisted-by: Claude (fully tested and validated)
…'s PR#59 pin)

feat/p12a-check-fold's own sdk pin (775d8b8, a squash-pre-merge branch
commit for sdk PR #59) lagged behind sdk main: sdk PR #60 has since
merged (62958209, tag v0.2026197.1537). Verified content-sound via the
real squash-merge commit for PR #59 (94956cd, "feat(kit)!: P12a
check/ADE architecture fold") -- confirmed an ancestor of 62958209 via
`git merge-base --is-ancestor` -- so main's current sdk tip already
carries everything PR #59 delivered plus PR #60's follow-up.

Bumped the sdk gitlink to 62958209 and charly/go.mod's require to
v0.2026197.1537 to match (both verified against the sdk tag). Rebuilt
and re-tested against this bump before committing: task build:binary
clean (plugins_generated.go regenerated as a no-op, confirming no
drift), go test ./charly/... clean, golangci-lint 0 issues on charly +
candy/plugin-box + candy/plugin-check, ./bin/charly box validate exit
0, sdk standalone battery (go mod verify + go build + go test) all
green.

Assisted-by: Claude (analysed on a live system)
Fast-forward from this branch's prior pin (a11d933), verified via
`git merge-base --is-ancestor` before applying. The bumped range is
entirely documentation (two CHANGELOG entries + validator/skill .md
edits) -- no code.

Assisted-by: Claude (documentation reviewed)
…duplicate (P12a follow-up)

This wave-2 PR's own CHANGELOG claims charly/agent_config.go's
VersionResult/ParseAgentTimeout (+ test) were deleted as byte-identical,
zero-production-caller duplicates of candy/plugin-check/agent.go's own
copies. The claim was correct but the deletion never actually landed in the
shipped diff (confirmed both symbols and their test were still present,
untouched by any commit in this branch's history). Fixed: ports the test
coverage to candy/plugin-check/agent_test.go (mirroring the aliasNameRe
port pattern this same wave-2 cutover already used for
candy/plugin-box/validate_rules.go — R3, one shared abstraction, not two
that can drift), then deletes the dead duplicate from charly core.

Assisted-by: Claude (analysed on a live system)
…lidator findings

Fixes CHANGELOG/2026.197.1305.md's H1 to carry its CalVer prefix (matching
its sibling 2026.197.1139.md), and adds a new consolidated entry
documenting the fresh pr-validator's independent verification: the
agent_config.go dead-code-deletion gap found + fixed (including the
unexplained working-tree revert and how it was made durable), the
independent gitlink/gate/content-marker/R5 re-verification, and the
cross-PR sweep confirming an already-posted coordination comment on #130
covers the real checkvars.go/check_cmd.go overlap.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly Go code + sdk (kit/deploykit relocations) + candy/plugin-box + candy/plugin-check architecture-fold (wave-2 consolidated landing).

Checklist

# Item Verdict
0 Security & anti-tampering (T1-T4) PASS
1 Description completeness PASS — extensive per-member evidence, honest non-blocking findings
2 Change-class gate vs evidence PASS
3 Attribution tier vs proof PASS — fully tested and validated, re-verified after the validator's own fix
4 R0 skills honored PASS
5 R1 RCA on every failure PASS — including the validator's own RCA of an unexplained working-tree revert
6/7/9 R2/R3/R5 Gap found + fixed (see below)
8 R4 no ad-hoc workaround PASS
10 R6/R8/R9 artifact + binary integrity PASS
11 R10 disposable-only, fresh-rebuild, coverage PASS — confirmation bed cross-checked on disk
12 RDD/ADE/SDD N/A — no schema/CUE change
13 Concurrency mandate + anti-cheat N/A
14 Hard cutover — one atomic phase PASS
15 ARCHITECTURE GATE PASS — placement: CORRECT
16 Disposable-only autonomy PASS
17 Clean architecture + go gates PASS — independently re-run clean, including after the fix
18 CHANGELOG present PASS — finalized at 2026.197.1631

Validator-discovered gap (found, fixed, survived an environmental anomaly)

charly/agent_config.go still defined VersionResult/ParseAgentTimeout — byte-identical to candy/plugin-check/agent.go's copies, confirmed zero non-test callers anywhere in charly core — exactly matching this PR's own P14-rest-adjacent claim that these were deleted as dead duplicates. The deletion never actually shipped in the diff (git diff <pre-PR-base>...<head> -- charly/agent_config.go was empty), most likely lost across this branch's several merge operations (P12a↔P14 merge, two gitlink bumps, the external ZERO-ALIASES-hook catch-up merge).

Fixed: ported the test coverage to candy/plugin-check/agent_test.go (mirroring this same PR's own aliasNameRe port pattern used for candy/plugin-box/validate_rules.go — R3, one shared abstraction, never two that can drift), then deleted the dead duplicate from charly/agent_config.go and removed the now-obsolete charly/agent_config_test.go.

A genuine anomaly along the way: my first fix attempt was reverted by an unexplained working-tree change — the harness's own out-of-band file-modification notice fired, and git reflog showed no git-level operation in this worktree (ruling out a stray checkout/reset on my end). Rather than dismiss it, I re-applied the identical fix and committed + pushed it immediately — a durable git object survives whatever caused the revert; an uncommitted working-tree edit does not. Re-verified clean a second time after the commit landed and stayed.

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

  • Gitlink ancestry: sdk 62958209 (tag v0.2026197.1537) and plugins f6c1de8 both confirmed ancestors of their submodule's real origin/main.
  • Full gate: go vet/go test (charly 92s + candy/plugin-box + candy/plugin-check) + golangci-lint run (0 issues, 3 modules) + gofmt -l (clean) + the sdk standalone battery (tidy/verify/build/test all green) — all independently re-run, including after the fix.
  • task build:binary + charly box validate (exit 0); content-marker verification of all 15 claimed relocated/new sdk/kit symbols present in the built binary.
  • R5 sweep across every other claimed deletion (9 whole-file, 6 partial) — all genuinely absent; only the agent_config.go case had survived. All remaining name mentions are legitimate relocation-documentation comments.
  • Confirmation bed (check-sidecar-pod, PASS 12/12, 313s, run 2026.197.1550) cross-checked on disk in charly-wt-int2 — that worktree's HEAD is byte-identical to this PR's head, confirming genuine exercise of the validated tree.

Cross-PR sweep (comment-intake)

Zero comments/reviews on #133 itself. #118 holds by design. #130 (Codex-assisted, scope-excluded) has a real overlap (charly/checkvars.go, check_cmd.go, candy/plugin-check/harness_loop.go) — a teammate already posted a detailed, accurate coordination comment recommending #130 wait for this merge; independently confirmed correct, no duplicate needed.

Marker: ! kept

Matches the author's own title. Independently justified: this PR moves charly box labels's Kong nesting to a hidden top-level __box-labels reentry — the generic charly box labels --help output shape changes (now matches the already-moved pkg/inspect pattern), a real user-visible CLI-surface change even though functional behavior is byte-identical (per the PR's own before/after parity proof).

Decision

APPROVED. Every rule independently re-verified — including catching a real dead-code-deletion gap the author's own narrative claimed was done but wasn't, and working through a genuine environmental anomaly (an unexplained revert) by making the fix durable rather than just retrying blindly.

Assisted-by: Claude (fully tested and validated)

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