Repository navigation
Description
RCA — the #717 multi-tag advisory, its root cause, and the correct fix
1. What the advisory IS (mechanism, from source)
sdk/loaderkit/candy_version.go (PickCandyVersion) is the sole per-entity version arbiter.
It receives the candidate materializations of one BARE ref and emits the advisory only
when ≥2 candidates resolve to DIFFERENT git tags carrying DIFFERENT candy content:
Warning: candy <bare-ref> resolved to multiple git tags with differing content;
using newest <T1> (from <src1>), ignoring <T2> (from <src2>)
It is deliberately not a re-tag false-positive: identical content is silent
(candyContentsIdentical), and the winner is the newest CalVer tag. So every advisory in the
bed is a real cross-tag content divergence for one bare ref.
2. Why the candidates exist (the root cause)
loaderkit/refs_collect.go (CollectRemoteRefsOpts) is explicit:
"Collect EVERY distinct (repo, git-tag) a ref is referenced at. The git tag is only the
FETCH coordinate — per-entity-version arbitration happens AFTER fetch."
"Only the same bare ref at conflicting versions is an error."
The closure references github.com/opencharly/pod-dbus at three different explicit tags:
| referenced at | where (examples) |
|---|---|
v2026.243.1831 |
charly/box/{arch,cachyos}/…, distro-cachyos/box/… |
v2026.239.1555 |
distro-fedora/box/* (15 sites), distro-debian, distro-ubuntu, pod-kde-desktop |
v2026.235.2115 |
layer-kde-shell, layer-libnotify, pod-dbus's own older consumers |
bare (@github.com/opencharly/pod-dbus) |
charly/box/arch/charly.yml:1420 → newest = v2026.272.0105 |
Each becomes a candidate; the newest wins; the others are ignored → the advisory.
So the anomaly is the SOURCE, not the resolver: one bare ref is referenced at incoherent
tags across the closure. This is an authored-data defect (R1), not a resolver bug. The
resolver is behaving exactly as documented and designed.
3. Why the obvious tools fail (measured)
charly box reconcile (plugin-box/candy/plugin-box/reconcile.go) aligns pins per project:
"For a multi-repo tree, run it per repo (e.g.
charly -C box/<name> box reconcile)."
reconcileCandidateFiles walks only <dir>/charly.yml + <dir>/box/ + <dir>/candy/ — it
does not walk imported submodules. Hence:
- default (
reconcileTargetVersion(remote=false)): aligns to "the newest already-referenced
version" within the one project — on a distro tree that references onlyv2026.239.1555,
it is a no-op (already reconciled). --remote: aligns every pin to the newest remote tag — which re-points every leaf
pin, so those leaves' own closures then skew against the rest → the count EXPLODES
(measured:distro-fedora36 → 182 refs;distro-debian2 → 12).
There is no closure-wide mode. The skew is cross-repo, so no per-repo tool can converge it.
4. The correct fix
Author the closure to reference each bare ref at ONE coherent tag. A targeted source
alignment across all owners of pod-dbus (and the other distinct-content refs), to a single
justified target tag — NOT a blanket --remote, NOT a per-repo reconcile. This is an
authored-data correction: the same logical dependency must name the same version everywhere.
Secondary (architecture, tracked separately):
- Bare ref resolution diverges:
charly/box/arch/charly.yml:1420uses a BARE ref (resolves
to newest remotev2026.272.0105) while every other site pins explicitly — so the bare site
can never agree with the pinned ones. A bare ref and a pinned ref of the same repo are the
same dependency and must resolve coherently. - Two independent "latest tag" implementations:
refs.GitLatestTag(rawgit ls-remote,
used byreconcile --remote) vs the host's cachedgitClient().LatestTag(1h TTL,
disk-persisted) used for bare refs — same task, two code paths, different caching/freshness.
5. Non-band-aid acceptance
charly#733's assembled bed (check-commands-local) must reach errors: 0, warnings: 0
by SOURCE alignment. A waiver that accepts non-zero warnings does not satisfy this; neither
does suppressing the advisory in the resolver (that would hide a real divergence).
Activity
aitrawog commentedon Sep 29, 2026
STATUS
6. OPERATOR RULING (severity) — supersedes the "align the whole source" emphasis
If the dependency is resolvable, the multi-tag advisory is INFO, not WARNING.
The resolver PICKS a candidate (newest CalVer wins) and resolution SUCCEEDS — so nothing is
unresolved and no action is required. A
Warning:must therefore be reserved for a genuinelyunresolved/hard-conflict condition. Emitting a Warning for a success case is the defect: it
makes a resolvable closure fail the R10 zero-warnings gate.
Consequence for the fix (this is now the primary path, and it is NOT the ~105-ref wave):
sdk/loaderkit/candy_version.go: whenPickCandyVersionhas a deterministicwinner (a resolvable set), emit an INFO-level diagnostic; emit a WARNING only when
the set is NOT resolvable (no candidate / ambiguous / content undeterminable AND no winner).
charly#733passeserrors:0, warnings:0WITHOUT a source-alignment wave.
Source alignment (one coherent tag per bare ref) remains DESIRABLE hygiene — it removes the
info noise and makes the closure deterministic — but it is NOT the gate and is no longer the
critical path. The gate is the severity fix.
This is general, not
pod-dbus-specific: resolvable ⇒ INFO; unresolvable ⇒ WARNING.Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Sep 29, 2026
STATUS
7. OPERATOR RULING — the version rule, restated CLEARLY (this is the authoritative spec)
Two sentences:
Consequences (the whole rule in a table):
pod-dbusat different versionspod-dbusat different versionsWhy the bed is full of false warnings: the assembled closure contains MANY boxes (charly's boxes + every
distro-*namespace). They legitimately pinpod-dbusat different tags (v2026.243.1831in cachyos/arch boxes,v2026.239.1555in fedora boxes,v2026.235.2115in some layers). The resolver today keys candidates globally by bare ref, so those independent boxes look like one conflicting set → 1602 spurious warnings.The fix (two parts, both small):
This means the critical path is the SDK scoping+severity fix — NOT the ~105-ref source-alignment wave. Alignment is optional hygiene.
Refs:
sdk/loaderkit/candy_version.go(PickCandyVersion),sdk/loaderkit/refs_collect.go(CollectRemoteRefsOpts, the global bare-ref keying). Related: #736 (two latest-tag paths), #737 (no closure-mode reconcile; bare vs pinned).Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Sep 29, 2026
STATUS
8. Exact fix location (verified in
[email protected])loaderkit/scan_orchestrate.go::65—candidates := make(map[string][]spec.CandyCandidate) // bare ref -> all fetched materializations:124—candidates[ref] = append(candidates[ref], spec.CandyCandidate{…}):180-181—for ref, cands := range candidates { winner := PickCandyVersion(ref, cands, seams.Warn) }The defect in one line: the candidate set is keyed by bare ref ONLY, so it merges the
materializations from EVERY box in the assembled closure (charly's boxes + all
distro-*namespaces) into ONE set. Independent boxes that legitimately pin different versions then look
like one conflict → the ~1602 spurious warnings.
The fix:
(box, bareRef), or record thereferrer set per version).
candy_version.go(PickCandyVersion) /scan_orchestrate.go:181: only emit thediagnostic when ≥2 layers inside the SAME box reference different versions; cross-box
differences are silent. Winner stays the newest referenced.
This is an
sdkchange;charlythen bumps itssdkrequire and#733's bed re-runs toerrors:0, warnings:0. The ~105-ref source alignment is optional hygiene, NOT the gate.Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Sep 29, 2026
STATUS
9. DEEP RCA — the resolver resolves the whole PROJECT AT ONCE, not per box / per layer (CONFIRMED)
The operator's hypothesis is correct and is provable in the code: there is no per-box or per-layer resolution scope anywhere in the path.
Evidence ([email protected]):
loaderkit/refs_collect.go:336— the collect walk iteratescfg.AllBoxNames()and callscollectBoxfor EVERY box, plus everybase/builder edge (recursively into imported namespaces), plus every layer'srequire:/candy:, pluskind:localtemplates, plusadd_candy. All of it funnels through ONEaddRef.refs_collect.go:262—pairs := make(map[repoVer]map[string]bool) // (repo, git-tag) -> set of bare refs— one global map, keyed by(repo, tag), with no box/layer key.scan_orchestrate.go:65—candidates := make(map[string][]spec.CandyCandidate) // bare ref -> all fetched materializations— one global candidate set;:180-181arbitrates it in ONEPickCandyVersionpass.So the failure mode is structural: resolving the entire project (charly's boxes + every imported distro namespace) as ONE flat candy set makes boxes that are independent look like one conflicting box, and layers in different boxes look like layers in the same box. The arbitration is global because the SCOPE is global.
The correct architecture (matches the operator's model):
--remote/bare-ref territory — see Duplication: two 'newest tag' code paths (raw git ls-remote vs the 1h-cached git client) — unify on the cached one #736/Alignment gap: box reconcile is per-project only (no closure mode); --remote worsens skew; bare vs pinned refs of one repo can never converge #737).Consequence: the ~1602 warnings are the signature of a global resolve, not a data defect to be swept. Fixing the SCOPE (per-box) + the SEVERITY (INFO when resolvable) is the fix; the source-alignment wave is not.
This likely also explains the "over-collecting … pulled unrelated candies … spuriously rejected" note — the same global-scope root cause surfacing as a rejected set rather than an advisory.
Fix location: the collect walk (
refs_collect.gocollectBox/pairs) must produce per-box ref sets (or the arbitration must carry the box), andscan_orchestrate.gomust arbitrate per box — thencandy_version.goemits within-box only. This is thesdkarchitectural change;charlythen bumps and#733's bed re-runs.Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Sep 29, 2026
STATUS
FORMAL RCA (root-cause-analyzer 8-step) — consolidating §1–§9 above
Step 1 — STOP
Stopped the alignment work and both stale agents; no remediation attempted before analysis.
Step 2 — Document exactly what's wrong
Warning: candy … resolved to multiple git tags with differing contentlines in a single assembled bed, so R10's zero-warnings gate is unreachable (charly#733).Step 3 — Why
version:field had masked.Step 4 — Investigate (charly verbs + source)
Evidence in
[email protected]:loaderkit/refs_collect.go:336walkscfg.AllBoxNames()+all base/builder edges (recursing intodistro-*namespaces)+every layer require/candy+kind:local+add_candy through ONEaddRef→ ONEpairsmap (:262) → ONEcandidatesmap (scan_orchestrate.go:65) → ONEPickCandyVersionpass (:181). The resolver's own comment concedes the spuriousness ("… spuriously — rejected").Step 5 — Hypothesis
The ~1602 warnings are the SIGNATURE of a global (whole-project) resolve, not a data defect. Fixing the SCOPE (per box) + SEVERITY (INFO when resolvable) removes them; the alignment wave is unnecessary.
Step 6 — Test
The candidate map is provably global (
bare ref -> all fetched materializations, no box key); the collect walk provably visits every box. The operator's cross-boxpod-dbuspins (v2026.243.1831cachyos/arch,v2026.239.1555fedora,v2026.235.2115layers) are independent compositions yet appear in ONE advisory set. Confirmed.Step 7 — ROOT FIX (eradicate, not band-aid — R4/R5)
One unified, cleanly-architected version-resolution path:
(box, bareRef), never across boxes. Cross-box differences are silent.latest-tagimplementation (Duplication: two 'newest tag' code paths (raw git ls-remote vs the 1h-cached git client) — unify on the cached one #736), the per-project-onlyreconcile --remotenon-convergence (Alignment gap: box reconcile is per-project only (no closure mode); --remote worsens skew; bare vs pinned refs of one repo can never converge #737). One code path, one sink with levels.Forbidden (band-aids): per-repo
reconcile/--remote; suppressing the advisory; the ~105-ref alignment wave as the gate; a waiver.Step 8 — Verify completely
charly#733's assembleddisposable: truebed (check-commands-local) must reacherrors: 0, warnings: 0— fresh rebuild, from the final committed tree. That is the acceptance for the fix.Eradication scope (R3/R5): this is ONE core defect with a duplicated symptom path; the fix eradicates the global-scope resolution AND its duplicate latest-tag path in the SAME cutover — not a targeted patch.
Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Sep 29, 2026
STATUS
STATUS
DESIGN (posted before any edit) — per-box SCOPE + INFO/WARNING severity, the spike's measured result
Spike (RDD, measured — not assumed). Traced the caller chain end-to-end on the committed tree + the
predecessor worktree:
loaderkit/refs_collect.goCollectRemoteRefsOpts:pairs := make(map[repoVer]map[string]bool)keyed(repo, git-tag)— no box/layer key. The walk (cfg.AllBoxNames()->collectBox-> base/builder edgesrecursing into imported namespaces -> layer
require:/candy:->kind:local->add_candy) funnels throughONE
addRef.loaderkit/scan_orchestrate.go:candidates := make(map[string][]spec.CandyCandidate)keyed bare ref only;:181arbitrates it in ONEPickCandyVersionpass. Confirmed: the candidate set is global.map[string]spec.CandyReader(
ScanCandyFromLocal) consumed bydeploykit.ResolveCandyOrder(img.Candy, layers, ...), which looks uplayers[name]/layers[bareRef]. A per-box RESOLVED VERSION map would require threading a per-box mapthrough ~40
layers[...]sites (a large change). The authoritative ruling table (two boxes -> silent; one box-> newest referenced + INFO) is satisfied WITHOUT it, because the project-wide newest-referenced winner is >=
every box's own newest-referenced winner and a box never references the discarded lower tag directly. So the
correct scope fix is diagnostic scope + winner = newest referenced, not a per-box closure.
Architecture (ONE unified path, no side channel). A box is the SCOPE that owns a candy list. The ref
collector already walks per-box (
collectBox(c, name)); it labels each collected ref with the owning scope, thelabel travels with the fetch descriptor, and the arbiter reports only when >=2 references in one box disagree:
refs_collect.go: carry a scope label per bare ref —box=<qualified-name>for a box's candy list, andbox=<owning-box>for a layer'srequire:/candy:(resolved by the box's own candy closure, so"multiple layers inside ONE box" is exact);
deploy=<word>for add_candy.spec.RemoteDownload.RefReferrerscarries the labels to the post-fetch arbiter;spec.CandyCandidate.Referrerscarries them onto each candidate.
PickCandyVersion: winner stays the newest REFERENCED tag; emit a diagnostic ONLY when >=2 candidatesshare a scope label and their content differs; severity INFO (resolvable). WARNING only for a
genuinely unresolvable set (no candidate). Cross-box differences are SILENT.
spec.ScanSeams.WarnbecomesDiag func(level DiagLevel, format, args)(
DiagInfo/DiagWarning). plugin-build'sdiagWarnSink->diagSink(level ->spec.Diagnostic.Severity,the EXISTING
Diagnosticsenvelope — no parallel advisory API); build paths print "Notice:"/"Warning:" bylevel so a resolvable skew no longer trips the bed's severity scanner.
Cross-repo shape (the spike's second finding). The seam type (
spec.ScanSeams) and the carrier types(
CandyCandidate,RemoteDownload) are spec-native, so this is a THREE-repo cutover, smallest-correct first:spec(enabling types) ->sdk(the fix) ->plugin-build(consumer). Each is one PR; each merges+tagsbefore the next compiles against it. I bump nothing downstream (charly's pins + the umbrella gitlink are the
parent's).
Eradication (R3/R5, same cutover).
refs_collect.go's globalpairsmap without a scope is deleted inplace (no dead branch); the
Warnseam,diagWarnSinkandstderrWarnare DELETED (renamed to thelevel-carrying
Diag/diagSink/stderrDiag). The duplicate latest-tag path (#736,refs.GitLatestTagrawgit ls-remotevs the cachedgitClient().LatestTag) is a SEPARATE spec change; it does not gate this bed (barerefs now resolve to the default branch, #318), so it lands as its own spec PR rather than being smuggled in —
named here so it is not parked.
Forbidden, not done: no suppression, no per-repo
reconcile --remote, no source-alignment wave, no waiver,no dead transitional path.
Agent:
sdk-scope-fix· sessionses_f128e8b6fffeZqfMHeAOHnJluhAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
Agent:
sdk-scope-fix· sessionses_f128e8b6fffeZqfMHeAOHnJluhAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
feat(spec)!: per-box candy-version scope + leveled diagnostics (INFO …
aitrawog commentedon Sep 29, 2026
STATUS
STATUS — the
sdkleg is MERGED; landing it in charly exposed a prerequisite (now filed as #738).spec#186v0.2026272.1512sdk#324v0.2026272.1813(PASS; per-box scope + INFO/WARNING; live mechanism bed green)charlyThe prerequisite (filed as
opencharly/charly#738): bumping charly'ssdktov0.2026272.1813pulls insdk#288(v0.2026271.915, 'require ctx on the deploy-config family') — a breakingcontext.Context-first-parameter change todeploykit(ResolveBoxEngineForDeploy,ResolveSidecarContainer,RestartPodService).charly's 63 compiled-in plugin-candy modules pin pre-ctxtags; 9 fail to build (plugin-box,-build,-check,-cmd,-fleet,-pod,-preempt,-substrate,-vm).This is a prerequisite exposed by the fix, not a new defect:
#733's originalsdkbump (.1147, no ctx) never exercised it; the#717bump (.1813, with ctx) does.#738is the named owner; it is the same consumer-fan-out class ascharly#632.Unblock order: the 9 plugin candies adopt
ctx+ tag →charlybumpssdk/spec/the 9 plugin pins →#733's assembled bed re-runs toerrors:0, warnings:0→#714.The
#717root fix itself is COMPLETE and merged; only its consumption chain remains.Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
fix(plugin-build): adopt the #717 consumer change — leveled scan diag…
aitrawog commentedon Oct 7, 2026
RESOLVED — superseded: closing this RCA, because the work it asked for landed and what remains is owned by a later, still-open issue.
The remedy for this issue's authored-data defect merged as
opencharly/spec#186("per-box candy-version scope + leveled diagnostics (INFO vs WARNING)(#735)", merged 2026-09-29) andopencharly/sdk#324("scope candy-version arbitration + notice PER BOX, INFO not WARNING(#735)", merged 2026-09-29).The residue is not cured by those two, and that is exactly why this closes rather than claims success:
opencharly/charly#739("RCA: #717 is NOT fixed — 802 diagnostics (724 from a CONSTANT 'deploy=add_candy' scope label)", still open) shows the symptom survived the mechanism fix as a code bug, and it now owns the work. Closing here so the live finding has one home; if #739 lands and a further mechanism remains, reopen this thread rather than filing a third.Agent:
dsh-issue-triageAssisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)