← Về thư mục
scripts/test_claim_audit_finalizer.py
- _stub · function · L75-L76 — def _stub(args: Any, *kwargs: Any) -> Any: # pragma: no cover
- run_audit_pipeline · function · L96-L97 — def run_audit_pipeline(args: Any, *kwargs: Any) -> Any
- _result · function · L105-L136 — def _result( *, judgment: str, defect_stage: str | None, ref_retrieval_method: str, audit_status: str = "completed", violated_constraint_id: str | None = None, claim_id: str = "C-001", scoped_manifest_id: str = MANIFEST_ID, rationale: str = "test rationale", ) -> dict[str, Any]
- _FinalizerTestBase · class · L139-L146 — class _FinalizerTestBase(unittest.TestCase)
- setUpClass · method · L141-L146 — def setUpClass(cls) -> None
- TF1aSupported · class · L154-L163 — class TF1aSupported(_FinalizerTestBase)
- test_supported_emits_no_annotation · method · L155-L163 — def test_supported_emits_no_annotation(self) -> None
- TF1bAmbiguous · class · L172-L181 — class TF1bAmbiguous(_FinalizerTestBase)
- test_ambiguous_emits_low_warn_advisory · method · L173-L181 — def test_ambiguous_emits_low_warn_advisory(self) -> None
- TF1cUnsupportedSourceLevel · class · L190-L199 — class TF1cUnsupportedSourceLevel(_FinalizerTestBase)
- test_unsupported_source_level_gate_refuses · method · L191-L199 — def test_unsupported_source_level_gate_refuses(self) -> None
- TF1dUnsupportedConstraintViolation · class · L208-L223 — class TF1dUnsupportedConstraintViolation(_FinalizerTestBase)
- test_unsupported_constraint_violation_gate_refuses · method · L209-L223 — def test_unsupported_constraint_violation_gate_refuses(self) -> None
- TF1eFabricated · class · L232-L244 — class TF1eFabricated(_FinalizerTestBase)
- test_fabricated_reference_gate_refuses · method · L233-L244 — def test_fabricated_reference_gate_refuses(self) -> None
- TF1fAnchorless · class · L253-L268 — class TF1fAnchorless(_FinalizerTestBase)
- test_anchorless_defense_in_depth_gate_refuses · method · L254-L268 — def test_anchorless_defense_in_depth_gate_refuses(self) -> None
- TF1gPaywall · class · L276-L291 — class TF1gPaywall(_FinalizerTestBase)
- test_paywall_low_warn_passes · method · L277-L291 — def test_paywall_low_warn_passes(self) -> None
- TF1hAuditToolFailure · class · L299-L315 — class TF1hAuditToolFailure(_FinalizerTestBase)
- test_audit_tool_failure_med_warn_passes · method · L300-L315 — def test_audit_tool_failure_med_warn_passes(self) -> None
- TF2TerminalGateRefuse · class · L323-L349 — class TF2TerminalGateRefuse(_FinalizerTestBase)
- test_high_warn_propagates_to_apply_finalizer · method · L324-L349 — def test_high_warn_propagates_to_apply_finalizer(self) -> None
- TF3MarkReadAsymmetry · class · L357-L382 — class TF3MarkReadAsymmetry(_FinalizerTestBase)
- test_mark_read_cannot_clear_high_warn_not_supported · method · L358-L372 — def test_mark_read_cannot_clear_high_warn_not_supported(self) -> None: # HIGH-WARN-CLAIM-NOT-SUPPORTED is a structural verdict, not an # acknowledgement-eligible trust state. Mirrors v3.7.3 R-L3-1-A.
- test_mark_read_clears_low_warn_advisory · method · L374-L382 — def test_mark_read_clears_low_warn_advisory(self) -> None: # LOW-WARN paywall is acknowledgement-eligible (the user has # accepted the unverifiable state and chosen to ship).
- TF4LowWarnPasses · class · L390-L411 — class TF4LowWarnPasses(_FinalizerTestBase)
- test_low_warn_only_passport_passes_gate · method · L391-L411 — def test_low_warn_only_passport_passes_gate(self) -> None
- TF5Stage6Histogram · class · L419-L499 — class TF5Stage6Histogram(_FinalizerTestBase)
- test_histogram_renders_when_five_or_more_completed · method · L420-L444 — def test_histogram_renders_when_five_or_more_completed(self) -> None
- test_histogram_suppressed_below_threshold · method · L446-L457 — def test_histogram_suppressed_below_threshold(self) -> None
- test_histogram_renders_for_all_supported_papers · method · L459-L481 — def test_histogram_renders_for_all_supported_papers(self) -> None: # Step 8 codex R4 P2-1 closure: spec literal is "≥5 completed # entries". A mostly-SUPPORTED paper (5 completed citations, # zero defect_stages) MUST still emit the histogram block so the # Stage 6 appendix stays consistent. Prior implementation filtered # to completed-with-defect rows, suppressing this common case.
- test_histogram_excludes_inconclusive_rows · method · L483-L499 — def test_histogram_excludes_inconclusive_rows(self) -> None: # 5 inconclusive + 0 completed → still suppressed (spec: "≥5 completed").
- TF6ManifestMissingAdvisory · class · L507-L611 — class TF6ManifestMissingAdvisory(_FinalizerTestBase)
- test_empty_manifests_with_sentinel_rows_emits_advisory · method · L522-L554 — def test_empty_manifests_with_sentinel_rows_emits_advisory(self) -> None
- test_present_manifests_suppress_advisory · method · L556-L594 — def test_present_manifests_suppress_advisory(self) -> None: # When manifests are present, the audit ran with a pre-commitment # baseline — no MANIFEST-MISSING advisory should fire even if # individual rows happen to carry sentinel scope (drifted-cited # claims that the CO-2 fix sentinel-normalizes per row).
- test_empty_manifests_no_results_no_advisory · method · L596-L611 — def test_empty_manifests_no_results_no_advisory(self) -> None: # MANIFEST-MISSING fires on the (empty manifests + sentinel rows # exist) pair. If there are no audit rows at all, there's nothing # to surface a warning about — the gate just sees an empty # passport.
- _PipelineCarryoverTestBase · class · L619-L630 — class _PipelineCarryoverTestBase(unittest.TestCase)
- setUpClass · method · L621-L625 — def setUpClass(cls) -> None
- _config · method · L627-L630 — def _config(self, **overrides: Any) -> dict[str, Any]
- TCO1UncitedSuppressesIntendedDrift · class · L633-L682 — class TCO1UncitedSuppressesIntendedDrift(_PipelineCarryoverTestBase)
- test_uncited_text_matches_manifest_claim_no_companion_drift · method · L634-L682 — def test_uncited_text_matches_manifest_claim_no_companion_drift(self) -> None
- TCO2DriftedCitedScopedToSentinel · class · L690-L737 — class TCO2DriftedCitedScopedToSentinel(_PipelineCarryoverTestBase)
- test_drifted_cited_claim_uses_sentinel_scope · method · L691-L737 — def test_drifted_cited_claim_uses_sentinel_scope(self) -> None
- TCO3MncOnlyUncitedScope · class · L745-L794 — class TCO3MncOnlyUncitedScope(_PipelineCarryoverTestBase)
- test_mnc_only_uncited_drops_manifest_scope · method · L746-L794 — def test_mnc_only_uncited_drops_manifest_scope(self) -> None
- TCO4SamplingPreservesEmittedSet · class · L802-L860 — class TCO4SamplingPreservesEmittedSet(_PipelineCarryoverTestBase)
- test_unsampled_citations_not_flagged_as_dropped_from_manifest · method · L803-L860 — def test_unsampled_citations_not_flagged_as_dropped_from_manifest(self) -> None
- TUAFFinalizerRouting · class · L873-L939 — class TUAFFinalizerRouting(unittest.TestCase)
- test_uaf_row_emits_med_warn_annotation · method · L874-L907 — def test_uaf_row_emits_med_warn_annotation(self) -> None
- test_uaf_row_each_fault_class_renders · method · L909-L939 — def test_uaf_row_each_fault_class_renders(self) -> None