Skip to content

test: add missing model and error code test coverage - #19

Closed
julianschiavo wants to merge 1 commit into
mainfrom
test/add-missing-coverage
Closed

test: add missing model and error code test coverage#19
julianschiavo wants to merge 1 commit into
mainfrom
test/add-missing-coverage

Conversation

@julianschiavo

@julianschiavo julianschiavo commented Mar 13, 2026

Copy link
Copy Markdown
Member
  • Add missing .invalidScore to BridgeErrorCode exhaustive test
  • Add tests for unknown DocumentationKind decoding and NaN/infinity score encoding
  • Fix DocumentationEntry to decode unrecognized kind values as nil instead of throwing

Note

Low Risk
Low risk: behavior change is limited to DocumentationEntry JSON decoding, making it more tolerant of unexpected kind values; remaining changes are test-only and validate encoding failures for invalid floating-point scores.

Overview
Makes model decoding more robust and expands edge-case test coverage. DocumentationEntry now implements a custom Decodable initializer that treats unrecognized DocumentationKind raw values as nil instead of failing decode.

Tests are extended to include the previously-missing .invalidScore BridgeErrorCode, verify unknown kind decoding behavior, and assert that SearchResult with NaN/infinity scores throws during JSONEncoder encoding.

Written by Cursor Bugbot for commit 09123a4. This will update automatically on new commits. Configure here.

fix: decode unknown DocumentationKind values as nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant