Skip to content

fix(check): a deploy's add_candy refs ride the resolved-project request, so the child phase asserts the PINNED coordinate - #147

Merged
github-actions[bot] merged 3 commits into
mainfrom
fix-112/addcandy-pin-coordinate
Nov 13, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
fix-112/addcandy-pin-coordinate

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Head 2d6603ba7d4c0ee9f9fbc0fb261be452589b8c61 — three commits, 14 files, +287/−18 (git rev-parse HEAD), branched from origin/main at 7e9dbd2, 0 behind at body-writing time.

Summary

opencharly/plugin-check#112: a bed's child check live phase composed its plan from a lookup keyed by the candy's bare repo ref, inside a resolution that never materialized the coordinate the deploy pinned — so a bed could advance its add_candy: pin, have it read and fetched correctly, and still not change what the phase asserted.

The mechanism, and why the fix is at the request rather than at the lookup: the resolved-project envelope fills rp.CandyModels from a scan whose remote-ref collection is reachability-scoped over the project's image closure (sdk/loaderkit.CollectRemoteRefsOpts), and a deploy's add_candy: refs sit outside that closure by construction. candy/plugin-build's own resolved-project cache-key comment states the consequence in its own words — ExtraCandyRefs "is the ONLY way a host-side plugin candy that no image closure reaches enters rp.Candies at all". Without the refs, the pinned coordinate is not a candidate, so the arbiter cannot pick it: rp.CandyModels[bare] carries whatever OTHER coordinate of that repo the closure reached (the distro-arch case: layer-direnv:v2026.272.0057 reached transitively through layer-agent-forwarding, against the bed's v2026.287.2155 pin), and since #113 the phase refuses naming both versions instead of asserting one.

