test: claim-review MVP end-to-end integration coverage - #74
Merged
Conversation
Two focused widget tests through SearchScreen using fakes only: 1. Full MVP flow: ask → grounded review (provider called once, local evidence retrieved) → grouped claims with provider label → toggle selection → draft A (new claim only, save, double-persistence guard, no append after save) → draft B (new + better-source, append, no duplicate append, embeddingPending) → discard (session cleared, repository intact). 2. alreadyKnown tampering regression: simulates corrupted selection via direct notifier.toggle(); proves selectedSaveableItems stays empty and both saveAsNewNote() and appendToExistingNote() are ignored, never reaching the repository. Stale #70 assumptions incompatible with current main: - _FixedGroundedAnswerProvider missing isConfigured (added in #73) - step 11 expected same draft to be both saved and appended; current main's isDraftAlreadySaved guard prevents this — replaced with genuine draft B (different content) for the append path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/search_screen_claim_review_e2e_test.dart— 2 focused widget tests, no production code changed.SearchScreenusing fakes only (no network, no real API keys).Test 1 — full MVP flow:
ignored, no second insertTest 2 — alreadyKnown tampering regression:
notifier.toggle(knownClaimId)to simulate corrupted selectionselectedSaveableItemsremains empty (canBeSaved = false)generateDraft()produces null or non-saveable draftsaveAsNewNote()returnsignored, no insertappendToExistingNote()is a no-op, no updateStale #70 assumptions fixed
_FixedGroundedAnswerProvidermissingisConfiguredisConfiguredadded to abstract class in #73bool get isConfigured => trueisDraftAlreadySavedguard prevents this (correct behavior)Verification
flutter analyze→ No issues foundflutter test test/search_screen_claim_review_e2e_test.dart --reporter expanded→ 2/2 passflutter test --reporter expanded→ 589/589 pass@codex review
🤖 Generated with Claude Code