Skip to content

fix(build)!: inject the active init's depends_candy; delete the unreachable validator - #205

Merged
atrawog merged 3 commits into
mainfrom
feat/init-injection-super
Aug 4, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/init-injection-super

Conversation

@atrawog

@atrawog atrawog commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

fix(build)!: inject the active init's depends_candy; delete the unreachable validator

The superproject leg of the init-injection cutover. Declaring a service: in a
candy SELECTS an init system and assembles its config, but nothing installed the
selected init's own binary: a box composing only service candies validated
clean, built clean, baked ai.opencharly.init="supervisord" with a fully
assembled /etc/supervisord.conf, then failed at deploy [start] with no
supervisord in the image.

candy/plugin-build/resolve.go calls deploykit.InjectInitDependsCandy(cfg,
layers, initCfg) after the candy scan and BEFORE buildkit.ResolveAllBox. The
ordering is load-bearing: the pass writes the AUTHORED composition on cfg, the
one source both the resolved boxes and every cfg-walking chain collector derive
from, so the injected candy reaches the intermediate trie, the render order, the
Containerfile, the baked labels and the collected acceptance plan.

candy/plugin-box drops validateInitDependencies and its now-unreachable helpers
(R5). The guard could not catch the case that actually broke deploys — it waived
itself via a dual-init fallback for exactly the mixed use_packaged:/exec:
service shape the layer skill recommends, which is what candy/sshd is — and it
had zero test coverage, which is part of why the defect survived.

candy/plugin-docs/go.mod re-points the spec pin; GOWORK=off go build ./... (how
charly's loader builds an out-of-tree plugin) was failing, which breaks
task docs:sync and any bed whose plugin load reaches the generator.

WHY THIS IS ITS OWN BRANCH. These changes were developed on the gourmet-kitchen
integration branch alongside an unrelated documentation rebrand. That is two
cutovers on one branch, which must not share a PR. Splitting them also fixes a
land-order defect a validator caught: opencharly/marketplace#125 and
opencharly/docs#8 both document the injection, and the call site plus the
validator deletion live HERE — so until this merges, charly on main neither
injects nor has stopped policing, and those pages would describe behaviour the
tool does not have. This leg now lands before them.

R10: charly check run check-tutorial-shell PASS (steps=13), live 24/22 — its box
composes no supervisord candy and /etc/supervisord.conf still carries
[program:sshd]. charly check run check-migrate-local PASS (steps=6).

Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)

…chable validator

The superproject leg of the init-injection cutover. Declaring a service: in a
candy SELECTS an init system and assembles its config, but nothing installed the
selected init's own binary: a box composing only service candies validated
clean, built clean, baked ai.opencharly.init="supervisord" with a fully
assembled /etc/supervisord.conf, then failed at deploy [start] with no
supervisord in the image.

candy/plugin-build/resolve.go calls deploykit.InjectInitDependsCandy(cfg,
layers, initCfg) after the candy scan and BEFORE buildkit.ResolveAllBox. The
ordering is load-bearing: the pass writes the AUTHORED composition on cfg, the
one source both the resolved boxes and every cfg-walking chain collector derive
from, so the injected candy reaches the intermediate trie, the render order, the
Containerfile, the baked labels and the collected acceptance plan.

candy/plugin-box drops validateInitDependencies and its now-unreachable helpers
(R5). The guard could not catch the case that actually broke deploys — it waived
itself via a dual-init fallback for exactly the mixed use_packaged:/exec:
service shape the layer skill recommends, which is what candy/sshd is — and it
had zero test coverage, which is part of why the defect survived.