This change threads the deploy's own refs into the request on the two arms that build an add_candy: plan:

  • pluginCheckRunLive (charly check live) and pluginCheckRunFeatureLive (charly check feature run, whose VM arm reaches the same plan builder) now call resolvedProject(ex, ctx, dir, addCandyRefsForEntity(ctx, ex, dir, req.Name)).
  • addCandyRefsForEntity owns exactly two facts: which node the deploy name denotes (over the plugin-side merged tree, with the host's own node-lookup contract — strip the vm: address prefix, exact full key first, then the dotted member walk, then the namespace-aware uf.ResolveBed) and which scope its refs take (spec.BoxScope(name), because a deploy IS its box; a constant label is the #739 false-conflict bug). The collection itself is spec.DeployNode.ScopedAddCandyRefs' one home (opencharly/spec#310) — see R2.
  • The envelopes that read the projection for vocabulary / classification / venue only (resolveCheckProjection, venue.resolveCheckVenue, unresolved_classifier, score_live) pass nil: they build no add_candy: plan, and widening them would only pay for fetches nothing reads.
  • candyAddSteps keeps its identity-keyed lookup (that is what the envelope offers) and its fail-loud guard, whose doc comment now states what is true after this change: the guard is the narrow arm for a pin the newest-tag arbiter cannot satisfy, not the missing fix.

Round 3 (head 2d6603b) is the R2 cure and nothing else: no duplicated traversal remains in this diff. It consumes spec.DeployNode.ScopedAddCandyRefs(scope) (landed as opencharly/spec#310) and deletes this package's copy, and it advances the github.com/opencharly/spec pin to the tag that PR minted.

The spec pin bump — named, and its transitive change disclosed

$ git diff -- candy/plugin-check/go.mod
-	github.com/opencharly/spec v0.2026317.703
+	github.com/opencharly/spec v0.2026317.1828

v0.2026317.1828 is the tag tag-on-merge minted for opencharly/spec#310 (merge 78518e8). It also carries opencharly/spec#308 — the connect seam returns the connected plugin set it resolved — which is additive (a new field plus provider_carriers.go) and touches nothing this package consumes; it is disclosed here rather than left to ride silently. go mod tidy is clean, go.sum moves by the tag's two lines only, and no other module moves:

$ cd candy/plugin-check && go mod tidy && git diff --stat -- go.mod go.sum
 candy/plugin-check/go.mod | 2 +-
 candy/plugin-check/go.sum | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Every file in the diff

path what it carries
candy/plugin-check/checkproject.go resolvedProject gains the extra []spec.ExtraCandyRef parameter and marshals it as ExtraCandyRefs; the pure resolvedProjectRequest builder it now uses; resolveCheckProjection passes nil with the reason stated in place.
candy/plugin-check/cmd_helpers.go addCandyRefsForEntity (node lookup + scope) calling the shared spec.DeployNode.ScopedAddCandyRefs; the candyAddSteps comment block rewritten from "the guard is the missed control, not the fix" to the fixed state.
candy/plugin-check/cmd_helpers_addcandy_pin_test.go the request test (with its negative control) — the collection half now lives in spec's own test, and this file says so rather than duplicating the assertion.
candy/plugin-check/feature_run_gather.go feature-live arm passes the deploy's refs (its VM arm builds through pluginLoadVmCheckPlans).
candy/plugin-check/live_gather.go live arm passes the deploy's refs — the defect's own surface.
candy/plugin-check/score_live.go, unresolved_classifier.go, venue.go call-site updates for the new parameter, nil (no plan is built there).
candy/plugin-check/go.mod, go.sum the spec pin advance to v0.2026317.1828 and its two sum lines.
charly.yml the new in-repo R10 witness: check-addcandy-pin-app (bare template) + check-addcandy-pin-honoured (the disposable kind: local bed whose plan step drives the child phase and asserts the post-fix observable).
testdata/addcandy-pin-fixture/charly.yml the fixture project: a vm: deploy pin-child whose add_candy: pins layer-direnv:v2026.287.2155, plus the local older-pin candy composing the same repo at v2026.272.0057 — two coordinates, one repo, nothing else.
testdata/addcandy-pin-fixture/vm.yml the fixture's only kind: vm entity (tinyvm): never created, never booted — it exists so pin-child is a VM-venue node, the arm whose plan composition reads the add_candy: models.
testdata/addcandy-pin-fixture/candy/older-pin/charly.yml the second coordinate (a composing candy with the ADE-mandatory plan:).

How tested

The change class is a plugin runtime/code change in opencharly/plugin-check. This repo declares no per-repo candy gate (AGENTS.md: the merge gate is the org validator); what it does declare is a disposable kind: local R10 witness, and this cutover adds the one that exercises the changed path — a bed that fails on the previous binary and passes on this tree — plus the repo's three existing in-repo beds as regression.

Every run below is on this head, with a worktree-local --dev-plugin build of this repo's module (the sanctioned dev shape, scripts/bootstrap-charly.sh --dev-plugin=plugin-check=<this worktree>); the run records name their driver (driver_version: 2026.317.1642 for this tree's build, driver_version: 2026.317.0814 for the previous binary).

1. The deletion is behaviour-identical — the A/B the round asked for

The same node — two add_candy: refs on the deploy, a third on an in-substrate member, and a fourth on a deploy-level sibling that must NOT appear — dumped through the deleted local collector (on 07f85e9) and through the shared spec.DeployNode.ScopedAddCandyRefs (on this head):

$ go test -run TestZZDumpRefs -v .        # throwaway probe, before (local scopedAddCandyRefs)
REF "@github.com/opencharly/layer-direnv:v2026.287.2155" SCOPE "box=check-arch-vm"
REF "local-candy" SCOPE "box=check-arch-vm"
REF "@github.com/opencharly/layer-charly:v2026.292.2352" SCOPE "box=check-arch-vm"

$ go test -run TestZZDumpRefs -v .        # the same probe, after (node.ScopedAddCandyRefs)
REF "@github.com/opencharly/layer-direnv:v2026.287.2155" SCOPE "box=check-arch-vm"
REF "local-candy" SCOPE "box=check-arch-vm"
REF "@github.com/opencharly/layer-charly:v2026.292.2352" SCOPE "box=check-arch-vm"

$ diff before.txt after.txt && echo "A/B IDENTICAL"
A/B IDENTICAL

The probe files were throwaway and are not in the diff. The shared method's own test (in opencharly/spec) is mutation-proven there: dropping the in-substrate recursion turns it red.

2. The witness bed PASSES on this tree, FAILS on the previous binary

$ charly check run check-addcandy-pin-honoured              # this tree
charly check run check-addcandy-pin-honoured: [cleanup-members] PASS after 0s
charly check run check-addcandy-pin-honoured: PASS (steps=6)
rc=0

$ charly check run check-addcandy-pin-honoured              # umbrella binary 2026.317.0814
charly check run check-addcandy-pin-honoured: FAIL (steps=5)
command "check": charly check run check-addcandy-pin-honoured: checks failed
rc=2

3. The defect itself, both binaries, on the fixture's own child command

The child phase composes its plan before the venue readiness gate, so the two states are distinguishable from the command's own stderr without booting a guest.

$ cd testdata/addcandy-pin-fixture && charly check live pin-child      # umbrella binary 2026.317.0814
charly: error: command "check": add_candy "@github.com/opencharly/layer-direnv:v2026.287.2155" names version "v2026.287.2155" but the resolved model for "github.com/opencharly/layer-direnv" is version "v2026.272.0057": a bare-keyed lookup cannot honour a pin when the same repo is pinned at two coordinates in one project, and this resolution carries the arbiter's winner, not the pinned version. Running it would assert a version this deploy never named (opencharly/plugin-check#112). Honour the pin (or drop the version and pin the project consistently) and retry
rc=1
$ cd testdata/addcandy-pin-fixture && charly check live pin-child      # this tree
charly: error: command "check": vm "pin-child" is not up / SSH-reachable — is the domain running? waiting for sshd on charly-pin-child:0: ssh-ready charly-pin-child:0: poll: fatal condition error: ssh: Could not resolve hostname charly-pin-child: Name or service not known
rc=1

The pinned coordinate is now a candidate and the arbiter resolves it, so the phase composes the pinned plan and the command proceeds to the gate. On the previous binary the same command can only refuse — the phase could never have asserted the version the deploy named.

4. Go gates

$ cd candy/plugin-check && go test ./... 2>&1 | tail -2
ok  	github.com/opencharly/plugin-check/candy/plugin-check	2.828s
?   	github.com/opencharly/plugin-check/candy/plugin-check/cmd/serve	[no test files]

$ cd candy/plugin-check && go vet ./... ; echo "vet rc=$?"
vet rc=0

$ cd candy/plugin-check && gofmt -l .
(no output)

The request test is mutation-proven: dropping ExtraCandyRefs from resolvedProjectRequest turns it RED (the negative control pins that the assertion is about the refs, not about a constant in the marshalled shape), and the restored tree is GREEN.

5. Structural gate and the repo's existing beds (regression)

$ charly box validate
charly box validate: OK — checked 1 candy, 7 deploys, 7 distros, 7 builders; 0 warnings, 0 errors
rc=0
$ for bed in check-dotted-local-resolve check-empty-resolution-witness check-skip-verdict-probe; do charly check run "$bed"; done
charly check run check-dotted-local-resolve: PASS (steps=6)
charly check run check-empty-resolution-witness: PASS (steps=8) — check-live-empty-plan-child: asserted nothing: no plan steps resolved for deployment check-empty-resolution-witness.empty-plan-child: this phase asserted nothing, so it is recorded as a SKIP and not as a pass (opencharly/plugin-check#110)
charly check run check-skip-verdict-probe: PASS (steps=6)
rc=0

6. What is NOT covered here, measured rather than narrated

The affected VM bed whose child phase carries an add_candy: pin, distro-arch's check-arch-vm (the bed #112 was measured on), cannot run on this host against origin/main, for two reasons that are that repo's and neither of them this change's — both reproduced identically with the stock umbrella binary and with a --dev-plugin build of the same tree, so neither is an artifact of the build under test:

$ charly check run check-arch-vm            # .check/check-arch-vm/2026.317.1751
[vm-build] PASS after 29s … [wait-ready] PASS after 62s
[deploy-add] FAIL after 9.989s
$ tail -1 .check/check-arch-vm/2026.317.1751/deploy-add.log
charly: error: command "deploy": the "vm" deploy substrate is not available in this project — its deploy plugin (plugin-deploy-vm) is not in the candy closure. Compose it, or add_candy: something that pulls it in. …
$ charly check run check-arch-vm            # .check/check-arch-vm/2026.317.1754, with the substrate composed in a scratch tree
[deploy-add] FAIL after 3m22.746s
$ tail -3 .check/check-arch-vm/2026.317.1754/deploy-add.log
Error: unable to copy from source docker://ghcr.io/opencharly/arch-builder:latest: reading manifest latest in ghcr.io/opencharly/arch-builder: manifest unknown
charly: error: command "deploy": deploy-dispatch add: deploy plugin: deploy-dispatch add: InvokeProvider deploy:vm op=execute: rpc error: code = Unknown desc = plugin-deploy-vm: walk step "Builder" (candy=pre-commit): InvokeProvider step:builder op=execute: venue npm builder (candy=pre-commit): BuilderRun: exit status 125

Both are filed as opencharly/distro-arch#70, with the measured cure for the first. The consumer whose bed IS the affected live target — opencharly/distro-omarchy#81, whose check-omarchy-pr-vm-anchored child phase is what #112 refuses — was measured on a --dev-plugin build carrying this change (rehearsal, posted on that thread): its [check-live] went from FAIL after 30.493s on the layer-charly dual-coordinate refusal to PASS after 45.195s, and the same run reached [snapshot-stop-keeper] PASS after 22.848s with keeper stop …: forced. That is rehearsal evidence on a dev binary; that PR's own R10 witness is owed from the released binary once the pin chain lands, and is not claimed here.

The feature-live arm has no bed of its own. feature_run_gather.go's widening is exercised through the same plan builder (pluginLoadVmCheckPlans) the live-arm witness drives, so it is covered by the same evidence and carries no separate witness — stated here rather than implied.

Rulebook compliance

  • R0 — loaded before the first action: git-workflow, root-cause-analyzer, check, disposable, strict-policy; plus this repo's AGENTS.md and the campaign ledger §4/§9.
  • R1 — two anomalies were RCA'd, neither fixed away: distro-arch's missing vm substrate composition and its unserved arch-builder builder image (filed, distro-arch#70), and the residual the newest-tag arbiter still cannot satisfy — a pin OLDER than another coordinate in the same closure — filed with its mechanism, blast radius and cross-repo root fix as opencharly/plugin-check#146. Round 1's false comment and round 2's R2 finding are both discharged in-tree (rounds 2 and 3), and each round's PR comment carries its RCA naming the missed control. No warning is left standing: charly box validate reports 0 warnings, 0 errors, and every bed run above is 0 skipped on the assertions it makes.
  • R2 — no duplicated traversal remains in this diff. The collection is spec.DeployNode.ScopedAddCandyRefs (opencharly/spec#310), the scope vocabulary is spec.ScopedExtraCandyRefs/spec.BoxScope, and the node lookup reuses this package's resolveNestedNode plus the loader's uf.ResolveBed. What this package keeps is the two facts the shared method cannot know (the node a deploy NAME denotes, and that its refs take the deploy's box scope). The two pre-existing copies in charly (plugin_loader.go:1164, build_overlay.go:360) are NOT introduced by this diff; their migration is opencharly/spec#309, still open, and this PR is the shared home they will consume.
  • R3 — no sleep, retry, fallback branch or magic number. The one degradation is deliberate and named: an unresolvable merged tree yields no widening, which is exactly the pre-change behaviour and is caught loudly by fix(add_candy): fail loudly when a pinned ref cannot be honoured, instead of running another version's plan #113's guard.
  • R4 — product before prose: the fix is in the engine; the only prose touched is the comment block that would otherwise still claim the guard is "the missed control, not the fix".
  • R5 — no legacy path to delete: this is an additive request field on an existing seam, plus the deletion of the copy round 2 identified. The stale claim ("Honour the pin … needs the per-coordinate models — see the issue") was corrected in the same commit, its remaining half is filed as plugin-check#146, and both earlier comment divergences were corrected rather than annotated.
  • R6 — git status --short before each staging listed only this change's paths (plus this repo's gitignored .check/ run records); no force-push, no amend after the first push, no bypass; Agent:/Assisted-by: on all three commits, in that order.
  • R7 — the gate fails without the change: check-addcandy-pin-honoured is PASS (steps=6) on this tree and FAIL (steps=5) on the previous binary, the request test is mutation-proven RED/GREEN, and the deletion is proven behaviour-identical by the pasted A/B. The changed path executed live in every run above.
  • R8 — no service boundary is mocked; the two real registry/fetch boundaries are exercised live (two released layer-direnv tags fetched and arbitrated) and the one that could not be reached is measured and filed, not stubbed. The fixture's vm.yml names an example.invalid URL that is never fetched and its guest is never booted, so no live service is faked.
  • R9 — every pasted run names its driver_version; the binary is a worktree-local --dev-plugin build of this module, CalVer-stamped, rebuilt for this head.
  • R10 — the disposable-target sequence ran end to end on check-addcandy-pin-honoured (kind: local, host: local, disposable: true): build → deploy add → bring-up-members → check live → fresh charly update → teardown, PASS (steps=6). The VM-booted consumer target is distro-omarchy#81's bed (its child phase is what this unblocks; rehearsal measured above) and distro-arch's bed is blocked on that repo's own manifest (subsection 6), both named rather than claimed.

Change classification

A behavioural fix in the externalized charly check command surface (its live/feature-live plan composition) plus a spec pin advance and the deletion of a duplicated collector. No wire type is added; ResolvedProjectRequest.ExtraCandyRefs already existed and is already part of the resolved-project cache key. Breaking change + rollback: none — no surface is removed or renamed; the only behaviour change is that a pinned add_candy: coordinate now enters the resolution and can win the arbiter, so a phase that silently asserted another coordinate's plan now asserts the pinned one (and a phase that refused now resolves). The spec pin moves to the tag carrying exactly the shared method this PR consumes (and the additive spec#308 field, disclosed above). Rollback is to revert these three commits: the guard from #113 returns the previous fail-closed behaviour and the spec pin returns to v0.2026317.703.

Filed issues

  • opencharly/spec#309 — the charly-side migration this PR's shared home enables: the two host sites (charly/plugin_loader.go:1164, charly/build_overlay.go:360) still collect the refs themselves. Open, with the close condition (no per-site traversal left beside the shared method).
  • opencharly/plugin-check#146 — the residual: a pin OLDER than another coordinate in the same closure still cannot be honoured (the arbiter is newest-tag and the envelope keeps one model per bare ref); needs per-coordinate models on the envelope (spec → sdk → charly → plugin-check).
  • opencharly/distro-arch#70 — check-arch-vm cannot deploy on origin/main: the tree composes no vm deploy substrate, and the bed's npm builder needs an arch-builder image nothing serves (both measured with the stock binary and with the dev build, so neither is this change's).

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

…st, so the child phase asserts the PINNED coordinate

The child `check live` phase composed its plan from `rp.CandyModels[deploykit.BareRef(ref)]`
— an identity-keyed lookup — in a resolution that never MATERIALIZED the coordinate the
deploy pinned: the envelope's candy scan is reachability-scoped over the project's IMAGE
closure, and a deploy's `add_candy:` refs sit outside it (candy/plugin-build's own cache-key
comment states the consequence: ExtraCandyRefs "is the ONLY way a host-side plugin candy that
no image closure reaches enters rp.Candies at all"). So the phase read whatever OTHER
coordinate of that repo the closure reached — an older tag transitively required by a composed
layer — and, since #113, refused naming the mismatch. A bed's pin could be read, fetched and
still not change what the phase asserted (#112).

The fix is at the request, where the mechanism lives: the live and feature-live arms now pass
the deploy's own `add_candy:` refs (scoped with spec.ScopedExtraCandyRefs/spec.BoxScope, the
same construction the host's deployNodePluginContext uses, and over the same plugin-side
merged-tree resolver) as `ResolvedProjectRequest.ExtraCandyRefs`, so the pinned coordinate
becomes a CANDIDATE, the arbiter resolves it, and `candyAddSteps` reads the pinned model.

Evidence: the new in-repo R10 bed `check-addcandy-pin-honoured` (a disposable kind:local bed
driving the child phase of testdata/addcandy-pin-fixture, which pins layer-direnv at the newer
of two coordinates that project references) PASSES on this tree and FAILS on the previous
binary; unit tests pin the request field and the collection rule, both mutation-proven.

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 8c82d7d04605e9b0f43403f3a1d37b520d1de72d (branch: fix-112/addcandy-pin-coordinate)

Change class: plugin runtime/code change (candy/plugin-check) + in-repo R10 witness bed and fixture.

Placement: CORRECT — the capability lives in the plugin-check candy, no core/sdk surface is grown, no alias file touched, no new charly/ import. (One duplication smell noted in Block 2.)

Blocks

  1. R1 / R5 — shipped comment names witness beds that do not exist. candy/plugin-check/cmd_helpers_addcandy_pin_test.go:6-7:

    // The LIVE half ... is the disposable bed at the repo root,
    // `check-addcandy-pin-advanced` / `check-addcandy-pin-stale`.
    

    No such beds exist anywhere in the diff. charly.yml adds check-addcandy-pin-app and check-addcandy-pin-honoured, and the fixture defines no others. The comment is a false claim left in the tree — an R1 comment-divergence-from-reality incident and an unswept outdated claim under R5. The comment also describes the behaviour wrongly ("a bed's advanced pin") — the witness does not advance a pin; it pins a fixed newer tag against an older transitive coordinate. Fix: correct the comment to name check-addcandy-pin-honoured and to describe the actual behaviour.

  2. R2 — a second implementation of the add_candy ref collection, and a false R2 claim in the body. candy/plugin-check/cmd_helpers.go (scopedAddCandyRefs, new visit recursion over InSubstrateMembers) re-implements the host's deployNodePluginContext ref collection that the body itself says lives in charly/plugin_loader.go. That is a second implementation of the same traversal. The body's R2 answer — "no second implementation … the only new mechanism is the request widening itself" — is therefore inaccurate: the diff adds a collection mechanism, not just a request field. Since the plugin cannot import core, the shared home is sdk. Fix: extract the ref-collection traversal into a shared sdk mechanism consumed by both the host and this plugin (preferred), or — if that is genuinely disproportionate — state the duplication and why it cannot be shared, and correct the R2 line so the body does not assert something the diff contradicts.

Non-blocking notes

  • Tool-limited R2/ARCH: I cannot inspect charly/plugin_loader.go from this diff, so the exact host shape is unverified; Block 2 rests on the body's own description of it plus the new traversal visible in the diff.
  • R10 evidence consistency: check-addcandy-pin-honoured PASS shows steps=6 while the pasted stdout lists 5 step lines (summary.yml shows deploy-add as a step, and the [vm-build] … line is elided), so the counts reconcile; the fail run steps=5 is consistent with a step after the failing check-live not running. The exit_status:1 + stderr contains "is not up / SSH-reachable" assertion genuinely fails on the old binary and passes on the new tree, so the witness is non-vacuous.
  • R10 coverage: the feature-live arm (feature_run_gather.go) is widened but is exercised only indirectly via the live-arm witness; no bed/test targets it specifically. Not blocking given the same-mechanism argument, but worth a line in the body.
  • Fixture vm.yml uses https://example.invalid/never-fetched.qcow2; never fetched and never booted, so no live-service boundary is faked (R8 OK).
  • Comments considered: none — the thread has 0 comments.

Verdict: BLOCK


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

View action run

…collector duplication

Round-1 review found the new unit test's header naming two beds that this diff never
creates (`check-addcandy-pin-advanced` / `-stale`): draft names, replaced by
`check-addcandy-pin-honoured` before the beds were authored and never re-read. The header
now names the real witness and describes what it actually does — the fixture pins
layer-direnv at the NEWER of the two coordinates the project references, so the phase must
compose the PINNED plan rather than refuse on the other one; it does not "advance a pin".

No behaviour change: comments only, in the file the finding named.

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS + RCA — round 2: head 07f85e91b309f244fa9082bae9f0ba4936c81131, one appended commit, both round-1 findings discharged.

1. R1/R5 — the false comment (fixed)

The new unit test's header named two beds this diff never creates (check-addcandy-pin-advanced / -stale): draft names, replaced by check-addcandy-pin-honoured before the beds were authored, and never re-read. It also described the witness wrongly ("a bed's advanced pin" — the fixture pins a fixed NEWER tag against an OLDER transitive coordinate; nothing advances). Both corrected in 07f85e9, and the header now names the real bed and what it actually proves.

2. The missed control, named

No gate reads a NEWLY-CREATED file's prose against the final tree. My pre-push pass re-read the units I EDITED (3b) and swept claims across the tree I had touched — but a brand-new file's header was written in the drafting phase, before the bed names settled, and nothing in the pass compares a new file's prose to the artifacts the same change introduces. The control added to my own checklist and to this round: every newly-created file's prose is read against the final tree, not against the draft. (The same class as the self-audit's class 1/6 — a claim the diff contradicts — but it entered through a file whose content had no earlier version to diff against.)

3. R2 — the duplication, stated rather than denied (the body's R2 line is corrected, not softened)

This diff adds a second copy of one traversal, and the body now says so. scopedAddCandyRefs (walk the node and its in-substrate members, tag each add_candy with the deploy's box scope) duplicates the ref-collection half of the host's deployNodePluginContext — charly/charly/plugin_loader.go:1164, and its overlay sibling charly/charly/build_overlay.go:360. The canonical home is spec (it owns DeployNode and the scope constructors spec.ScopedExtraCandyRefs/spec.BoxScope); the extraction plus the migration of those two host sites is filed as opencharly/spec#309 and is NOT in this diff.

Why it cannot be shared in this PR, measured rather than asserted: closing it means a spec leg plus a charly migration, and charly is another lane's live write scope in this campaign (the Lead's direction). Chaining it in front of this PR would put two cross-repo legs in front of opencharly/distro-omarchy#81, which sits at 3 BLOCK comments of a 5 threshold and whose producer this PR is.

And the cheaper reuse was checked first, per the Lead's instruction — it does not exist. ResolvedProject carries no extra-candy-refs field (go doc github.com/opencharly/spec/spec ResolvedProject | grep -ci extracandy → 0), spec.CheckLoadPluginsReply is empty by design, and ResolvedProjectRequest.ExtraCandyRefs is the only channel — a REQUEST field, so the caller must supply the input. There is nothing the plugin could read instead of collecting.

$ go doc github.com/opencharly/spec/spec ResolvedProject | grep -ci extracandy
0
$ go doc github.com/opencharly/spec/spec CheckLoadPluginsReply
type CheckLoadPluginsReply struct {
}
    #CheckLoadPluginsReply is empty on success — connect failures are
    best-effort WARNINGS on the host (mirroring resolveCheckRunnerContext's

4. Everything re-run on this head

All of it is pasted in the body, re-executed on 07f85e9 with a fresh --dev-plugin build of it (driver_version: 2026.317.1642, driver_size: 56666998): the witness bed PASS (steps=6) rc=0 against FAIL (steps=5) rc=2 on the previous binary (2026.317.0814), the fixture's child command in both directions, go test ./... / go vet / gofmt -l, charly box validate (0 warnings, 0 errors), and the three existing in-repo beds (PASS (steps=6), PASS (steps=8), PASS (steps=6)).

5. Also noted

The feature-live arm's widening has no bed of its own; it reaches the same plan builder (pluginLoadVmCheckPlans) the live-arm witness drives, and the body states that rather than implying a separate witness.

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 07f85e91b309f244fa9082bae9f0ba4936c81131 (branch: fix-112/addcandy-pin-coordinate)

Change class: plugin runtime/code change (candy/plugin-check) + in-repo R10 witness bed and fixture.

Blocks

  1. R2 — the duplicated add_candy ref-collection traversal is not cured in-tree, and filing it as spec#309 does not discharge a blocking R2 finding. The body itself admits it: "the diff adds a second copy of ONE traversal" — scopedAddCandyRefs (candy/plugin-check/cmd_helpers.go) reimplements the ref-collection half of the host's deployNodePluginContext. R2 is categorical — "A copy-pasted block that should have been shared BLOCKS" — and R1's "fix it or file it" permits filing only for a non-blocking, genuinely separable finding. This duplication is introduced by this PR's own new code, so it is not separable from the change; it must be shared (extract into spec/sdk and consume it) rather than deferred. The stated reason for deferring — "charly is another lane's live write scope … this PR is the producer leg of a consumer round at 3 BLOCK comments of a 5 threshold" — is a priority/urgency/coordination framing that HC forbids as a justification for narrowed scope. Fix: land the shared collection mechanism (spec/sdk) and have this PR consume it (removing scopedAddCandyRefs' duplicate traversal), or supply a genuinely disproportionate reason that is not a priority/urgency excuse.

Comment dispositions

  • Comment 6861036704 (@github-actions[bot], round-1 BLOCK): finding 1 (false comment naming non-existent beds) is stale-superseded — the current test header names check-addcandy-pin-honoured and describes the actual behaviour. Finding 2 (R2 duplication) is verified-blocking in modified form — the body now states the duplication but does not cure it in-tree; spec#309 is the "file it" path applied to a finding R2 marks blocking.
  • Comment 6861309141 (@aitrawog, round-2 STATUS+RCA): the RCA and fix for finding 1 are accepted. The R2 answer is unverified-dismissed — stating the duplication is necessary but not sufficient under R2, and the deferral reason ("another lane's write scope", "consumer at 3/5") is a forbidden priority framing.

Non-blocking note

  • R10 coverage: feature_run_gather.go's widening is a second call site of the same tested mechanism (addCandyRefsForEntity + resolvedProject) but has no witness of its own; passing nil there would regress feature-live with no failing test. The body states this explicitly; acceptable as the same-mechanism argument, but worth its own witness.

Verdict: BLOCK


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

View action run

github-actions Bot pushed a commit to opencharly/spec that referenced this pull request Nov 13, 2026
ScopedAddCandyRefs answers "which add_candy: refs does this deploy contribute, and at
what composition scope" ONCE, beside the member-tree accessors it walks and the scope
constructor it tags with. Three consumers need exactly this traversal and must agree on
it: the host's plugin-LOADING collection (charly/plugin_loader.go's
deployNodePluginContext), the pod-overlay build (charly/build_overlay.go's
overlayCandies), and the externalized check command's resolved-project widening
(opencharly/plugin-check#147's addCandyRefsForEntity). A plugin cannot import core, and
neither ResolvedProject nor CheckLoadPluginsReply carries the refs, so the shared home is
this module - otherwise each consumer hand-writes the same loop (#309).

The traversal boundary is the authored POSITION: an in-substrate member is part of its
parent's composition and shares its scope; a deploy-level member is its own composition and
is not visited. Scope is the caller's (normally BoxScope of the deploy name) - a constant
label is the charly#739 false-conflict bug.

No schema change: a hand-written method beside member_tree.go's accessors, with a unit
test that fails when the in-substrate recursion or the scope tag is dropped.

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

Co-authored-by: charly <[email protected]>
…ies no duplicate traversal

Round-2 review was right that a stated duplication is not a cured one: `scopedAddCandyRefs`
re-implemented the host's ref-collection half in NEW code this change introduced, which R2
marks blocking regardless of which repo the other copies live in.

`opencharly/spec#310` now owns that traversal - spec.DeployNode.ScopedAddCandyRefs(scope),
beside the member-tree accessors it walks and the scope constructors it tags with - so this
package deletes its copy and calls the shared one. The plugin's own two facts stay here: WHICH
node the deploy name denotes (over the plugin-side merged tree, with the host's node-lookup
contract) and which composition scope the refs take (spec.BoxScope(name)).

The spec pin advances to the tag spec#310 minted, v0.2026317.1828. That tag also carries
opencharly/spec#308 (the #1131 connect-seam wire field), which is additive and changes nothing
this package consumes; the bump is go.mod + two go.sum lines and `go mod tidy` is clean.

Behaviour is unchanged, and that is measured, not assumed: the deleted local collector and the
shared method were dumped over the same node (a node with two add_candy refs, an in-substrate
member carrying a third, and a deploy-level sibling carrying a fourth that must NOT appear) and
the two dumps are byte-identical; the witness bed and both directions of the fixture A/B are
re-run on this head.

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS + RCA — round 3: head 2d6603ba7d4c0ee9f9fbc0fb261be452589b8c61, one appended commit, the R2 duplication cured in-tree rather than argued about.

1. What changed

opencharly/spec#310 landed spec.DeployNode.ScopedAddCandyRefs(scope) — the traversal's one home, beside the member-tree accessors it walks and the scope constructors it tags with, with a mutation-proven unit test (dropping the in-substrate recursion turns it red). This round consumes it and deletes this package's copy, so this diff carries no duplicated traversal:

  • addCandyRefsForEntity now owns only the two facts the shared method cannot know: which node the deploy NAME denotes (over the plugin-side merged tree, with the host's node-lookup contract — vm: prefix stripped, exact key first, dotted member walk, then the namespace-aware uf.ResolveBed), and that its refs take spec.BoxScope(name).
  • The collection assertion moved out of this repo's test file with its subject: it lives in spec's own test now, and this file says so instead of re-asserting it (re-duplicating it in a test would have re-created exactly what the extraction removed).

2. The RCA, and the missed control

Round 2's finding was right: R2 is categorical for code a change introduces, and the correct move was to make the shared home exist rather than to argue about which repo owns it. My round-2 answer classified the duplication by where the other copies live (another lane's repo) instead of by who introduced this copy (me, in this diff). The missed control is exactly that asymmetry: the self-audit's R2 question must be asked of the diff alone — "does THIS change add a second implementation?" — never of the alternative's convenience. A deferral argument that references another team's scope is a priority framing, and the rulebook forbids it as a substitute for the fix; the fix here needed no other team at all, only the shared home to exist. opencharly/spec#309 (the charly-side migration) stays open for the two PRE-EXISTING copies, which are not this diff's.

3. The deletion is behaviour-identical — measured, not assumed

The same node (two refs on the deploy, a third on an in-substrate member, a fourth on a deploy-level sibling that must not appear) dumped through the deleted local collector and through the shared method:

$ go test -run TestZZDumpRefs -v .        # throwaway probe, before (local scopedAddCandyRefs @07f85e9)
REF "@github.com/opencharly/layer-direnv:v2026.287.2155" SCOPE "box=check-arch-vm"
REF "local-candy" SCOPE "box=check-arch-vm"
REF "@github.com/opencharly/layer-charly:v2026.292.2352" SCOPE "box=check-arch-vm"

$ go test -run TestZZDumpRefs -v .        # the same probe, after (node.ScopedAddCandyRefs @2d6603b)
REF "@github.com/opencharly/layer-direnv:v2026.287.2155" SCOPE "box=check-arch-vm"
REF "local-candy" SCOPE "box=check-arch-vm"
REF "@github.com/opencharly/layer-charly:v2026.292.2352" SCOPE "box=check-arch-vm"

$ diff before.txt after.txt && echo "A/B IDENTICAL"
A/B IDENTICAL

The probe files were throwaway and are not in the diff.

4. The spec pin bump, with its transitive change disclosed

github.com/opencharly/spec moves v0.2026317.703 → v0.2026317.1828 — the tag tag-on-merge minted for spec#310 (merge 78518e8). It also carries opencharly/spec#308 (the #1131 connect-seam wire field), which is additive and touches nothing this package consumes; disclosed rather than left to ride. go mod tidy is clean, go.sum changes by that tag's two lines and no other module moves.

$ cd candy/plugin-check && go mod tidy && git diff --stat -- go.mod go.sum
 candy/plugin-check/go.mod | 2 +-
 candy/plugin-check/go.sum | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

5. Everything re-run on this head

charly box validate → 0 warnings, 0 errors; the witness bed check-addcandy-pin-honoured → PASS (steps=6) rc=0 on this tree against FAIL (steps=5) rc=2 on the previous binary; the fixture's child command in both directions (the #112 refusal on the old binary, the venue gate on this one); go test ./..., go vet, gofmt -l clean; and the repo's three existing beds PASS (steps=6) / PASS (steps=8) / PASS (steps=6). All pasted in the body, all re-executed on 2d6603b.

6. Rehearsal evidence for the consumer leg (on a dev binary, not the witness)

Posted separately on opencharly/distro-omarchy#81: with a --dev-plugin build carrying this change, its fresh-lane bed check-omarchy-pr-vm-anchored went [check-live] FAIL after 30.493s (the layer-charly dual-coordinate refusal) → [check-live] PASS after 45.195s, and the run reached [snapshot-stop-keeper] PASS after 22.848s — keeper stop …: forced. That PR's R10 witness is still owed from the released binary once the pin chain lands.

Agent: fix-112
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 2d6603ba7d4c0ee9f9fbc0fb261be452589b8c61 (branch: fix-112/addcandy-pin-coordinate)

Security screen: PASS — no secrets/egress/obfuscation; the spec pin bump (v0.2026317.703 → v0.2026317.1828) is disclosed with its additive spec#308 rider; no guardrail/spec/rulebook change, so no maintainer sign-off is triggered.
Placement: CORRECT — capability stays in the plugin-check candy; the traversal now lives in spec (spec#310) and this diff consumes it; no core/sdk surface grown, no alias file, no new charly/ import.
Checklist: All applicable rules PASS or NA. The body's diff accounting reconciles exactly (+287/−18, all 14 files), the witness bed is a genuine fail-before/pass-after (FAIL steps=5 → PASS steps=6), and the unit test's negative control makes the assertion non-vacuous.

Comment dispositions:

  • 6861036704 (round-1 BLOCK): finding 1 (false comment naming non-existent beds) stale-superseded — current header names check-addcandy-pin-honoured and the real behaviour; finding 2 (R2 duplication) stale-superseded — cured by round 3.
  • 6861309141 (round-2 STATUS+RCA): stale-superseded/resolved — the duplication it defended is now deleted in favour of spec.DeployNode.ScopedAddCandyRefs.
  • 6861359957 (round-2 BLOCK): the R2 block is stale-superseded — scopedAddCandyRefs is gone from the diff and the shared method is consumed; its feature-live witness note remains verified-non-blocking.
  • 6861831901 (round-3 STATUS+RCA): verified-non-blocking — matches the current diff (pin bump, deletion, A/B, RCA naming the missed control).

Non-blocking note: feature_run_gather.go's widening has no dedicated witness; it is the same tested helper/plan-builder the live-arm witness drives, and the body states this explicitly rather than implying a separate bed.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 13, 2026 18:44
@github-actions
github-actions Bot merged commit 126c401 into main Nov 13, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 13, 2026
aitrawog pushed a commit to opencharly/charly that referenced this pull request Nov 13, 2026
Round-2 fix for a red `go` check on this PR (the CI job the body had not
examined): `tools/gomod-canonical`'s TestContractPinsMatchShared requires every
in-repo module that carries the contract pins to carry THE SAME ones as
charly/go.mod, and the spec bump this PR was forced into (.703 -> .1828 by
plugin-check's own go.mod, via MVS) left three of them at .703:

  tools/generate-packages/go.mod: requires spec v0.2026317.703, but the shared
  spec pin is v0.2026317.1828 - run `charly task mods-tidy`

`charly task mods-tidy` is that verb; it aligned the three modules and tidied
their sums. No other pin moved.

Refs opencharly/plugin-check#147

Agent: charly-plugins
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
github-actions Bot pushed a commit to opencharly/charly that referenced this pull request Nov 13, 2026
…ld add_candy fix) (#1133)

* chore(pins): adopt plugin-check v0.2026317.1844 (the materialized child add_candy fix)

opencharly/plugin-check#147 (MERGED as `126c4018f1e262668749dc29cd20f9d15565dd18`, tagged
`v2026.317.1844` and `candy/plugin-check/v0.2026317.1844`) fixes opencharly/plugin-check#112
at its root: a deploy's `add_candy` coordinates were never MATERIALIZED into the
resolved-project request, so a child `check live` phase built its plan from a bare-keyed
lookup and asserted whatever other coordinate the closure happened to reach. That is the
producer leg `opencharly/distro-omarchy#81` waits on.

`candy/plugin-check` is a COMPILED-IN plugin (`compiled_plugins:`), so adopting it is a
`go.mod` pin bump: plugin-check `v0.2026317.744` -> `v0.2026317.1844` (module tag
`candy/plugin-check/v0.2026317.1844`, from merge `126c4018f1e2`, repo tag `v2026.317.1844`).

ONE transitive move is forced and is not a choice: the adopted candy's own `go.mod`
requires `github.com/opencharly/spec v0.2026317.1828`, and Go's MVS takes the maximum, so
`spec` moves `.703 -> .1828`. Nothing else moves; `go mod tidy` on this tree changes
nothing further.

Agent: charly-plugins
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

* fix(tools): align the lockstep tools modules to the shared spec pin

Round-2 fix for a red `go` check on this PR (the CI job the body had not
examined): `tools/gomod-canonical`'s TestContractPinsMatchShared requires every
in-repo module that carries the contract pins to carry THE SAME ones as
charly/go.mod, and the spec bump this PR was forced into (.703 -> .1828 by
plugin-check's own go.mod, via MVS) left three of them at .703:

  tools/generate-packages/go.mod: requires spec v0.2026317.703, but the shared
  spec pin is v0.2026317.1828 - run `charly task mods-tidy`

`charly task mods-tidy` is that verb; it aligned the three modules and tidied
their sums. No other pin moved.

Refs opencharly/plugin-check#147

Agent: charly-plugins
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

---------

Co-authored-by: charly <[email protected]>
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