Skip to content

fix(deploykit): ignore empty builder-backed base - #49

Merged
atrawog merged 2 commits into
mainfrom
feat/fix-empty-box-base-dependency
Jul 14, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/fix-empty-box-base-dependency

Conversation

@atrawog

@atrawog atrawog commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Fix the SDK box dependency graph so valid builder-backed images without a
base: do not create a phantom empty dependency and a false empty cycle.

  • Append an internal base edge only when Base is non-empty.
  • Cover the real from: builder:pacstrap shape through direct dependencies,
    order, and build levels.
  • Prove genuine cycles still return a non-empty CycleError.
  • Record the correction in the changelog.

Change class

Cross-repo SDK Go producer. Landing order: opencharly/sdk first, then the SDK
gitlink bump and full composing OpenClaw R10 bed on opencharly/charly#112.

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

  • The gate for this change class: SDK producer tests and static gates here;
    the consumer integration gate is charly -C box/cachyos box validate followed
    by full charly -C box/cachyos check run check-openclaw-pod after this PR is
    tagged and consumed by charly#112, per the producer→consumer landing rule.
  • Eval beds run: N/A on the producer branch because the superproject can
    consume only a merged immutable SDK tag. The consumer PR owns the full bed.
  • Fresh rebuild: go test ./... rebuilt every SDK package from this head.
  • Did the changed code path execute live? Yes in regression tests: both
    ResolveBoxOrder and ResolveBoxLevels execute the no-base builder-backed
    path that failed CachyOS validation.
  • Concurrency: N/A; this changes a pure local dependency-graph transform.
$ go test ./deploykit/...
ok github.com/opencharly/sdk/deploykit 0.003s

$ go test ./...
ok github.com/opencharly/sdk
ok github.com/opencharly/sdk/deploykit
ok github.com/opencharly/sdk/enginekit
ok github.com/opencharly/sdk/kit
ok github.com/opencharly/sdk/loaderkit
ok github.com/opencharly/sdk/schemaconcat
ok github.com/opencharly/sdk/spec
ok github.com/opencharly/sdk/vmshared

$ go vet ./...
# exit 0, no output

$ git diff --check
# exit 0, no output

Attribution tier

fully tested and validated for the SDK producer gate. The consuming
superproject remains blocked from landing until its full disposable R10 bed
passes against this SDK's immutable merged tag.

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

  • R0 skills: Loaded plugin, Go, install-plan, strict-policy, check, agents,
    and git-workflow guidance before implementation and landing.
  • R1 RCA + zero warnings: The empty-cycle failure received a complete RCA;
    tests and static gates finish with zero warnings.
  • R2 no out-of-scope: The blocking SDK mechanism and both graph consumers are
    fixed here; consumer integration remains in the already-open charly#112 chain.
  • R3 no duplication: The one shared BoxDirectDeps helper fixes order,
    levels, and filtering callers.
  • R4 no workaround: The invalid edge is removed at its source; no retry,
    bypass, fallback, or timing change.
  • R5 hard cutover + grep: No identifier or compatibility path is introduced
    or retired; the false empty-base behavior is removed outright.
  • R6 git safety: New branch from current SDK main; no destructive Git action,
    amend, force-push, or direct-main push.
  • R7 runtime gate: Producer unit gate is complete; the full consumer runtime
    gate is explicitly required on charly#112 after immutable SDK landing.
  • R8 artifact invariants: N/A; no Containerfile or OCI label generation.
  • R9 binary == source + deps: N/A for the SDK module; no runtime dependency.
  • R10 disposable + coverage: Regression coverage fails on the old edge; the
    consumer disposable bed is the next mandatory cross-repo gate.
  • RDD / ADE / SDD: RCA used the real CachyOS composition witness. No candy or
    schema change, so ADE and SDD are N/A.
  • Hard cutover: One SDK cutover with no legacy mode, TODO, or deferred SDK fix.
  • Kernel/plugin boundary law: Generic box graph mechanism in sdk/deploykit;
    no concrete-kind branch or capability added.
  • Disposable-only autonomy: N/A; this producer PR destroys no target.
  • Clean architecture + Go gates: One predicate in the shared helper;
    gofmt, go test ./..., go vet ./..., and git diff --check pass.
  • CHANGELOG: CHANGELOG/2026.195.0745.md is staged as the placeholder for
    validator merge-time finalization.

Assisted-by: Codex OpenAI GPT-5.6 Sol (fully tested and validated)

Assisted-by: Codex OpenAI GPT-5.6 Sol (fully tested and validated)
@atrawog