candy/plugin-docs/go.mod re-points the spec pin; GOWORK=off go build ./... (how
charly's loader builds an out-of-tree plugin) was failing, which breaks
task docs:sync and any bed whose plugin load reaches the generator.

WHY THIS IS ITS OWN BRANCH. These changes were developed on the gourmet-kitchen
integration branch alongside an unrelated documentation rebrand. That is two
cutovers on one branch, which must not share a PR. Splitting them also fixes a
land-order defect a validator caught: opencharly/marketplace#125 and
opencharly/docs#8 both document the injection, and the call site plus the
validator deletion live HERE — so until this merges, charly on main neither
injects nor has stopped policing, and those pages would describe behaviour the
tool does not have. This leg now lands before them.

R10: charly check run check-tutorial-shell PASS (steps=13), live 24/22 — its box
composes no supervisord candy and /etc/supervisord.conf still carries
[program:sshd]. charly check run check-migrate-local PASS (steps=6).

Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
@atrawog

atrawog commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

charly/pr-validator: CHANGES REQUESTED

Fresh independent evaluation. Everything was re-derived in a clean worktree checked out at 2946a2f5 with every submodule at this PR's committed gitlinks — not the main checkout, which carries four uncommitted gitlink bumps (spec, plugins, docs, pkg/arch) that are not part of this PR and would have silently coloured the result.

One blocking defect. The change itself is correct and its R10 evidence reproduces exactly.


BLOCKING — the spec gitlink is not bumped, so this merge creates the R5 stale reference the spec leg exists to prevent

  • This PR deletes validateInitDependencies.
  • Its committed spec gitlink is 04c2754b (v0.2026215.1748). At that commit, schema/resolvedproject.cue:191 and spec/cue_types_gen.go:2130 still name validateInitDependencies in present tense, as a live reader of #CandyView.capabilities.
  • The fix already exists upstream and is landed: spec 3257b306 (v0.2026215.2226), merged on spec origin/main and tagged. Its entire purpose is to drop that name ahead of this deletion, and its own CHANGELOG says so: "Producer-first ordering means this comment is transiently inaccurate against superproject main... That makes completing the chain load-bearing rather than optional."

This is not pre-existing debt routed to a batch. Before this PR, that comment was accurate — validateInitDependencies was live on main (confirmed: origin/main:candy/plugin-box/validate.go:244). This merge is what falsifies it, so R5's "same change" obligation attaches here.

It also contradicts the PR's own CHANGELOG line 75: "Consumer leg of a chain: spec → sdk (#119 + #120) → box/fedora (#11) → this." The sdk and box/fedora gitlinks were bumped; spec's was not. As committed, the spec leg is not consumed.

Proven both directions (per-submodule loop over . spec sdk plugins docs pkg/arch box/fedora, since git grep does not cross submodule boundaries):

spec gitlink R5 sweep for validateInitDependencies
04c2754b — as committed 2 live hits: spec/schema/resolvedproject.cue:191, spec/spec/cue_types_gen.go:2130
3257b306 — with the bump clean (CHANGELOG-only), charly + plugin-box + spec all build

Fix: one gitlink bump, spec → 3257b306. The content diff is a new CHANGELOG file plus two identical comment blocks — inert, so all R10 evidence below carries over unchanged and needs no re-run. (That bump is already sitting uncommitted in the main checkout's working tree.)


Verified and passing

R10 — my own runs (worktree-local binary 2026.216.0244, R9). Step counts read from .check/.../check-*.log, not exit codes:

charly check run check-tutorial-shell: PASS (steps=13)
  check-image           24 steps: 19 passed, 0 failed, 5 skipped
  check-live            24 steps: 22 passed, 0 failed, 2 skipped
  feature-run           24 steps: 22 passed, 0 failed, 2 skipped
  check-live-rebuild    24 steps: 22 passed, 0 failed, 2 skipped
  feature-run-rebuild   24 steps: 22 passed, 0 failed, 2 skipped

charly check run check-migrate-local: PASS (steps=6)

Zero warnings across every bed log. Both claimed figures match exactly, and the fresh-rebuild legs hold.

The discriminating evidence is positive, not merely a green exit. The box composes no supervisord candy, yet six steps carry the origin annotation [plan:candy:github.com/opencharly/charly/candy/supervisord:*] — among them the control-socket check. Per-origin breakdown of the live leg: ripgrep 4, sshd 6, supervisord 6. 24 − 6 = 18 — exactly the broken-state count, so the arithmetic itself shows what the change contributes. And tutorial-shell-service-wired-into-init PASSes: [program:sshd] present in the assembled config, a block neither composed candy produces alone.

Call placement (claim 2). Correct as now described: resolve.go:124 sits after step 3 (the candy scan that produces layers) and immediately before ResolveAllBox at line 125. The retracted "after ResolveAllBox" wording is gone; the entry now matches the shipped code.

R5 deletion, remaining symbols. checkInitSystemRequirements, collectInitSystemNeeds, checkDualInitFallback, candyHasInit → CHANGELOG-only across all submodules. initDefRequirementsMet has live hits in spec/spec/init_config_methods.go — checked, and it is an unrelated homonym (different package, different signature taking *AggregatedCandyCaps), not a missed deletion. boxPreserveUser is kept and genuinely read at validate_graph.go:150. The deletion orphaned nothing: CollectAllBoxCandies and InitHasRelayTemplate each retain several live sdk callers.

Whole-workspace gate. 61 in-workspace modules build (per-module — a root go build ./... is vacuous here, the root is not a module); all 28 out-of-work candies build under GOWORK=off, plugin-docs included. gofmt -l empty.

The go.mod change, proven in place both ways. Old pin v0.2026213.1726 → go: updates to go.mod needed; new pin builds. plugin-docs was the sole outlier — the other 87 candy modules already pin v0.2026215.1748.

Split cleanliness. No README / VISION / CLAUDE / AGENTS or rebrand content in the diff, and nothing the init cutover needs is missing. The retracted candy/plugin-pod/enc_cmd_test.go citation is gone.

Upstream gitlinks. sdk 2385334 = v0.2026216.128, on origin/main, contains bc183d13 (#119). box/fedora b5b8bf3 = v2026.216.0232, on origin/main. Both as stated.

Land-order premise confirmed. origin/main neither injects (InjectInitDependsCandy absent) nor has stopped policing (validateInitDependencies live at validate.go:244). This leg is a genuine prerequisite for plugins#125 and docs#8, not a follow-up.


Non-blocking

CHANGELOG line 70 claims go test green in "every candy module". Under concurrent load, candy/plugin-tmux's TestConcurrentTmuxRunsIsolateTypedPasteAndHighVolumeOutput fails; run in isolation it passes 3/3, so the claim was most likely honestly obtained and I am not treating it as fabricated. It is not caused by this PR (file untouched, and plugin-tmux imports neither deploykit nor loaderkit) and is already routed to the candy-hygiene batch. But the spec leg's entry discloses it and this one does not — worth matching that disclosure while you are touching the file.


Re-push with the spec gitlink bump and the status resets for a fresh round.

atrawog added 2 commits August 4, 2026 05:37
…d upstream

Round-1 review finding, blocking.

This PR deletes validateInitDependencies, but its committed spec gitlink was
04c2754b (v0.2026215.1748), where schema/resolvedproject.cue:191 and its
generated twin spec/cue_types_gen.go:2130 still name that symbol in present
tense as a live reader. The fix is already landed and tagged upstream at
3257b306 (v0.2026215.2226), and dropping the name ahead of this deletion is
precisely what that spec leg was for.

This is not batch-routable debt. Before this PR the comment was ACCURATE —
validateInitDependencies is live on origin/main at
candy/plugin-box/validate.go:244. This merge is what falsifies it, so R5's
same-change rule attaches to this commit rather than to a later sweep.

It also contradicted this PR's own CHANGELOG, which lists spec as a consumed
chain leg: sdk and box/fedora were bumped, spec was not.

Verified both directions with a per-submodule grep (git grep does not cross
submodule boundaries): at the old pin, 2 live hits; at 3257b306, the only
remaining hit is that repo's own CHANGELOG history. The content delta between
the two pins is a CHANGELOG file plus two identical comment blocks — inert, so
the R10 evidence carries over without a re-run.

Also tightened one non-blocking overclaim in the same entry. It said go test was
"green in every candy module"; candy/plugin-tmux's concurrency test passes in
isolation and fails under a loaded parallel run. The entry now discloses that
explicitly and states what the candy-hygiene batch actually owes: an RCA of the
INTERMITTENCY, since "it fails" and "it flakes" are different defects and R1
does not accept "flake" as a resting place.

Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
Generated by the fresh pr-validator at merge, per the one-stamp-for-both
invariant: this filename and the v2026.216.0358 tag on the merged HEAD share it.
@atrawog
atrawog merged commit 9631f64 into main Aug 4, 2026
@atrawog
atrawog deleted the feat/init-injection-super branch August 4, 2026 04:00
atrawog added a commit to opencharly/marketplace that referenced this pull request Aug 4, 2026
Round-2 review findings, all five mine.

CHANGELOG, wrong PR and wrong repo. The entry credited the validator deletion to
"the #119 plugins leg". opencharly/sdk#119 added the injection HELPER; the
deletion is opencharly/charly#205 (9631f646, v2026.216.0358), and
candy/plugin-box/ does not exist in sdk at all.

CHANGELOG land order omitted the leg that matters. It concluded "neither claim
describes a behaviour that is not yet true" from sdk#119 + #120 +
distro-fedora#11 — while both the injection call site and the deleted presence
check live in the SUPERPROJECT. Until #205 merged, charly neither injected nor
had stopped policing, so both rewritten pages described behaviour the tool did
not have. That is precisely the false state a validator caught in round 1; the
fix was to land #205 first, not to soften the pages. The entry now names all
five legs with their merges and tags.

Three sibling pages carried the same corrected claim and were never swept,
because the original sweep was keyed to literal strings rather than to the
claim:

  distros/skills/tutorial-shell "Drop either candy and the check fails" — a
  three-candy-model claim containing neither literal. supervisord can no longer
  be dropped (it is injected, not listed), and of the two composed candies only
  sshd's removal fails the check: with no service: declared, nothing selects an
  init, so no config is assembled to hold the block. distro-fedora#11 fixed this
  exact sentence in the box comment; the skill's mirror was missed.

  infrastructure/skills/supervisord — the Usage example LISTED supervisord in a
  box's candy: list, with a comment saying service: layers "need" it, directly
  above prose stating you rarely add it manually. The example now omits it, so
  the sample and the paragraph under it agree.

  image/skills/layer — a generic require: example used [python, supervisord].
  The example teaches require: mechanics and is not an init recommendation, but
  supervisord is now a hazardous name to demonstrate with, since composing the
  init by hand is the thing the injection makes wrong. Swapped for
  build-toolchain; the mechanism being taught is unchanged.

Also removed cutover narrative from core/skills/service — "the presence check
that used to enforce this is gone, it could not catch..." is history, and skills
state current behaviour in present tense. The standing rule was already in the
bullet's first half.

Re-swept claim-keyed over four claim families, newline-normalized, instrument
asserting what it read: 474 files enumerated, 474 read, 0 read failures. Zero
live hits outside CHANGELOG/ history.

Assisted-by: Claude Code Anthropic Claude Opus 5 (documentation reviewed)
atrawog added a commit that referenced this pull request Aug 18, 2026
opencharly/docs#70 landed. The gitlink moves to the merge commit rather than the PR's branch head,
which the squash makes unreachable — the same rule that applied to plugins#205 and #209, and the
one charly#301 exists for. Verified inside the submodule, because the superproject cannot answer
it: `git -C docs merge-base --is-ancestor e3e7508 origin/main` -> rc=0, where the same query run
from here returns 128 (objects absent, question unevaluated, and falsy under a bare `if`).

Both gates at this pin, every submodule at its gitlink:

    skills: no NEW drift. Carrying 24 known-stale artifact(s)
    docs:   no NEW drift. Carrying 63 known-stale artifact(s)

All four producer legs are now landed and pinned at merge commits:

    spec     9a586f5  v0.2026230.1417
    sdk      6b7a59f  v0.2026230.1550
    plugins  aa5bcfe  v2026.230.2142   (#205 then #209)
    docs     e3e7508                   (#70)

Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
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