test: lift project_history.py coverage 81% to 99% - #766
Conversation
22 edge tests for the evidence-bound project-history projection: key bytes/UTF-8 bound, score numeric/finite validation, DAG safety skips (outside-window and backward edges), maximum-depth and per-event path ceilings, projection parameter bounds and focus-membership validation, match-row processing (dedup, truth mapping, confidence scoring, display name), cataloged actor keys, and role/unknown event skipping. project_history.py 33 -> 1 missing line; package line coverage 95.1%. 1673 Python tests green; tests-only change.
|
Warning Review limit reachedNext included review available in 12 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
| maximum_depth=8, | ||
| maximum_paths_per_event=32, | ||
| ) | ||
| assert all(path["event_ids"][-1] == "spec" for path in paths["spec"]) |
There was a problem hiding this comment.
📝 Info: Backward-edge test asserts a tautology
In test_prior_paths_skips_backward_or_simultaneous_edges the check all(path["event_ids"][-1] == "spec" ...) is vacuously true: the list is empty, and every path for target spec ends with spec regardless. The test drives coverage but cannot fail even if the backward-edge skip were removed.
Was this helpful? React with 👍 or 👎 to provide feedback.
Tests-only change targeting the evidence-bound project-history projection shipped in #762.
22 edge tests cover the validation and safety branches the happy-path suite misses: UTF-8 key bound, score numeric/finite validation, DAG skips (outside-window/backward edges), depth and per-event path ceilings, projection bounds + focus membership, match-row dedup/truth/confidence/display-name, cataloged actor keys, and unknown-event role skipping.
project_history.py: 33 -> 1 missing line (the residual is a defensive guard structurally unreachable with forward-only edges). Package line coverage 95.1%. Full suite 1673 passed + 12 skipped.