atrawog commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: Cross-repo SDK Go producer; immutable SDK merge/tag precedes the consumer disposable integration bed on opencharly/charly#112.

  • Security and scope: PASS — protected-main policy used; no manipulation, exfiltration, dependency/pin change, weakened gate, or scope mismatch.
  • Description and attribution: PASS — all changed files and the producer→consumer landing order are documented; commit and PR carry the exact model-aware attribution.
  • Implementation: PASS — the shared BoxDirectDeps predicate excludes only an absent internal base, preserves BootstrapBuilderImage, and retains non-empty CycleError reporting for real cycles.
  • Architecture: PASS — generic graph behavior remains correctly placed in SDK deploykit; no concrete-kind, schema, wire, dependency, alias, or compatibility surface is added.
  • Independent producer gates: PASS — go test -count=1 ./..., go test -race -count=1 ./deploykit/..., go vet ./..., golangci-lint run ./... (0 issues), gofmt, golangci-lint fmt --diff, git diff --check, and checksum-pinned task cue:gen all pass on exact head 3225d00719b11dfb8ecb9c94d1973b6e94092525; generation is a clean no-op.
  • R0–R10 and pillars: PASS for the SDK producer leg — no warnings, workaround, duplication, legacy path, shared-state concurrency risk, or generated-artifact drift. The real disposable consumer integration bed is explicitly not waived and remains the next mandatory gate on charly#112 against the immutable merged SDK tag.
  • CHANGELOG: PASS — placeholder and structured Markdown are valid and ready for validator merge-time filename/H1 finalization.

Decision: PASS. Finalize the merge-time CalVer, revalidate the changed head, squash-merge, and create the immutable SDK tag.

Assisted-by: Codex OpenAI GPT-5.6 Sol (fully tested and validated)

Assisted-by: Codex OpenAI GPT-5.6 Sol (fully tested and validated)
@atrawog
atrawog merged commit 64d4a0c into main Jul 14, 2026
@atrawog
atrawog deleted the feat/fix-empty-box-base-dependency branch July 14, 2026 18:35
github-actions Bot pushed a commit that referenced this pull request Sep 22, 2026
…er (#270)

* fix(loaderkit): the per-host deploy overlay is not a config-stack layer

The layered config stack (system → user → in-dir) raw-merged the per-host
deploy overlay (~/.config/charly/charly.yml, spec.DefaultDeployConfigPath)
as a PROJECT document layer. That overlay is a DeployConfig — per-host
runtime state, not an authored project — and raw-merging it injects its
deploy entries into the authored deploy map BEFORE FoldMembers runs.

A member-bearing check bed declares its members NESTED under the bed root,
while the overlay persists each deploy-level member FLATTENED to a top-level
key (MarshalDeployNode unwraps the member tree to siblings, so a member's own
`charly config` can address it by name). Raw-merging put both copies into the
deploy map, and FoldMembers then hard-failed:

  peer name "preempt-holder" (declared under deploy "check-preempt-live-pod")
  collides with an existing deploy/bed/peer entry

seen live on every member-bearing bed (check-preempt-live-pod, check-cross-pod-cdp,
both FAIL steps=1) and reproducible deterministically from the merged bytes alone.

The overlay has ALWAYS been applied the correct way: a per-field MERGE onto the
loaded project tree (deploykit.MergeDeployConfigs / deploy.MergeDeployNode, driven
by loaderkit.ResolveMergedTreeViaExecutor and deploykit.MergedDeployTree), whose
lookup recurses into a node's Member tree, so it can never create a stray top-level
key. That merge remains the overlay's ONE application (R3). This stack is projects
only: system (/etc/charly/charly.yml, the packaged fallback project) + in-dir.

Regression window: the beds were green at distro-fedora #49 (charly 2026.250.0215)
the same day sdk #230 landed the stack; the fold's collision guard predates both.

R10 (live, charly rebuilt against this sdk):
- check-preempt-live-pod: PASS (steps=22) (was FAIL steps=1)
- check-cross-pod-cdp:    PASS (steps=19) (was FAIL steps=1)

Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* docs: re-freeze the PR body against the final head

* docs: re-freeze the PR body against the final head

---------

Co-authored-by: Andreas Trawoeger <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Nov 23, 2026
…ds where the image expects it (#627)

* fix(builder): pin HOME and PIXI_HOME in the pixi stage so the env lands where the image expects it

pixi installs its environment under $PIXI_HOME (default $HOME/.pixi), not the project

directory, and the emitted stage set only USER + WORKDIR — HOME comes from the BASE image's

passwd for that uid. When a rebuilt base moved uid 1000's home, the env landed outside the

box's home and the final stage's COPY --from=<stage> <home> <home> carried no .pixi:

every image check reading <home>/.pixi/envs/default/bin/python went red (measured on

opencharly/pod-comfyui#49's composed bed, filed as opencharly/pod-comfyui#51).

The template now sets ENV HOME/PIXI_HOME explicitly — the same fix class npmStageTemplate

already carries for NPM_CONFIG_PREFIX — and both RUN arms assert the env root exists,

so a wrong home fails the BUILD instead of a runtime check.

Consumer chain: plugin-builder-pixi bumps its sdk dependency, the umbrella advances the

plugin pin, then pod-comfyui#48/#49 and the consumer pin bump can land.

*Agent: `image-lane-vram` · Claude Code session `739c9baf-e4cc-465c-9028-0a77b9ea7617`*

*Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)*

* test(kit): assert the pixi stage pins HOME/PIXI_HOME and fails without it

Coverage the review asked for: the emitted stage must carry ENV HOME=<home>

PIXI_HOME=<home>/.pixi and test -d <home>/.pixi for every input home (three homes in the

table). Measured: the test PASSES with the fix and FAILS with the ENV line removed — the

control can fail.

*Agent: `image-lane-vram` · Claude Code session `739c9baf-e4cc-465c-9028-0a77b9ea7617`*

*Assisted-by: Claude Code deepseek-v4.1-flash:cloud (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