Skip to content

Follow-up: cap suggest lookups to prevent CI timeout#56

Merged
anand-testcompare merged 1 commit intomainfrom
fix/suggest-lookup-timeout-followup
Feb 19, 2026
Merged

Follow-up: cap suggest lookups to prevent CI timeout#56
anand-testcompare merged 1 commit intomainfrom
fix/suggest-lookup-timeout-followup

Conversation

@anand-testcompare
Copy link
Collaborator

@anand-testcompare anand-testcompare commented Feb 19, 2026

Summary

  • follow-up fix for one-pass Shopify extraction to avoid CI timeout regressions
  • bound suggest lookups with three controls:
    • skip suggest lookups when existing product text already carries strong capability signals
    • cache suggest data by handle to avoid duplicate network calls
    • disable suggest lookups for a template after first 404 response

Validation

  • bun test packages/backend/convex/shopify.ingest.integration.test.ts
  • bun x ultracite check packages/shopify-cable-source/src/source.ts
  • bun run check-types

Summary by CodeRabbit

  • Bug Fixes
    • Improved search suggestion and discovery flow with enhanced fallback handling when endpoints become unavailable.
    • Enhanced error handling to gracefully manage unavailable search endpoints and prevent failed lookups.
    • Optimized search result caching to reduce redundant network requests and improve overall response times.
    • Improved product capability detection for more accurate and relevant search results.

@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cable-intel-web Ready Ready Preview, Comment Feb 19, 2026 8:25pm

Request Review

@anand-testcompare anand-testcompare enabled auto-merge (squash) February 19, 2026 20:24
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The source file enhances the Shopify product discovery flow by introducing capability-detection helpers, caching mechanisms, and fallback search logic. Added regex patterns for case-insensitive hint matching, control flags for endpoint availability and catalog loading state, and helper functions to derive descriptions from cached results or fallback searches.

Changes

Cohort / File(s) Summary
Shopify Product Discovery Enhancement
packages/shopify-cable-source/src/source.ts
Introduced POWER_HINT_REGEX and DATA_RATE_HINT_REGEX for hint matching. Added hasCapabilitySignals() helper to detect capability signals. Implemented loadedSearchCatalogForTemplateQuery and suggestEndpointUnsupported flags for caching and endpoint availability tracking. Enhanced getSearchSuggestSupplementalDescription() to accept ShopifyProduct parameter and utilize cached descriptions. Added getSuggestDescriptionFromCache() and getSuggestDescriptionFromProducts() helpers. Updated error handling to mark endpoint as unsupported on 404 responses.

Sequence Diagram

sequenceDiagram
    participant Client
    participant SuggestEndpoint as Suggest Endpoint
    participant Cache as Description Cache
    participant FallbackSearch as Fallback Search
    participant Extractor as Product Extractor

    Client->>SuggestEndpoint: Fetch product suggestions
    alt Suggest Endpoint Available
        SuggestEndpoint-->>Client: Return suggestions
        Client->>Cache: Check cached descriptions
        alt Description in Cache
            Cache-->>Client: Return cached description
        else Description Not Cached
            Client->>SuggestEndpoint: Request supplemental description
            SuggestEndpoint-->>Client: Return supplemental data
            Client->>Cache: Store description
        end
    else Suggest Endpoint Unavailable (404)
        SuggestEndpoint-->>Client: 404 Error
        Client->>FallbackSearch: Execute fallback search
        FallbackSearch-->>Client: Return fallback results
        Client->>Cache: Derive description from fallback
    end
    Client->>Extractor: Pass product with description
    Extractor-->>Client: Complete product extraction
Loading

Possibly related PRs

  • anand-testcompare/cable-intel#53: Modifies the same Shopify suggest lookup and supplemental-description flow with related helper functions and product parameter passing.

Poem

🐰 Cached descriptions hop with speed,
Fallback searches meet the need,
Hints of power flow through code,
Shopify's path now brightly glowed,
Clever lookups skip the wait—efficiency has come of late! 🌟

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/suggest-lookup-timeout-followup

Comment @coderabbitai help to get the list of available commands and usage tips.

@anand-testcompare anand-testcompare merged commit 34493cd into main Feb 19, 2026
3 of 4 checks passed
@anand-testcompare anand-testcompare deleted the fix/suggest-lookup-timeout-followup branch February 19, 2026 20:25
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