Skip to content

fix(backend): detect .artifactbundle.zip files in asset selection#7657

Merged
jdx merged 1 commit intojdx:mainfrom
swizzlr:fix/artifactbundle-zip-detection
Jan 13, 2026
Merged

fix(backend): detect .artifactbundle.zip files in asset selection#7657
jdx merged 1 commit intojdx:mainfrom
swizzlr:fix/artifactbundle-zip-detection

Conversation

@swizzlr
Copy link
Contributor

@swizzlr swizzlr commented Jan 13, 2026

Reproduction repo: https://github.com/swizzlr/mise-sourcery-repro


Commit 4f5c805 changed the artifact bundle detection from asset.contains(".artifactbundle") to asset.ends_with(".artifactbundle").

This broke detection of compressed artifact bundles like sourcery-2.2.7.artifactbundle.zip because they end with .zip, not .artifactbundle. As a result, tools like Sourcery that provide both tool.zip and tool.artifactbundle.zip now incorrectly selected the artifact bundle, which has different internal structure (extra nesting) that breaks path configurations like exe=bin/sourcery.

The fix adds an additional check for .artifactbundle. to catch compressed variants (.artifactbundle.zip, .artifactbundle.tar.gz, etc.) while preserving the original check for plain .artifactbundle files.

Also adds comprehensive tests for artifact bundle penalty scoring.


Note

Updates asset scoring to avoid selecting artifact bundles that have incompatible structure.

  • In AssetPicker::score_build_penalties, add check for ".artifactbundle." alongside ends_with(".artifactbundle") to penalize compressed bundles
  • Add test_artifactbundle_penalty covering .artifactbundle.zip and plain .artifactbundle, including score assertions

Written by Cursor Bugbot for commit 5289e5c. This will update automatically on new commits. Configure here.

Commit 4f5c805 changed the artifact bundle detection from
`asset.contains(".artifactbundle")` to `asset.ends_with(".artifactbundle")`.

This broke detection of compressed artifact bundles like
`sourcery-2.2.7.artifactbundle.zip` because they end with `.zip`, not
`.artifactbundle`. As a result, tools like Sourcery that provide both
`tool.zip` and `tool.artifactbundle.zip` now incorrectly selected the
artifact bundle, which has different internal structure (extra nesting)
that breaks path configurations like `exe=bin/sourcery`.

The fix adds an additional check for `.artifactbundle.` to catch
compressed variants (.artifactbundle.zip, .artifactbundle.tar.gz, etc.)
while preserving the original check for plain .artifactbundle files.

Also adds comprehensive tests for artifact bundle penalty scoring.

Co-Authored-By: Claude <noreply@anthropic.com>
@jdx
Copy link
Owner

jdx commented Jan 13, 2026

Bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

@jdx jdx merged commit ea78cf4 into jdx:main Jan 13, 2026
37 checks passed
@risu729
Copy link
Contributor

risu729 commented Jan 13, 2026

Sorry, that was my mistake. Thanks for fixing!

1 similar comment
@risu729
Copy link
Contributor

risu729 commented Jan 13, 2026

Sorry, that was my mistake. Thanks for fixing!

@swizzlr
Copy link
Contributor Author

swizzlr commented Jan 14, 2026

@risu729 no worries, it's a weird edge case for sure! Test will cover this in future.

@swizzlr swizzlr deleted the fix/artifactbundle-zip-detection branch January 14, 2026 20:38
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.

3 participants