Clarify partial research recovery - #96
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4ba4b5b0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| function isUsable(response: ResearchLookupResponse): boolean { | ||
| return ["completed", "partial"].includes(response.status) && response.news_items.length > 0; | ||
| return response.status === "completed" && response.news_items.length > 0; |
There was a problem hiding this comment.
Exclude provider-partial runs from automatic chat use
When research retains usable items but any provider or source read fails, WebLookupService sets provider_status to partial, while WebLookupRepository.complete() still sets status to completed; therefore this predicate remains true and silently enables those partial findings for the next chat turn. Conversely, the backend's status === "partial" represents provider_status === "insufficient" and normally has no items, so the new test exercises a payload the production completion path does not produce. Check provider_status here (and in the new partial-result UI branches) so actual partially successful research requires explicit learner confirmation.
Useful? React with 👍 / 👎.
Summary
Validation
Full GitHub Actions remains the merge gate.