Skip to content

fix(update): use .tar.gz for Windows assets in gnu-vs-android test - #7528

Merged
Audacity88 merged 1 commit into
zeroclaw-labs:masterfrom
chengzhichao-xydt:fix/7509-windows-test-asset-format
Jun 13, 2026
Merged

fix(update): use .tar.gz for Windows assets in gnu-vs-android test#7528
Audacity88 merged 1 commit into
zeroclaw-labs:masterfrom
chengzhichao-xydt:fix/7509-windows-test-asset-format

Conversation

@chengzhichao-xydt

@chengzhichao-xydt chengzhichao-xydt commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

find_asset_url_picks_correct_gnu_over_android hardcoded .zip assets for Windows targets, but is_installable_release_asset only accepts .tar.gz / .tgz. On a Windows host the test panics with "should find an asset" because no qualifying asset matches the host triple.

Fix

Use .tar.gz for all platform entries so the test is host-triple independent — its purpose is to assert the URL picks gnu over android, not to validate the asset format filter.

Validation Evidence

cargo fmt --all -- --check
# (no output — formatting is clean)

cargo test --lib find_asset_url
# All 6 tests pass, including find_asset_url_picks_correct_gnu_over_android

cargo test
# all tests passing — CI green (Quality Gate)
  • Beyond CI — what did you manually verify?
    • Confirmed the test's actual invariant (gnu-vs-android target priority) is preserved and independent of archive format
    • The format filter is tested separately by ignores_non_installable_assets
  • If any command was intentionally skipped, why: None

Security & Privacy Impact

  • New permissions, capabilities, or file system access scope? No
  • New external network calls? No
  • Secrets / tokens / credentials handling changed? No
  • PII, real identities, or personal data in diff, tests, fixtures, or docs? No
  • If any Yes, describe the risk and mitigation: N/A

Compatibility

  • Backward compatible? Yes — test-only change, no production code touched
  • Config / env / CLI surface changed? No
  • If No or Yes to either: exact upgrade steps for existing users: N/A

Rollback

Low-risk PR: git revert <sha> is the plan.

Fixes #7509

The test find_asset_url_picks_correct_gnu_over_android hardcoded
.zip assets for Windows targets, but is_installable_release_asset
only accepts .tar.gz / .tgz. On a Windows host the test panics
with 'should find an asset' because no qualifying asset matches
the host triple.

Use .tar.gz for all platform entries so the test is host-triple
independent — its purpose is to assert the URL picks gnu over
android, not to validate the asset format filter.

Fixes zeroclaw-labs#7509

@WareWolf-MoonWall WareWolf-MoonWall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR Review — #7528 fix(update): use .tar.gz for Windows assets in gnu-vs-android test

Reviewer: WareWolf-MoonWall
PR: #7528 — fix(update): use .tar.gz for Windows assets in gnu-vs-android test (+2/-2, src/commands/update.rs tests only)
Round: 1 (first review)
Prior blocks: none
CI: passing
Verdict: approve


Summary

Changes two fixture entries in find_asset_url_picks_correct_gnu_over_android from zeroclaw-x86_64-pc-windows-msvc.zip / zeroclaw-aarch64-pc-windows-msvc.zip to .tar.gz. Fixes #7509 (test panic on Windows host because .zip was not accepted by is_installable_release_asset). Test-only diff; no production code touched.


Findings

🟢 Test-only, host-agnostic fix

The purpose of find_asset_url_picks_correct_gnu_over_android is to assert that GNU triples are preferred over Android triples for the same architecture. That invariant is entirely independent of asset format. Using .tar.gz fixtures separates the two concerns cleanly and lets the test pass on any host triple without masking a real format-filter gap — the gap is addressed in the complementary #7530.

🟡 PR template incomplete

The Security & Privacy Impact and Compatibility sections are absent. Answers are trivially No/Yes for a test-only change; please fill them in before merge.

🔵 Relationship to #7530

#7530 is also open and adds runtime .zip support to is_installable_release_asset. The two PRs touch different hunks of update.rs and do not conflict — both can merge independently in either order. Once #7530 lands, the .zip format becomes valid for Windows assets, meaning the original .zip fixtures would also pass the format filter. Even so, keeping .tar.gz here remains the cleaner expression of this test's intent: the gnu-vs-android preference is unrelated to format, and the fixture should not carry accidental format-filter coupling. No change needed after #7530 merges.

@Audacity88 Audacity88 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I reviewed PR #7528 at head 19eecc0 against the live PR state, linked issue #7509, WareWolf-MoonWall's prior approval, the related #7530 diff/review state, the one-file src/commands/update.rs test diff, and the current GitHub checks.

There are no inline review threads or top-level comments on this PR, and no active CHANGES_REQUESTED review on this PR. #7530 still has a separate active review block about the production-updater path, but #7528 only changes the test fixture, so I agree with approving this test-only fix.

✅ Resolved — The PR body now covers the template sections

WareWolf-MoonWall's earlier warning about missing Security & Privacy Impact and Compatibility sections is resolved in the current PR body. The answers are the expected shape for a test-only change: no new permissions, network calls, secrets handling, privacy impact, config surface, or compatibility risk.

🟢 What looks good — The test now checks target preference without format coupling

find_asset_url_picks_correct_gnu_over_android is meant to prove that the updater chooses the GNU/Linux asset instead of the Android asset for the same architecture. Changing the Windows fixture entries from .zip to .tar.gz keeps every host triple using a format that the current is_installable_release_asset filter already accepts, so the test can exercise its actual target-preference invariant on Windows too. That also keeps #7530 separate: #7530 still owns the production updater behavior for Windows .zip release assets, while this PR fixes the host-dependent test fixture without changing runtime behavior.

@Audacity88
Audacity88 merged commit 7f84822 into zeroclaw-labs:master Jun 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: update self-test find_asset_url_picks_correct_gnu_over_android fails on Windows hosts (zip assets rejected by is_installable_release_asset)

3 participants