Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(sources): keep the current package when its replacement fails

merged
#704 opened by devfix/source-replacement-keeps-current→main
Conversation2 Commits0
devopened this pull requestAuthor· 2 weeks ago

Summary

Confirming "Replace" for a source held by another package removed the installed package first. If the new package then failed to download, verify or describe, the user was left with neither. This happened in testing with the official QQ Music source.

Changes

  • A replacement now takes over the source id only after the new package is downloaded, verified and passes its describe check. Until then the current package stays installed and usable.
  • Contract note in catalog.md.

Test plan

  • cargo test --release --lib: new a_failed_replacement_keeps_the_current_package covers an incompatible registry major and a describe major mismatch; it fails on main and passes here
  • cargo clippy: clean
  • Release app: a good replacement still installs (official QQ Music replaced by a local-registry build). The failure path is covered by the unit test, not by a manual run

Note: #699 edits the same paragraph of docs/references/contracts/catalog.md; whichever merges second needs a small rebase.

claude.ai/code/session_01N6gLNB1dzAQCEYjvHhcRPV

Files changed
…
coderabbitai[bot]commented· 2 weeks ago

[!WARNING]

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: thedavidweng/OpenKara
  • Branch: fix/source-replacement-keeps-current
  • File: .coderabbit.yaml
  • Commit: c461ea2
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 06209121-cc43-4b5b-b6b9-ca03a453b06a
Commits

Reviewing files that changed from the base of the PR and between c5343ea641816113602b6986f09b1655e78b6556 and c461ea23c28bbbf059e7b416055330ec279c60d4.

Files selected for processing: 3

  • docs/references/contracts/catalog.md
  • src-tauri/src/source_host/lifecycle.rs
  • src-tauri/src/source_host/registry_tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
kilo-code-bot[bot]commented· 2 weeks ago

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The replacement flow now keeps the current package installed until the replacement candidate is downloaded, verified, and passes its describe check; takeover (claim_free/take_over) happens only after those checks succeed. The added regression test covers incompatible-registry and describe-major failures and confirms the original owner/version remain.

Files Reviewed (3 files)
  • docs/references/contracts/catalog.md - contract updated to match deferred replacement behavior
  • src-tauri/src/source_host/lifecycle.rs - replacement install/takeover sequencing
  • src-tauri/src/source_host/registry_tests.rs - failed-replacement regression coverage

Reviewed by free · Input: 20.8K · Output: 1.3K · Cached: 112.6K

Sign in to comment.

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.