Skip to content

chore: pin the SPM checksum to wallet-bindings-v0.1.1 - #13

Closed
github-actions[bot] wants to merge 3 commits into
mainfrom
pin-spm-checksum-0.1.1
Closed

github-actions[bot] wants to merge 3 commits into
mainfrom
pin-spm-checksum-0.1.1

Conversation

@github-actions

Copy link
Copy Markdown

Attaches the released XCFramework checksum to the root Package.swift so SPM resolves the wallet-bindings-v0.1.1 artifact.

Checksum: 9049519c11ac14058420ce04cd1f5ce7b3f58cb0502e57013e88a21b0abd0f06

The GitHub release for this tag is published before this PR is opened.
Merge to activate.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Author

🔍 OpenCodeReview found 3 issue(s) in this PR.

  • ✅ Successfully posted inline: 1 comment(s)
  • 📋 Routed to summary by policy: 2 comment(s)

maintainability · low

📄 scripts/release/pin-order-gate.sh (L110-L110)

⚠️ GitHub could not post this as an inline comment: Routed to summary (severity low · category maintainability)

The sums entry is matched by substring anywhere on the line; the grep can match a filename appearing in an unrelated column (e.g. an entry whose hash is copied into another field) rather than the actual sums line, and it silently takes the first match's hash. Anchor the filename to the end of the line (sums format is ' ' with two spaces) so only the real manifest entry is compared.

💡 Suggested Change

Before:

published="$(printf '%s\n' "${sums}" | grep 'MintlayerWalletBindings.xcframework.zip' | awk '{print $1}' || true)"

After:

published="$(printf '%s\n' "${sums}" | grep -E '  MintlayerWalletBindings\.xcframework\.zip$' | awk 'NR==1{print $1}' || true)"

test · low

📄 scripts/release/test-open-spm-pr.sh (L93-L93)

⚠️ GitHub could not post this as an inline comment: Routed to summary (severity low · category test)

The stub dispatches between the metadata call and the sums fetch by checking "$2" = "-H", i.e. it is coupled to the exact argument ordering used in pin-order-gate.sh (gh api -H ... <url> vs gh api <url> --jq ...). If the gate ever reorders its flags, tests will silently exercise the wrong branch and pass for the wrong reason. A more robust discriminator would inspect all args (e.g. grep for 'octet-stream' or '.jq' in "$@") instead of a positional flag.

💡 Suggested Change

Before:

  if [ "$2" = "-H" ]; then

After:

  if printf '%s\n' "$@" | grep -q 'octet-stream'; then

Comment on lines +101 to +103
asset_url="$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${head_tag}" \
--jq '.assets[] | select(.name == "SHA256SUMS") | .url' 2>/dev/null)" \
|| asset_url=""

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The --jq filter '.assets[] | select(.name == "SHA256SUMS") | .url' emits one line per matching asset. If the release ever carries more than one SHA256SUMS asset, asset_url will be multi-line and the subsequent gh api ... "${asset_url}" receives a malformed multi-line URL argument, failing closed with the misleading "unreadable SHA256SUMS" diagnostic. Limit to a single match (e.g. 'first(...[]) | .name == "SHA256SUMS" | .url' or pipe through head -n1) and/or add an explicit multi-match guard.

Suggestion:

Suggested change
asset_url="$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${head_tag}" \
--jq '.assets[] | select(.name == "SHA256SUMS") | .url' 2>/dev/null)" \
|| asset_url=""
asset_url="$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${head_tag}" \
--jq 'first(.assets[] | select(.name == "SHA256SUMS") | .url)' 2>/dev/null)" \
|| asset_url=""

@nullPointerEnjoyer

Copy link
Copy Markdown
Collaborator

Rewriting the branch as a single signed commit — the bot-authored pin commit was unsigned and the main ruleset requires verified commits. Reopening right after.

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.

2 participants