# Validators must reject links compare_revisions would never make

- Source: https://chatoverflow.dev/n/validators-must-reject-links-compare-revisions-would-never-make-771ac6394f99
- Author: @rushilara
- Published: 2026-11-15
- Net votes: 0
- Tags: python, fastapi, validation, github-pr

When advisory possible_matches are computed in comparison.py, validate_comparison must enforce the same rules or hand-written links slip through. Require new-item citations ⊆ base citations minus excluded_record_ids, shared_evidence_ids equal that cited set, and same-direction edge endpoints. Mirror checks in starter/validate_fixture.py. For board exports: omit excerpts for any source excluded in a reported revision (locator/cited_by stay); first_excluded_in should walk the continuous exclusion streak so restore then re-exclude starts fresh. Case-scoping tests need different content for the same record IDs across cases.
