Skip to content

fix(search): match a package whose family the metadata has dropped - #201

Merged
QaidVoid merged 1 commit into
mainfrom
fix-search-family
Aug 15, 2026
Merged

fix(search): match a package whose family the metadata has dropped#201
QaidVoid merged 1 commit into
mainfrom
fix-search-family

Conversation

@QaidVoid

@QaidVoid QaidVoid commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Improved installed-status detection in package lists and search results.
    • Packages are now matched to the correct family when multiple variants share the same name.
    • Family-independent matching is applied only when the package name is uniquely offered, reducing incorrect installation indicators.
    • Corrected handling for missing, renamed, duplicate, ambiguous, and unavailable package metadata.

@coderabbitai

coderabbitai Bot commented Aug 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a24f56e7-1ded-4853-96d2-d9b0cfe2a903

📥 Commits

Reviewing files that changed from the base of the PR and between 6685557 and 0e3afad.

📒 Files selected for processing (2)
  • crates/soar-operations/src/list.rs
  • crates/soar-operations/src/search.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/soar-operations/src/list.rs
  • crates/soar-operations/src/search.rs

📝 Walkthrough

Walkthrough

The change adds repository-wide package-name counting. List and search operations pass these counts to installation matching, which now handles exact families and constrained family-independent matches.

Changes

Package installation matching

Layer / File(s) Summary
Repository package-name counting
crates/soar-db/src/repository/metadata.rs
MetadataRepository::count_names counts distinct families for each package name and groups missing families as one value.
Installation matching rules
crates/soar-operations/src/utils.rs
NameCounts and is_installed support exact-family matching and constrained family-independent matching. Tests cover renamed, ambiguous, duplicate, removed, and uninstalled package metadata.
List and search integration
crates/soar-operations/src/list.rs, crates/soar-operations/src/search.rs
List and search operations build repository-wide offering counts and pass them to is_installed.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 0e3af

The current change has no identified actionable merge-blocking risk and is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant ListSearch
  participant MetadataRepository
  participant is_installed
  ListSearch->>MetadataRepository: Query package-name offering counts
  MetadataRepository-->>ListSearch: Return name and family counts
  ListSearch->>is_installed: Pass offering counts and package metadata
  is_installed-->>ListSearch: Return installation status
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: matching packages when metadata no longer includes their family.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-search-family

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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploying soar-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0e3afad
Status: ✅  Deploy successful!
Preview URL: https://b2ed870c.soar-docs.pages.dev
Branch Preview URL: https://fix-search-family.soar-docs.pages.dev

View logs

A name the repository offers once and holds once means one package
however its family was recorded, which is what a family dropped by
later metadata leaves nothing else to match on. A name standing for
more than one still has to match its family exactly.
@QaidVoid
QaidVoid merged commit e6057fb into main Aug 15, 2026
10 checks passed
@QaidVoid QaidVoid mentioned this pull request Aug 15, 2026
github-actions Bot pushed a commit to Azathothas/soar that referenced this pull request Aug 15, 2026
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.

1 participant