fix(publish): multi-pass pack cap honors dependency chain depth - #40
Merged
monsieurleberre merged 1 commit intoJul 25, 2026
Merged
Conversation
The Splice/Finance DAR multi-pass packer capped retries at a hardcoded 5 passes. Families pack in alphabetical order against a local feed, so a deep dependency (splice-wallet-payments) can pack after its dependents in the same pass; the loop-while-progress recovers on the next pass, but 0.6.13 deepened the chain enough that 30/33 packed and the 6th pass needed to resolve splice-amulet-name-service / splice-dso-governance / splice-wallet was cut off by the cap (NU1102: Found 0 versions in local-feed). Tie the cap to the family count (families + 1). The progress==0 guard remains the real terminator (monotonic status, no infinite loop), so this can never be too few for any chain depth and never loops longer than necessary.
Contributor
Contributor
C# coverage
|
Contributor
C# build matrix
|
Contributor
Scala build matrix
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Splice/Finance DAR multi-pass packer (
build-pack.sh) capped retries at a hardcoded 5 passes. Families pack in alphabetical order against an incrementally-populated local feed, so a deep dependency can pack after its dependents within the same pass; the loop-while-progress design recovers on the next pass.Splice 0.6.13 deepened the dependency chain (
Amulet → Wallet.Payments → Amulet.Name.Service → {Dso.Governance, Wallet}) enough that the release run packed 30/33 and then hit the cap one pass too early:splice-wallet-paymentspacked dead last (05:11:43), after its three dependents were already attempted (NU1102: Unable to find package Splice.Wallet.Payments … Found 0 versions in local-feed).progress=1, so the loop wanted a 6th pass that would have resolved all three — butpass > 5fired first.30 packed, 0 skipped, 3 failed→ exit 1 → Splice0.4.1-preview.1never shipped.Failed run: https://github.com/peacefulstudio/daml-codegen-csharp/actions/runs/30144841949
Fix
Tie the cap to the family count instead of a magic
5:max_passes=$(( ${#families[@]} + 1 ))Why it's correct and safe:
progress -eq 0remains the real terminator.progressonly stays1while a new family reachesok/skip(status is monotonic), so the loop resolves ≥1 dependency level per pass and cannot infinite-loop regardless of the cap.#familiesdependency levels, so#families + 1can never be too few for any chain depth — and the loop still exits as soon as no progress is possible, so deeper caps cost nothing on shallow chains.No behavior change for any source whose chain already resolved within 5 passes.