Conversation
…ort semantics - Apply offset after merging and deduplicating federated legs, not per-leg - Sort merged results by the requested sort order before applying offset and limit - Propagate sort+offset through surviving-leg fallback paths - Guard against deep offsets that exceed the fetch capacity bound (offset+limit > 1250) - Normalize partial dates (YYYY, YYYY-MM) to full ISO-8601 for correct comparisons - Extend spec/06-article.md with a deep-offset rejection contract test
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
offset + limit > 1250returns an explicitInvalidArgumenterror rather than silently returning an incorrect windowYYYY,YYYY-MM) to full ISO-8601 strings (YYYY-01-01,YYYY-MM-01) so date comparisons are lexicographically correct across mixed-precision valuesspec/06-article.mdwith a deep-offset rejection contract testTest plan
cargo test --lib entities::article— 31 article unit tests pass, including new tests for offset-after-merge, sort ordering, partial date normalization, retraction filtering, and surviving-leg sort-before-offsetcargo test— 584 tests pass, 0 failedcargo clippy -- -D warnings— cleancargo fmt --check— cleanmake spec— 98 passed, 5 skipped (spec/06-article.md deep-offset guard test included)biomcp search article -k melanoma --limit 50 --offset 1201fails with expected error;--offset 1200succeeds