Skip to content

Release 0.12.4#255

Merged
khoroshevskyi merged 5 commits intomasterfrom
search_fix
Feb 6, 2026
Merged

Release 0.12.4#255
khoroshevskyi merged 5 commits intomasterfrom
search_fix

Conversation

@khoroshevskyi
Copy link
Member

Changes:

  • Fixed exact search for geo, and bed id

Pre-AI PR

TODO:

  • Version of pepdbagent updated in __version__.py file
  • Changelog updated

Copilot AI review requested due to automatic review settings February 4, 2026 18:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR is a release for version 0.12.4 that claims to fix exact search functionality for geo and bed ID. However, the actual code changes only address bed ID exact search logic, while the geo search fix may be contained in the bbconf library dependency update.

Changes:

  • Version bumped from 0.12.3 to 0.12.4
  • Updated bbconf dependency from >=0.14.2 to >=0.14.4
  • Added null check for bed metadata and modified return logic in bed ID exact search
  • Updated Vite worker configuration for ES module format and WASM support
  • Updated refgenie URL from deprecated endpoint to current API endpoint

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bedhost/_version.py Version bump to 0.12.4
requirements/requirements-all.txt Updated bbconf dependency to >=0.14.4 (may contain geo search fixes)
bedhost/routers/bed_api.py Added metadata validation and modified exact bed ID search logic with new error handling
ui/vite.config.ts Added worker configuration for ES module format with WASM plugin support
ui/src/components/bed-splash-components/header.tsx Updated refgenie URL from deprecated v3 HTTP endpoint to current v4 HTTPS API endpoint
Comments suppressed due to low confidence (2)

bedhost/routers/bed_api.py:492

  • The outer try-except block silently catches all exceptions (line 491-492) with just pass. This means that if an exact bed ID lookup succeeds but the metadata is None (raising BEDFileNotFoundError on line 471), this error will be caught and ignored, causing the function to fall through to the geo/encode search or hybrid search below. This seems like unintended behavior - if an exact ID match is found but has no metadata, that should likely return an error rather than falling back to other search methods. Consider either removing the outer try-except or being more specific about which exceptions to catch and ignore.
        try:
            result = QdrantSearchResult(
                id=query,
                payload={},
                score=1.0,
                metadata=bbagent.bed.get(query),
            )
            if result.metadata is None:
                raise BEDFileNotFoundError(f"Bed file with id {query} not found")

            try:
                similar_results = bbagent.bed.get_neighbours(
                    query, limit=limit, offset=offset
                )
                if similar_results.results and offset == 0:
                    similar_results.results.insert(0, result)
                    return similar_results
                else:
                    raise BEDFileNotFoundError(f"Similar beds not found")
            except Exception as _:
                similar_results = BedListSearchResult(
                    count=1,
                    limit=100,
                    offset=0,
                    results=[result],
                )

            return similar_results
        except Exception as _:
            pass

bedhost/routers/bed_api.py:488

  • The logic in this try-except block is problematic. When offset > 0 or when similar_results.results is empty/falsy, line 481 raises BEDFileNotFoundError. However, this exception is immediately caught by the except Exception as _: block on line 482, which creates a fallback result. This means the intentionally raised exception is being silently caught and handled.

If the intent is to return an error when similar beds are not found for non-zero offsets, the exception should not be caught by the surrounding try-except. Consider either:

  1. Restructuring the logic so the BEDFileNotFoundError is not caught by the same try-except block
  2. Using a more specific exception type in the except clause that doesn't catch BEDFileNotFoundError
  3. Re-raising the BEDFileNotFoundError in the except clause if that's what was caught
            try:
                similar_results = bbagent.bed.get_neighbours(
                    query, limit=limit, offset=offset
                )
                if similar_results.results and offset == 0:
                    similar_results.results.insert(0, result)
                    return similar_results
                else:
                    raise BEDFileNotFoundError(f"Similar beds not found")
            except Exception as _:
                similar_results = BedListSearchResult(
                    count=1,
                    limit=100,
                    offset=0,
                    results=[result],
                )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 6, 2026

Deploying bedhost-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 30365cf
Status: ✅  Deploy successful!
Preview URL: https://e46d90b1.bedhost.pages.dev
Branch Preview URL: https://search-fix.bedhost.pages.dev

View logs

@khoroshevskyi khoroshevskyi merged commit d28726c into master Feb 6, 2026
2 checks passed
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