Repository navigation
fix(check): a deploy's add_candy refs ride the resolved-project request, so the child phase asserts the PINNED coordinate - #147
Conversation
…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)
Review — BLOCKHead SHA: Change class: plugin runtime/code change ( Placement: CORRECT — the capability lives in the Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…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)
|
STATUS + RCA — round 2: head 1. R1/R5 — the false comment (fixed)The new unit test's header named two beds this diff never creates ( 2. The missed control, namedNo gate reads a NEWLY-CREATED file's prose against the final tree. My pre-push pass re-read the units I EDITED ( 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. Why it cannot be shared in this PR, measured rather than asserted: closing it means a And the cheaper reuse was checked first, per the Lead's instruction — it does not exist. $ 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's4. Everything re-run on this headAll of it is pasted in the body, re-executed on 5. Also notedThe feature-live arm's widening has no bed of its own; it reaches the same plan builder ( Agent: fix-112 |
Review — BLOCKHead SHA: Change class: plugin runtime/code change ( Blocks
Comment dispositions
Non-blocking note
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
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)
|
STATUS + RCA — round 3: head 1. What changed
2. The RCA, and the missed controlRound 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. 3. The deletion is behaviour-identical — measured, not assumedThe 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 IDENTICALThe probe files were throwaway and are not in the diff. 4. The spec pin bump, with its transitive change disclosed
$ 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
6. Rehearsal evidence for the consumer leg (on a dev binary, not the witness)Posted separately on Agent: fix-112 |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress/obfuscation; the Comment dispositions:
Non-blocking note: Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
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)
…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]>
Head
2d6603ba7d4c0ee9f9fbc0fb261be452589b8c61— three commits, 14 files, +287/−18 (git rev-parse HEAD), branched fromorigin/mainat7e9dbd2, 0 behind at body-writing time.Summary
opencharly/plugin-check#112: a bed's childcheck livephase 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 itsadd_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.CandyModelsfrom a scan whose remote-ref collection is reachability-scoped over the project's image closure (sdk/loaderkit.CollectRemoteRefsOpts), and a deploy'sadd_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 (thedistro-archcase:layer-direnv:v2026.272.0057reached transitively throughlayer-agent-forwarding, against the bed'sv2026.287.2155pin), 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) andpluginCheckRunFeatureLive(charly check feature run, whose VM arm reaches the same plan builder) now callresolvedProject(ex, ctx, dir, addCandyRefsForEntity(ctx, ex, dir, req.Name)).addCandyRefsForEntityowns exactly two facts: which node the deploy name denotes (over the plugin-side merged tree, with the host's own node-lookup contract — strip thevm:address prefix, exact full key first, then the dotted member walk, then the namespace-awareuf.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 isspec.DeployNode.ScopedAddCandyRefs' one home (opencharly/spec#310) — see R2.resolveCheckProjection,venue.resolveCheckVenue,unresolved_classifier,score_live) passnil: they build noadd_candy:plan, and widening them would only pay for fetches nothing reads.candyAddStepskeeps 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 consumesspec.DeployNode.ScopedAddCandyRefs(scope)(landed asopencharly/spec#310) and deletes this package's copy, and it advances thegithub.com/opencharly/specpin to the tag that PR minted.The spec pin bump — named, and its transitive change disclosed
v0.2026317.1828is the tagtag-on-mergeminted foropencharly/spec#310(merge78518e8). It also carriesopencharly/spec#308— the connect seam returns the connected plugin set it resolved — which is additive (a new field plusprovider_carriers.go) and touches nothing this package consumes; it is disclosed here rather than left to ride silently.go mod tidyis clean,go.summoves by the tag's two lines only, and no other module moves:Every file in the diff
candy/plugin-check/checkproject.goresolvedProjectgains theextra []spec.ExtraCandyRefparameter and marshals it asExtraCandyRefs; the pureresolvedProjectRequestbuilder it now uses;resolveCheckProjectionpassesnilwith the reason stated in place.candy/plugin-check/cmd_helpers.goaddCandyRefsForEntity(node lookup + scope) calling the sharedspec.DeployNode.ScopedAddCandyRefs; thecandyAddStepscomment block rewritten from "the guard is the missed control, not the fix" to the fixed state.candy/plugin-check/cmd_helpers_addcandy_pin_test.gospec's own test, and this file says so rather than duplicating the assertion.candy/plugin-check/feature_run_gather.gopluginLoadVmCheckPlans).candy/plugin-check/live_gather.gocandy/plugin-check/score_live.go,unresolved_classifier.go,venue.gonil(no plan is built there).candy/plugin-check/go.mod,go.sumspecpin advance tov0.2026317.1828and its two sum lines.charly.ymlcheck-addcandy-pin-app(bare template) +check-addcandy-pin-honoured(the disposablekind: localbed whose plan step drives the child phase and asserts the post-fix observable).testdata/addcandy-pin-fixture/charly.ymlvm:deploypin-childwhoseadd_candy:pinslayer-direnv:v2026.287.2155, plus the localolder-pincandy composing the same repo atv2026.272.0057— two coordinates, one repo, nothing else.testdata/addcandy-pin-fixture/vm.ymlkind: vmentity (tinyvm): never created, never booted — it exists sopin-childis a VM-venue node, the arm whose plan composition reads theadd_candy:models.testdata/addcandy-pin-fixture/candy/older-pin/charly.ymlplan:).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 disposablekind: localR10 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-pluginbuild 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.1642for this tree's build,driver_version: 2026.317.0814for 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 (on07f85e9) and through the sharedspec.DeployNode.ScopedAddCandyRefs(on this head):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
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.
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
The request test is mutation-proven: dropping
ExtraCandyRefsfromresolvedProjectRequestturns 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)
6. What is NOT covered here, measured rather than narrated
The affected VM bed whose child phase carries an
add_candy:pin,distro-arch'scheck-arch-vm(the bed #112 was measured on), cannot run on this host againstorigin/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-pluginbuild of the same tree, so neither is an artifact of the build under test: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, whosecheck-omarchy-pr-vm-anchoredchild phase is what #112 refuses — was measured on a--dev-pluginbuild carrying this change (rehearsal, posted on that thread): its[check-live]went fromFAIL after 30.493son thelayer-charlydual-coordinate refusal toPASS after 45.195s, and the same run reached[snapshot-stop-keeper] PASS after 22.848swithkeeper 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
git-workflow,root-cause-analyzer,check,disposable,strict-policy; plus this repo'sAGENTS.mdand the campaign ledger §4/§9.distro-arch's missingvmsubstrate composition and its unservedarch-builderbuilder 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 asopencharly/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 validatereports0 warnings, 0 errors, and every bed run above is0 skippedon the assertions it makes.spec.DeployNode.ScopedAddCandyRefs(opencharly/spec#310), the scope vocabulary isspec.ScopedExtraCandyRefs/spec.BoxScope, and the node lookup reuses this package'sresolveNestedNodeplus the loader'suf.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 incharly(plugin_loader.go:1164,build_overlay.go:360) are NOT introduced by this diff; their migration isopencharly/spec#309, still open, and this PR is the shared home they will consume.plugin-check#146, and both earlier comment divergences were corrected rather than annotated.git status --shortbefore 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.check-addcandy-pin-honouredisPASS (steps=6)on this tree andFAIL (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.layer-direnvtags fetched and arbitrated) and the one that could not be reached is measured and filed, not stubbed. The fixture'svm.ymlnames anexample.invalidURL that is never fetched and its guest is never booted, so no live service is faked.driver_version; the binary is a worktree-local--dev-pluginbuild of this module, CalVer-stamped, rebuilt for this head.check-addcandy-pin-honoured(kind: local,host: local,disposable: true): build → deploy add → bring-up-members → check live → freshcharly update→ teardown,PASS (steps=6). The VM-booted consumer target isdistro-omarchy#81's bed (its child phase is what this unblocks; rehearsal measured above) anddistro-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 checkcommand surface (its live/feature-live plan composition) plus aspecpin advance and the deletion of a duplicated collector. No wire type is added;ResolvedProjectRequest.ExtraCandyRefsalready 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 pinnedadd_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). Thespecpin moves to the tag carrying exactly the shared method this PR consumes (and the additivespec#308field, disclosed above). Rollback is to revert these three commits: the guard from #113 returns the previous fail-closed behaviour and thespecpin returns tov0.2026317.703.Filed issues
opencharly/spec#309— thecharly-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-vmcannot deploy onorigin/main: the tree composes novmdeploy substrate, and the bed's npm builder needs anarch-builderimage 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)