Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(aqua): render minisign asset templates with package asset#10462

Merged
jdx merged 1 commit into
jdx:mainfrom
risu729:codex-20260616-032343-ab17d4
Jun 15, 2026
Merged

fix(aqua): render minisign asset templates with package asset#10462
jdx merged 1 commit into
jdx:mainfrom
risu729:codex-20260616-032343-ab17d4

Conversation

@risu729

@risu729 risu729 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pass the selected package asset into aqua minisign asset template rendering
  • fix {{.Asset}}.minisig templates such as jedisct1/minisign 0.12
  • add a focused regression test for minisign asset rendering

Addresses #10450.

Tests

  • mise x cargo -- cargo test -p aqua-registry test_minisign_asset_template_uses_package_asset
  • mise run format (completed, including cargo check)

Summary by CodeRabbit

  • New Features

    • Minisign asset templates now support dynamic, context-aware variable expansion, enabling more flexible configuration of asset paths and naming conventions.
  • Bug Fixes

    • Improved minisign signature verification for GitHub releases by correctly resolving artifact identifiers using actual filenames, enhancing signature verification reliability.
  • Tests

    • Added comprehensive unit tests to validate minisign asset template variable expansion behavior.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5228a4f9-9ce0-400f-b400-7d14dc879109

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7ca0d and 999801d.

📒 Files selected for processing (2)
  • crates/aqua-registry/src/types.rs
  • src/backend/aqua.rs

📝 Walkthrough

Walkthrough

AquaMinisign gains a new asset(...) method that renders the configured minisign asset template by injecting the already-resolved package asset string into a {{.Asset}} context. The run_minisign_check call site for GithubRelease is updated to pass artifact_filename through to this method, and a unit test validates the template expansion.

Changes

Minisign Asset Template Resolution

Layer / File(s) Summary
AquaMinisign::asset() method and test
crates/aqua-registry/src/types.rs
Adds pub fn asset(&self, pkg, package_asset, v, os, arch) that sets Asset = package_asset in the template context and calls pkg.parse_aqua_str to render self.asset. A unit test asserts {{.Asset}} expands from the package's computed asset (e.g., foo.tar.gzfoo.tar.gz.minisig).
Call site update in run_minisign_check
src/backend/aqua.rs
For AquaMinisignType::GithubRelease, minisign_config.asset(...) now receives artifact_filename as the package_asset argument instead of only package+version+OS+arch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 A template with {{.Asset}} so neat,
The minisign file finds its name complete.
The artifact's filename joins the fray,
Rendering .minisig without delay.
Hop hop, the tests confirm it's right! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: enabling minisign asset template rendering with the resolved package asset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes aqua minisign asset template rendering by passing the selected package asset into the template context, enabling {{.Asset}} placeholders (e.g., jedisct1/minisign 0.12's {{.Asset}}.minisig) to resolve correctly.

  • AquaMinisign::asset() gains a package_asset: &str parameter and inserts it into the template context as "Asset", so {{.Asset}} templates in minisign asset paths expand to the actual downloaded artifact filename.
  • The call site in aqua.rs passes artifact_filename — already available in scope — as the new parameter.
  • A focused regression test validates that minisign-0.12-linux.tar.gz.minisig is produced when the package asset is minisign-0.12-linux.tar.gz.

Confidence Score: 5/5

Safe to merge — the change is minimal, targeted, and the new regression test covers the exact failure scenario from the linked discussion.

Both changed files are tightly scoped: one adds a parameter to a single function and populates the template context, the other updates the one call site. The artifact_filename passed at the call site is already in scope and represents exactly what {{.Asset}} is meant to expand to. The regression test confirms the before/after behavior. No existing callers are broken — there was only one call site — and the default empty context used elsewhere is unchanged.

No files require special attention.

Important Files Changed

Filename Overview
crates/aqua-registry/src/types.rs Adds package_asset parameter to AquaMinisign::asset(), injects it into the template context as "Asset", and adds a regression test for {{.Asset}}.minisig templates.
src/backend/aqua.rs Updates the single call site of minisign_config.asset() to pass artifact_filename as the new package_asset argument.

Reviews (1): Last reviewed commit: "fix(aqua): render minisign asset templat..." | Re-trigger Greptile

@risu729 risu729 marked this pull request as ready for review June 15, 2026 18:05
@jdx jdx merged commit d43a776 into jdx:main Jun 15, 2026
33 checks passed
@risu729 risu729 deleted the codex-20260616-032343-ab17d4 branch June 15, 2026 22:56
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