← Về thư mục
scripts/test_e2e_claim_audit.py
- _citation · function · L109-L118 — def _citation(claim_id: str, claim_text: str, ref_slug: str) -> dict[str, Any]
- _five_citations · function · L121-L128 — def _five_citations() -> list[dict[str, Any]]
- _manifest_with_5_claims_and_mnc · function · L131-L178 — def _manifest_with_5_claims_and_mnc() -> dict[str, Any]
- _make_retrieve_fn · function · L181-L196 — def _make_retrieve_fn( *, paywall_claim_ids: tuple[str, ...] = ("C-004",), ) -> Callable[[dict[str, Any]], dict[str, Any]]
- fn · function · L187-L194 — def fn(citation: dict[str, Any]) -> dict[str, Any]
- _make_judge_fn · function · L199-L266 — def _make_judge_fn( *, c3_judgment: str = "UNSUPPORTED", c5_judgment: str = "VIOLATED", ) -> Callable[..., dict[str, Any]]
- fn · function · L210-L264 — def fn(**kwargs: Any) -> dict[str, Any]
- _run_e2e · function · L269-L308 — def _run_e2e( *, c3_judgment: str = "UNSUPPORTED", c5_judgment: str = "VIOLATED", paywall_claim_ids: tuple[str, ...] = ("C-004",), extra_sentences: list[dict[str, Any]] | None = None, ) -> tuple[dict[str, Any], dict[str, Any]]
- _E2ETestBase · class · L311-L320 — class _E2ETestBase(unittest.TestCase)
- E2EScenarioARefuses · class · L328-L410 — class E2EScenarioARefuses(_E2ETestBase)
- test_gate_refuses_when_c3_misused_and_c5_violates · method · L329-L335 — def test_gate_refuses_when_c3_misused_and_c5_violates(self) -> None
- test_blockers_are_exactly_c3_and_c5 · method · L337-L349 — def test_blockers_are_exactly_c3_and_c5(self) -> None
- test_c1_emits_no_annotation_c2_and_c4_pass_gate · method · L351-L373 — def test_c1_emits_no_annotation_c2_and_c4_pass_gate(self) -> None
- test_citation_row_contracts_match_spec_7_6_matrix · method · L375-L410 — def test_citation_row_contracts_match_spec_7_6_matrix(self) -> None
- E2EScenarioBPasses · class · L418-L449 — class E2EScenarioBPasses(_E2ETestBase)
- test_correcting_c3_and_c5_clears_refusal · method · L419-L427 — def test_correcting_c3_and_c5_clears_refusal(self) -> None
- test_corrected_run_keeps_c2_advisory_and_c4_unverified · method · L429-L449 — def test_corrected_run_keeps_c2_advisory_and_c4_unverified(self) -> None
- E2EAdjacentClauseFilter · class · L459-L536 — class E2EAdjacentClauseFilter(_E2ETestBase)
- test_sentence_with_adjacent_ref_marker_is_filtered_out · method · L460-L474 — def test_sentence_with_adjacent_ref_marker_is_filtered_out(self) -> None: # Token-rule fires on "67%" but the adjacent clause already carries # the ref marker. Per spec line 251 + the DEFERRED-CROSS-SENTENCE # note, this sentence MUST NOT become an uncited_assertion candidate.
- test_sentence_without_adjacent_ref_marker_still_a_candidate · method · L476-L486 — def test_sentence_without_adjacent_ref_marker_still_a_candidate(self) -> None: # Same token-rule trigger but no adjacent ref marker — the standard # T-U1 detector behavior should still fire.
- test_e2e_pipeline_runs_through_filtered_sentences_cleanly · method · L488-L536 — def test_e2e_pipeline_runs_through_filtered_sentences_cleanly(self) -> None: # Smoke test the detector → pipeline → finalizer path with one # filtered + one surviving sentence. The surviving uncited # assertion adds an advisory row but does not gate-refuse on its own; # c3 + c5 still drive the gate. This confirms detector wiring does # not regress the 5-citation contract.