Skip to content

tests: add fixture corpus quality coverage#15

Merged
gaelic-ghost merged 3 commits into
mainfrom
tests/fixture-corpus-quality
May 2, 2026
Merged

tests: add fixture corpus quality coverage#15
gaelic-ghost merged 3 commits into
mainfrom
tests/fixture-corpus-quality

Conversation

@gaelic-ghost
Copy link
Copy Markdown
Owner

@gaelic-ghost gaelic-ghost commented May 2, 2026

Summary

  • Add a tiny attributed Project Gutenberg fixture corpus for FetchKit result-quality tests.
  • Preserve title-only snippets while exposing matchedFields and snippetField on FetchSearchResult so consumers can distinguish title evidence from body evidence.
  • Cover the same fixture corpus expectations through the macOS SearchKit-backed index path.
  • Record the future opt-in extended snippet/background summary direction in the roadmap.

Verification

  • swift test --filter SearchKitFetchIndexTests
  • swift test
  • scripts/repo-maintenance/validate-all.sh
  • git diff --check

@gaelic-ghost gaelic-ghost marked this pull request as ready for review May 2, 2026 21:05
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@gaelic-ghost gaelic-ghost merged commit 05ae277 into main May 2, 2026
1 check passed
@gaelic-ghost gaelic-ghost deleted the tests/fixture-corpus-quality branch May 2, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant