tests: add fixture corpus quality coverage#15
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97dc93e0c9
ℹ️ 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".
| public let document: FetchDocument | ||
| public let score: Double | ||
| public let snippet: FetchSnippet? | ||
| public let matchedFields: Set<FetchSearchField> |
There was a problem hiding this comment.
Preserve backwards-decoding for FetchSearchResult
Adding matchedFields as a non-optional stored property on this public Codable type causes synthesized decoding to require the key, so JSON produced before this change will now fail with keyNotFound when decoded. This impacts any caller that persists or caches FetchSearchResult across app/package upgrades; a manual init(from:) should decode matchedFields with a fallback (for example decodeIfPresent(... ) ?? []) to keep older payloads readable.
Useful? React with 👍 / 👎.
Summary
matchedFieldsandsnippetFieldonFetchSearchResultso consumers can distinguish title evidence from body evidence.Verification
swift test --filter SearchKitFetchIndexTestsswift testscripts/repo-maintenance/validate-all.shgit diff --check