Skip to content

fix: match release asset versions exactly#469

Open
ThunderTr77 wants to merge 1 commit into
TouchAI-org:mainfrom
ThunderTr77:fix/nonfrontend-runtime-bug
Open

fix: match release asset versions exactly#469
ThunderTr77 wants to merge 1 commit into
TouchAI-org:mainfrom
ThunderTr77:fix/nonfrontend-runtime-bug

Conversation

@ThunderTr77

Copy link
Copy Markdown
Contributor

Summary

  • Match release asset versions with the parsed asset version instead of substring matching.
  • Add a regression fixture where 0.1.1-beta.10 must not be included in the 0.1.1-beta.1 feed downloads.

Related issue or RFC

Related to https://github.com/TouchAI-org/TouchAI

AI assistance disclosure

  • Tool(s) used: AI assistant
  • Scope of assistance: bug identification, patch drafting, and local verification
  • Human review or rewrite performed: reviewed the diff and test output before publishing
  • Architecture or boundary impact: none

Testing evidence

Vitest targeted: tests/ci/build-update-channels.test.ts --pool=vmThreads --fileParallelism=false passed (9 tests)
Prettier check passed for the changed files
ESLint passed for the changed files
git diff --check passed

pnpm test:pr did not run locally because the Windows environment only exposes pnpm through Corepack while the hook expects a direct pnpm shim. CI should provide full-suite proof before merge.

Risk notes

  • AgentService, runtime, MCP, or schema impact: none
  • database baseline or migration impact: none
  • release or packaging impact: release feed generation now excludes only wrong-version assets more strictly

Screenshots or recordings

Not applicable; this changes release feed generation logic covered by unit tests.

Checklist

  • The PR title follows Conventional Commits and is valid for squash merge.
  • This PR is either ready for review or explicitly marked as a Draft PR.
  • I did not use [WIP] or similar title prefixes.
  • If AI materially assisted this PR, I disclosed the tools and scope and I personally reviewed every affected change.
  • I can explain the why, what, and how of this change without relying on an AI tool.
  • If this touches AgentService, runtime, MCP, or schema boundaries, there is an accepted RFC.
  • If this changes architecture or adds a new cross-boundary abstraction, there is an accepted RFC.
  • I ran pnpm test:pr for this code PR, or this is a docs-only change.
  • If I changed Rust behavior or tests, I reviewed pnpm test:coverage:rust or relied on CI coverage evidence.
  • If I changed desktop startup/window/search/popup/settings/E2E paths, I ran pnpm test:e2e locally or documented why CI is the first valid proof.
  • I added tests or explained why tests are not appropriate.
  • I updated docs when behavior changed.

@ThunderTr77 ThunderTr77 requested a review from hiqiancheng as a code owner June 15, 2026 14:06
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3614741f-64a3-4a4f-8bdd-8aa83b88a5df

📥 Commits

Reviewing files that changed from the base of the PR and between ebc3494 and 70c695e.

📒 Files selected for processing (2)
  • apps/desktop/scripts/ci/build-update-channels.mjs
  • apps/desktop/tests/ci/build-update-channels.test.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: CodeQL (rust)
  • GitHub Check: Desktop E2E Smoke (Windows)
  • GitHub Check: Frontend Quality
  • GitHub Check: Frontend Tests
🔇 Additional comments (2)
apps/desktop/scripts/ci/build-update-channels.mjs (1)

323-324: LGTM!

apps/desktop/tests/ci/build-update-channels.test.ts (1)

271-272: LGTM!

Also applies to: 283-284


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced version comparison logic for release asset filtering, ensuring only exact matching release assets are included in update channels rather than assets with partial version matches.

Walkthrough

releaseDownloadsFromDirectory in build-update-channels.mjs switches from substring matching (entry.name.includes(version)) to exact version equality via versionFromAssetName(entry.name) === version. The test for the beta release metadata adds a stale asset file to verify only the current version's assets are included.

Changes

Asset Version Filtering Fix

Layer / File(s) Summary
Exact version filter fix and stale-asset test
apps/desktop/scripts/ci/build-update-channels.mjs, apps/desktop/tests/ci/build-update-channels.test.ts
Filter switches from entry.name.includes(version) to versionFromAssetName(entry.name) === version; test adds a stale .nupkg file matching the version-prefix pattern to assert it is excluded from the generated beta/stable feed output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TouchAI-org/TouchAI#458: Directly overlaps with this change — both modify build-update-channels.mjs asset filtering logic and related tests.

Suggested labels

area:ci

Poem

🐇 A version substring once let stale files sneak in,
Now versionFromAssetName checks where they've been.
Equality rules the filter today,
Old nupkgs are swept clean away!
Hop hop — only fresh builds shall stay. 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
Title check ✅ Passed The PR title 'fix: match release asset versions exactly' follows Conventional Commits standards and accurately describes the core change: replacing substring matching with exact version matching for release assets.
Description check ✅ Passed The PR description includes all required sections: Summary, Related issue, AI assistance disclosure with details, Testing evidence, Risk notes, and a completed checklist. The description comprehensively documents the change and its scope.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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.

@coderabbitai coderabbitai Bot added the area:ci CI, automation, or repository workflow changes label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, automation, or repository workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant