Repository navigation
test(property): add filter chain semantic law tests - #1077
Conversation
Adds Hypothesis property tests for the four algebraic laws that ConversationFilter must satisfy against a real SQLite archive: 1. Subset law: filter(X) result IDs ⊆ unfiltered result IDs 2. Monotonicity: adding more constraints never increases result count 3. Commutativity: filter(A).filter(B) ≡ filter(B).filter(A) 4. Idempotency: applying the same filter twice ≡ applying it once Each test draws from filter_params_strategy() covering provider, has_tool_use, has_thinking, min/max_messages, min_words, and date ranges. The archive is seeded with 20 conversations spanning all four providers with varied message counts, tool use, thinking blocks, and 2024 timestamps. max_examples=40 keeps the suite under ~15s via parallel execution. Co-Authored-By: Claude <[email protected]>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds Hypothesis property tests for the four algebraic laws of the filter chain at the async repository/facade layer.
Problem
The filter chain has rich combinatorial behavior tested only with concrete seeded data. Subtle composition bugs are invisible to point tests.
Solution
New
tests/property/test_filter_chain_laws.py— four@giventests: subset law, monotonicity, commutativity, idempotency. Strategyfilter_params_strategy()draws provider,has_tool_use,has_thinking,min/max_messages,min_words, date range.max_examples=40, runtime <15s.Verification
Ref #997