Repository navigation
fix(deploykit): materializeBuildConfigAsset must search ALL remote cache roots - #171
Conversation
…ndalone candies The candy de-submodule cutover moved every candy to a root-level manifest in its own standalone repo (ref == repoPath, SubPathPrefix empty). For such a candy the SourceDir IS the repo@version cache root itself (e.g. .../[email protected]) — there is no candy subpath to strip. The old suffix-stripping (CutSuffix(SourceDir, subpath/name)) fails because the dir ends with the @Version suffix, so remoteBuildConfigCacheRoot returned "" and the supervisord init header (and any other remotely-referenced build-config asset) was never materialized into the build context. Every box composing a service candy then failed at 'COPY templates/supervisord.header.conf': no such file or directory (the buildah --jobs panic was a separate symptom masking this). Fix: when SubPathPrefix is empty, return SourceDir directly (it is the cache root). The subpath branch (old candy/<name> shape) is unchanged. Unit tests cover root-level, subpath, and non-remote cases.
…che roots The candy de-submodule cutover moved each candy to its own standalone repo, so remote candies no longer share ONE repo@version cache root — every candy lives in a different repo. remoteBuildConfigCacheRoot returned only the FIRST remote candy's root, so a build-config asset (e.g. the supervisord init header_file) referenced by a candy in a DIFFERENT repo was never found and the header COPY stayed as-authored — every service-candy box failed at 'COPY templates/supervisord.header.conf: no such file or directory'. Fix: remoteBuildConfigCacheRoots returns the DISTINCT roots across all remote candies (root-level standalone candies return SourceDir directly; subpath candies strip candy/<name>), and materializeBuildConfigAsset searches each root in turn for the asset before giving up. Unit tests cover root-level, subpath, multi-repo, and no-remote cases.
Review — BLOCKHead SHA: Change class: sdk mechanism code fix ( Blocks
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
… for GPG residual)
Review — PASSHead SHA: Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Checklist: All applicable rules PASS or NA. Prior BLOCK findings (head
Independent verification: diff matches the body's accounting (multi-root resolution + search-all-roots + 4 unit tests); unit tests directly execute the changed function; placement is CORRECT (deploykit kit, no alias files, no new core imports, no CUE/generated involvement); attribution tier Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: sdk mechanism code fix ( Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Blocks
Note: the prior PASS comment (head Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: sdk mechanism code fix ( Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Blocks
Prior BLOCK findings (head
Comment intake: comment 1 (head Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: sdk mechanism code fix ( Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Blocks
Note on prior comments: the BLOCK at head Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…passed; tier analysed-on-live)
Review — BLOCKHead SHA: Change class: sdk mechanism code fix ( Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Blocks
Note on prior comments: the BLOCKs at heads Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: sdk mechanism code fix ( Security screen: PASS — no scope mismatch (diff matches the description: multi-root resolution + search-all-roots + 4 unit tests), no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Blocks
Comment intake (all re-derived against the CURRENT head
Placement: CORRECT — the cache-root resolution fix lives in the deploykit kit; no alias files, no new core imports, no CUE/generated-file involvement. Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff matches description: multi-root resolution + search-all-roots + 4 unit tests), no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Checklist: All applicable rules PASS or NA. Prior BLOCK findings re-derived against the CURRENT state (head
Placement: CORRECT — cache-root resolution fix lives in the deploykit kit; no alias files, no new core imports, no CUE/generated-file involvement. Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff matches description: multi-root resolution + search-all-roots + 4 unit tests), no secrets/exfiltration, no weakened guardrails, no supply-chain changes; the Checklist: All applicable rules PASS or NA. Prior BLOCK findings re-derived against the CURRENT state (head
Independent verification: diff matches the body's accounting; the Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Summary
The candy de-submodule cutover moved each candy to its OWN standalone repo, so remote candies no longer share ONE
repo@versioncache root.remoteBuildConfigCacheRootreturned only the FIRST remote candy's root; a build-config asset (e.g. the supervisord initheader_file) referenced by a candy in a DIFFERENT repo was never found, so the header COPY stayed as-authored — every service-candy box failed atCOPY templates/supervisord.header.conf: no such file or directory.Fix:
remoteBuildConfigCacheRootsreturns the DISTINCT roots across all remote candies (root-level standalone candies returnSourceDirdirectly; subpath candies stripcandy/<name>), andmaterializeBuildConfigAssetsearches each root in turn for the asset before giving up.How tested
1. Unit tests (4 cases, ALL pass at the current head) — pasted output
_RootLevel: SourceDir =.../[email protected]→ returned as the cache root (was""before the fix)._Subpath: SourceDir =.../[email protected]/candy/layer-supervisord, SubPathPrefixcandy/→ returns.../[email protected](regression guard)._MultiRepo: two candies in two different repos → two distinct roots (the exact behavior this PR adds)._NoRemote: non-remote candy → empty (unchanged contract).2. Full deploykit package test (the package gate) — pasted output
3. The fix restores the header materialization path (live build, PASTED output)
Built with the fix (via a local-replace binary) and ran
charly box build arch-coderon the distro-arch sweep branch. The build now passes the previously-fatal supervisord header stage and enters the main 211-step stage:Before the fix the build died at
[61/62] STEP 2/6: COPY templates/supervisord.header.confwithno such file or directory; after the fix it advances past that stage into the main 211-step stage (reaching STEP 88). The residual stop at STEP 88 is the charly-arch package-repo install requiring the GPG signing key that this host lacks (pacman-key --lsign-key: no secret key) — owned by the named thematic batchfeat/box-build-race(the R10 KVM-bed venue inplan/candy_to_repo.md, which provisions the charly checkout + GPG secrets), unrelated to this deploykit change.Attribution tier:
analysed on a live system— the changedmaterializeBuildConfigAssetloop executed live (the build advanced past the previously-fatal header COPY), but the full arch-coder build could not complete in this environment due to the GPG key absence (routed to the named batch).Rulebook compliance
git-workflow+goskills loaded before the change.feat/box-build-race(section 3) — a named exit, not a parking phrase.remoteBuildConfigCacheRoots+ onematerializeBuildConfigAsset; the fix extends them.git statuschecked before commits; no force-push, no hook bypass, no direct main push; PR-only landing.go test ./deploykit/(full package) run and pasted (section 2) + the filtered-runtest output (section 1) +go build ./deploykit/clean.COPY templates/supervisord.header.confresolves and the build advances from STEP 61/62 into the main stage (STEP 88/211).Change classification
remoteBuildConfigCacheRootsmulti-root resolution +materializeBuildConfigAssetsearch-all-roots (+4 unit tests).go test ./deploykit/(full package) + the 4-case filtered run +go build ./deploykit/+ live build advancing past the previously-fatal header COPY (section 3).analysed on a live system— the changed materialize loop executed live (build advanced past the fatal header step); the full arch-coder build is blocked only by the GPG-signing-key absence routed tofeat/box-build-race.Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)