Skip to content

refactor(status,box): W0 — status_collector→plugin-substrate + box merge→plugin-box (metric 145→141, core −595 LOC) - #141

Merged
atrawog merged 9 commits into
mainfrom
feat/k6-status-collector-plugin-substrate
Jul 17, 2026
Merged

atrawog merged 9 commits into
mainfrom
feat/k6-status-collector-plugin-substrate

Conversation

@atrawog

@atrawog atrawog commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

W0 wave of the core-minimization program: two whole-file subsystem moves finishing the residue the merged status-completion cutover (87cce99) left UNTIL-K5. Both program axes drop — this is a genuine relocation, not an import-shim.

  • charly/status_collector.go + charly/status_substrate.go → deleted whole; logic → candy/plugin-substrate/status_flat.go (verb:status-fanout, sdk OpStatusCollectAll). The old registry fan-out dissolves into direct in-package calls (the 5 substrate words already live on this provider). charly/status_substrate_host.go reduced to a thin generic HostBuild forward (pure M-mechanism).
  • charly/merge.go → deleted whole; CLI → candy/plugin-box/merge_cmd.go (command:merge, CommandParent()=="box"), reaching verb:oci via Executor.InvokeProvider — the same F10 peer-dispatch candy/plugin-build's inline merge already uses (R3, no new seam). Box/registry/tag/merge settings via HostBuild("resolved-project").
  • charly/shell.go → thin delegate onto the new kit.ResolveShellImageRef (single source, R3); charly/oci_plugin.go dead invokeOciMerge/ociOpMerge half deleted (file stays — generate.go still consumes invokeOciInspectUser; its stale UNTIL-K3 note corrected to UNTIL-K1).
  • Consumer updates: engine.go, image.go; tests relocated to the candies (status_flat_test.go, merge_cmd_test.go).
  • Axis A (kit-import metric, charly/*.go non-test non-alias): 145 → 141. Axis B (core non-test LOC): 49,245 → 48,650 (−595, −3 files).

Change class

cross-repo (charly-or-sdk Go): sdk producer opencharly/sdk#68 merges+tags FIRST → this PR repoints its sdk gitlink to the merged SHA; the plugins gitlink repoints to plugins main (the skill-sync docs were consolidated OUT of this wave into the next plugins batch leg per the one-PR-per-wave-per-repo standing order — this PR's code does not depend on them).

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: charly check run check-commands-local (the bed exercising the moved command:merge + verb:status-fanout dispatch paths) + the Go gates, per the R10-gate-by-change-class matrix.
  • Eval beds run (exploratory, on-branch — recorded in CHANGELOG/2026.198.0510.md): check-commands-local | local | ok | 8/8 steps (incl. [status-runs] + [reap-orphans-runs]) on a fresh worktree built from origin/main + this change only. Manual smoke: charly status --json against the live 59-row fleet (pod/local/k8s) through the new fan-out — clean JSON.
  • AUTHORITATIVE final gate: re-run by the fresh pr-validator on the FINAL head (after the sdk-gitlink repoint) before merge — build + go test (charly, plugin-substrate, plugin-box) + lint + task cue:gen no-op + the bed above + both-axes re-measure. The validator pastes those outputs in its verdict comment.
  • Fresh rebuild: per-worktree task build:binary; validator re-verifies R9 on the final head.
  • Did the CHANGED code path execute live? Yes on-branch (bed 8/8 + live fleet smoke); re-executed on the final head by the validator.
  • Concurrency: N/A — no loader/ledger/store/arbiter path touched (status reads + a CLI verb move).
(on-branch exploratory run, CHANGELOG/2026.198.0510.md:)
charly check run check-commands-local — PASS, 8/8 plan-step checks
(incl. [status-runs] and [reap-orphans-runs]), fresh worktree from origin/main + this change.
charly status --json — live 59-row fleet through verb:status-fanout — clean, well-formed JSON.

R5 grep self-test: charly/merge.go, charly/status_collector.go, charly/status_substrate.go GONE;
remaining charly/ mentions are migration-doc comments naming destinations (no dangling code refs).
Axis A: 145 → 141.  Axis B: 49,245 → 48,650 non-test LOC.

Attribution tier

fully tested and validated — claimed at the tier the FINAL validator run supports; if the validator's re-gate on the repointed head cannot reproduce the bed pass, the PR does not merge.

Harness rulebook compliance — state HOW each is satisfied (or N/A — <reason>)

  • R0 skills: layer/image/plugin/check/git-workflow/strict-policy loaded (author + validator).
  • R1 RCA + zero warnings: the B2 blocker this PR surfaced (gitlinks pinning off-main producer commits) was RCA'd and fixed via the producer-first landing chain (sdk#68 first; plugins leg consolidated out). Gate outputs warning-free.
  • R2 no out-of-scope: the second stale mergeAfterBuild doc claim found during validation is plugins-repo content — it lands in the consolidated plugins batch leg (the immediate-next plugins cutover), not parked.
  • R3 no duplication: kit.ResolveShellImageRef single-sources the ref logic (plugin-box + shell.go); the merge path reuses the existing verb:oci peer-dispatch.
  • R4 no workaround: none; no ad-hoc engine commands.
  • R5 hard cutover + grep: moved files deleted whole; grep self-test pasted above; no transitional/dual-mode path in the final code; ZERO-ALIASES untouched (validator verified byte-identical).
  • R6 git safety: no destructive working-tree actions; no force-push (the repoint is an append commit).
  • R7 runtime gate: the bed run above (not just go test).
  • R8 artifact invariants: N/A — no Containerfile/label generation surface touched.
  • R9 binary == source + deps: per-worktree rebuild; no new runtime OS deps.
  • R10 disposable + coverage: bed is disposable: true; relocated tests (status_flat_test.go, merge_cmd_test.go) + the bed's [status-runs]/[reap-orphans-runs] steps FAIL without this change's wiring.
  • RDD / ADE / SDD: highest-risk unknown (fan-out parity through the plugin) proven live on-branch; ADE: plugin-substrate/plugin-box charly.yml plans intact (charly box validate green); SDD: OpStatusCollectAll rides the existing ops vocab, no new CUE shape.
  • Hard cutover: ONE atomic squash on charly main (fix commits + repoint fold in).
  • Kernel/plugin boundary law: core sheds R-items to their owning plugins; the surviving host file is a thin generic forward (M).
  • Disposable-only autonomy: all bed activity on disposable: true targets.
  • Clean architecture + Go gates: gofmt/lint/vet/test green on-branch; validator re-runs on the final head.
  • CHANGELOG: CHANGELOG/2026.198.0510.md + 2026.198.0538.md staged (placeholders; validator finalizes).

Assisted-by: Claude Code claude-fable-5 (fully tested and validated)

https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif

atrawog added 6 commits July 17, 2026 06:08
Deletes charly/status_collector.go + charly/status_substrate.go whole and
relocates the logic to candy/plugin-substrate/status_flat.go, reversing my
own earlier "stays core, registry-boundary blocker" verdict: the
providerRegistry fan-out dissolves entirely once the orchestration moves
into the plugin that already owns the per-word collectors (a direct
in-package call to statusCollect, not a wire round-trip), and every other
dependency was already sdk-portable via K4 #64 (kit.ExtractMetadata/
kit.ResolveBoxName/deploykit.QuadletDir/QuadletExistsInstance/
ServiceNameInstance/ResolveBoxEngineForDeploy), just not yet relocated.

charly/status_substrate_host.go is now a thin generic forward (resolve
verb:status-fanout, thread the reverse-channel executor, invoke, return the
reply) — no status business logic remains in core. candy/plugin-status is
unchanged; it still drives the same "status-substrate" HostBuild seam.

Assisted-by: Claude Sonnet 5 (fully tested and validated)
Assisted-by: Claude Sonnet 5 (fully tested and validated)
Assisted-by: Claude Sonnet 5 (documentation reviewed)
… sweep

A `git stash`/`stash pop` between staging and committing the K6 whole-file
move silently un-staged (without touching the filesystem) the git rm of
charly/status_collector.go/status_substrate.go and their test files — the
prior commit's tree still recorded them as present even though the working
tree (and every build/test run since) never had them. This commit corrects
the tree to match what was actually built and tested.

Also completes the claim-keyed R5 sweep the move triggered: several
plugin-status/plugin-substrate comments still named charly/status_collector.go
as a live file or NewCollector as a still-existing symbol (candy/plugin-status's
charly.yml + render.go + nested_tree.go; candy/plugin-substrate's
status_android_collect.go/status_collect.go/status_k8s.go/status_vm.go/
status_vm_test.go).

Assisted-by: Claude Sonnet 5 (fully tested and validated)
…r list

R5 miss caught in review: engine.go's MIGRATION INVENTORY comment still
listed the now-deleted charly/status_collector.go as a ResolveBoxEngine*/
ImageRuntime consumer. It left that consumer set at K6 — the status
subsystem now calls deploykit.ResolveBoxEngineForDeploy directly from
candy/plugin-substrate, not charly/engine.go.

Assisted-by: Claude Sonnet 5 (fully tested and validated)
charly/merge.go is deleted whole; its charly-box-merge CLI moves to
candy/plugin-box/merge_cmd.go as an eighth nested command:merge
capability, reaching verb:oci DIRECTLY over InvokeProvider (the same
F10 peer-dispatch leg candy/plugin-build's own inline merge already
uses). oci_plugin.go's now-dead invokeOciMerge/ociOpMerge half is
deleted; the file itself stays core (generate.go's adopt-user
resolution is a live K1-gated consumer). Bumps sdk (kit.ResolveShellImageRef)
and plugins (2 pre-existing stale skill-doc claims found + fixed)
gitlinks to their companion legs.

Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)
atrawog added 3 commits July 17, 2026 09:22
…ns → main 4a2ac8d

B2 producer-first landing: sdk#68 merged+tagged by the fresh validator; the
plugins docs leg was consolidated OUT of this wave (one PR per wave per repo —
its content rides the next plugins batch PR), so the plugins gitlink returns
to plugins main, on which this PR's code has no dependency.

Assisted-by: Claude Code Anthropic Claude Fable 5 (analysed on a live system)
Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
…over-removal fix)

sdk#69 restored the 4 deploy-seam wire types #66 over-removed (live on charly
main via plugin-bundle + the deploy-add/del host seams); this pin is the first
sdk main SHA consumable by this branch. Full binary (compiled-in candies incl.
plugin-bundle/plugin-box) builds clean against it — exit 0.

Assisted-by: Claude Code Anthropic Claude Fable 5 (analysed on a live system)
Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
Consolidate the two placeholder CHANGELOG narratives (K6 status_collector
move + P14 box-merge move) into one CHANGELOG/2026.198.0804.md — one squashed cutover,
one CalVer.

Assisted-by: Claude Opus 4.8 (fully tested and validated)
@atrawog
atrawog merged commit 1cb14a8 into main Jul 17, 2026
@atrawog
atrawog deleted the feat/k6-status-collector-plugin-substrate branch July 17, 2026 08:06
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