feat(papers): local-first live search, confirmed + faster#313
Conversation
Dogfooding showed live search felt slow and fired too eagerly. - Live search now queries OpenAlex only (LIVE_SOURCES) instead of also waiting on Semantic Scholar (~1 req/s) and PubMed; latency drops from ~tens of seconds to ~1s. Batch sync still uses all three. - Lower default timeout to 15s. - Tool description + EEGLAB prompt require local-first: always search the indexed library first, OFFER a live search and wait for confirmation, and announce 'this might take a minute' before running it. Never call the live tool as the first action on a paper question. Closes #312
…ming Address PR review: a tool description can't enforce pre-call sequencing, so phrase the announce guidance as 'when you call it, your message in that turn should first tell the user...' - matters most for communities that rely on the description without extra prompt guidance.
Review (Sonnet, pr-review-toolkit) + resolutionNo critical issues. Confirmed solid: One 'important' finding addressed: the tool description's 'before calling it, tell the user...' implied pre-call sequencing a tool description can't enforce. Reworded to 'when you call it, your message in that turn should first tell the user...', matching the YAML framing - matters for communities that rely on the description without extra prompt guidance.
|
silent-failure-hunter: - narrow live-search error handling: APIKeyError/ConfigurationError -> error log, OpenCiteError -> warning, both return []; let programming errors propagate instead of masquerading as 'no results'. - escalate cache-write failure to logger.error(exc_info=True) (a lost cache write is a real degraded state). - tool 'no results' message no longer falsely implies a timeout. comment-analyzer: - correct overstated duration: ~15s cap, not 'a minute' (tool description + EEGLAB prompt say 'a few seconds'). - tighten DEFAULT_SOURCES/LIVE_SOURCES rationale comments. pr-test-analyzer: - add TestSourceConstants (live = OpenAlex-only, strict subset of batch sources); exercise the new sources param + production timeout in the live test.
Full PR-review-toolkit pass (Sonnet) - all findings addressedRan code-reviewer + silent-failure-hunter + pr-test-analyzer + comment-analyzer. silent-failure-hunter
comment-analyzer
pr-test-analyzer
code-reviewer (earlier): description sequencing wording aligned with prompt.
|
Summary
Addresses dogfooding feedback on the live paper search (#308): it felt slow and got invoked too eagerly, leaving the user waiting with no warning. Closes #312.
Changes
LIVE_SOURCES) instead of also waiting on Semantic Scholar (~1 req/s) and PubMed. Measured ~0.6s vs the previous multi-source wait. Default timeout tightened to 15s. Batch sync still uses all three sources for coverage.Interaction (intended)
Tests
search_papers_livegains asourcesarg (defaults toLIVE_SOURCES); timed live call returns 2026 papers in ~0.6s.242tool/knowledge tests pass (incl. live network + cache); EEGLAB config validates with the new prompt; ruff clean.Builds on #310.