← Về thư mục
scripts/test_claim_audit_pipeline.py
- run_audit_pipeline · function · L34-L35 — def run_audit_pipeline(args: Any, *kwargs: Any) -> Any
- _manifest · function · L63-L85 — def _manifest( *, claims: list[dict[str, Any]] | None = None, mncs: list[dict[str, str]] | None = None, manifest_id: str = MANIFEST_ID, ) -> dict[str, Any]
- _citation · function · L88-L106 — def _citation( *, claim_id: str = "C-001", claim_text: str = "Sample preprints accounted for 67% of corpus.", ref_slug: str = "smith2024preprints", anchor_kind: str = "page", anchor_value: str = "12", section_path: str = "3. Results > 3.1 Overview", scoped_manifest_id: str = MANIFEST_ID, ) -> dict[str, Any]
- _config · function · L109-L117 — def _config(**overrides: Any) -> dict[str, Any]
- _retrieval_ok · function · L120-L130 — def _retrieval_ok( *, excerpt: str = "The cited page reports the 67% figure verbatim.", ) -> Callable[[dict[str, Any]], dict[str, Any]]
- fn · function · L124-L128 — def fn(citation: dict[str, Any]) -> dict[str, Any]
- _judge_supported · function · L133-L140 — def _judge_supported() -> Callable[..., dict[str, Any]]
- fn · function · L134-L138 — def fn(**kwargs: Any) -> dict[str, Any]
- _judge_unsupported · function · L143-L151 — def _judge_unsupported(*, defect_stage: str = "source_description") -> Callable[..., dict[str, Any]]
- fn · function · L144-L149 — def fn(**kwargs: Any) -> dict[str, Any]
- _judge_violated · function · L154-L162 — def _judge_violated(*, violated_constraint_id: str) -> Callable[..., dict[str, Any]]
- fn · function · L155-L160 — def fn(**kwargs: Any) -> dict[str, Any]
- _judge_partial · function · L165-L181 — def _judge_partial( *, breakdown: list[dict[str, Any]] | None = None ) -> Callable[..., dict[str, Any]]
- fn · function · L169-L179 — def fn(**kwargs: Any) -> dict[str, Any]
- _judge_partial_malformed · function · L184-L191 — def _judge_partial_malformed( *, breakdown: Any ) -> Callable[..., dict[str, Any]]
- fn · function · L188-L189 — def fn(**kwargs: Any) -> dict[str, Any]
- _PipelineTestBase · class · L194-L238 — class _PipelineTestBase(unittest.TestCase)
- setUpClass · method · L204-L209 — def setUpClass(cls) -> None
- run_pipeline · method · L211-L222 — def run_pipeline(self, **kwargs: Any) -> dict[str, list[dict[str, Any]]]
- _validate_passport · method · L224-L238 — def _validate_passport( self, out: dict[str, Any], manifests: list[dict[str, Any]] | None = None ) -> list[Any]
- TP1AnchorNoneShortCircuit · class · L246-L287 — class TP1AnchorNoneShortCircuit(_PipelineTestBase)
- test_anchor_none_skips_judge · method · L249-L271 — def test_anchor_none_skips_judge(self) -> None
- judge_fn · function · L252-L254 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_anchor_none_pins_empty_sentinel_anchor_value · method · L273-L287 — def test_anchor_none_pins_empty_sentinel_anchor_value(self) -> None: # INV-6 sentinel: even if the caller passes a stale residual anchor_value # on an anchor_kind=none citation, the pipeline MUST coerce it to the # empty string per the schema contract (Step 13 R1 Gemini finding).
- TP2P3CacheBehavior · class · L295-L356 — class TP2P3CacheBehavior(_PipelineTestBase)
- test_p2_cache_hit_skips_judge · method · L298-L320 — def test_p2_cache_hit_skips_judge(self) -> None
- judge_fn · function · L302-L304 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_p3_cache_miss_after_manual_pdf_uploaded · method · L322-L356 — def test_p3_cache_miss_after_manual_pdf_uploaded(self) -> None
- judge_fn · function · L326-L328 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- manual_pdf_retrieval · function · L340-L344 — def manual_pdf_retrieval(citation: dict[str, Any]) -> dict[str, Any]
- TP361PromptVersionCacheKey · class · L364-L510 — class TP361PromptVersionCacheKey(_PipelineTestBase)
- _counting_judge · method · L375-L380 — def _counting_judge(invocations: list[Any]) -> Callable[..., dict[str, Any]]
- judge_fn · function · L376-L378 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_prompt_version_change_misses_cache · method · L382-L407 — def test_prompt_version_change_misses_cache(self) -> None
- test_same_prompt_version_still_hits · method · L409-L425 — def test_same_prompt_version_still_hits(self) -> None: # Regression guard: identical prompt version keeps the existing dedup.
- test_unknown_prompt_version_fails_closed · method · L427-L446 — def test_unknown_prompt_version_fails_closed(self) -> None: # Caller declares the prompt version unknown (None). Across two distinct # runs (different audit_run_id) the cache must NOT serve the stale entry # — the unknown version binds a run-local component, so each run misses.
- test_unknown_prompt_version_dedups_within_a_run · method · L448-L465 — def test_unknown_prompt_version_dedups_within_a_run(self) -> None: # Fail-closed must not break WITHIN-run dedup: two identical citations in # the SAME run (same audit_run_id) share the run-local component, so the # second is a hit — the judge runs once.
- test_default_prompt_version_hits_across_runs · method · L467-L479 — def test_default_prompt_version_hits_across_runs(self) -> None: # When the caller does NOT declare a version at all, the repo constant # JUDGE_PROMPT_VERSION supplies a real version → normal dedup holds.
- test_default_tracks_prompt_hash_not_version_label · method · L481-L510 — def test_default_tracks_prompt_hash_not_version_label(self) -> None: # codex P2: with NO explicit judge_prompt_version, the default cache-key # prompt component must be the prompt FINGERPRINT (JUDGE_PROMPT_SHA256), # not the decoupled human-readable JUDGE_PROMPT_VERSION label. A prompt # edit that re-pins the SHA256 (lint enforces this) must AUTOMATICALLY # invalidate stale entries — even if the author forgot to bump the # version label. Patch the hash to two distinct 64-char values across two # runs sharing one cache; the judge must be invoked TWICE (cache miss).
- TP4FailedRetrievalPaywall · class · L518-L538 — class TP4FailedRetrievalPaywall(_PipelineTestBase)
- test_paywall_triple · method · L521-L538 — def test_paywall_triple(self) -> None
- paywall · function · L522-L523 — def paywall(citation: dict[str, Any]) -> dict[str, Any]
- judge_fn · function · L525-L526 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- TP5RetrievalPathways · class · L546-L567 — class TP5RetrievalPathways(_PipelineTestBase)
- test_manual_pdf_accepted · method · L549-L556 — def test_manual_pdf_accepted(self) -> None
- manual_pdf · function · L550-L551 — def manual_pdf(citation: dict[str, Any]) -> dict[str, Any]
- test_not_found_triggers_retrieval_existence · method · L558-L567 — def test_not_found_triggers_retrieval_existence(self) -> None
- not_found · function · L559-L560 — def not_found(citation: dict[str, Any]) -> dict[str, Any]
- TP6ConstraintViolation · class · L575-L593 — class TP6ConstraintViolation(_PipelineTestBase)
- test_violated_routes_to_claim_audit_result · method · L578-L593 — def test_violated_routes_to_claim_audit_result(self) -> None
- TP7DefectStageClassification · class · L601-L641 — class TP7DefectStageClassification(_PipelineTestBase)
- test_each_defect_stage_mappable · method · L613-L641 — def test_each_defect_stage_mappable(self) -> None
- TP8DriftConstraintPrecedence · class · L649-L683 — class TP8DriftConstraintPrecedence(_PipelineTestBase)
- test_constraint_absorbs_drift · method · L652-L683 — def test_constraint_absorbs_drift(self) -> None: # Manifest mentions one claim; the prose drifts AND violates.
- TP9AnchorVsDescription · class · L691-L701 — class TP9AnchorVsDescription(_PipelineTestBase)
- test_anchor_wrong_description_correct · method · L694-L701 — def test_anchor_wrong_description_correct(self) -> None
- TP10UncitedOverDrift · class · L709-L743 — class TP10UncitedOverDrift(_PipelineTestBase)
- test_uncited_takes_precedence_over_drift · method · L712-L743 — def test_uncited_takes_precedence_over_drift(self) -> None
- TP11CapSampling · class · L751-L820 — class TP11CapSampling(_PipelineTestBase)
- test_large_n_emits_stratified_summary · method · L754-L790 — def test_large_n_emits_stratified_summary(self) -> None: # 150 citations, cap=100 -> exactly 1 sampling summary, audited_count=100.
- test_small_n_no_summary_or_telemetry · method · L792-L813 — def test_small_n_no_summary_or_telemetry(self) -> None: # 50 citations, cap=100 -> no summary OR summary with audited_count == total.
- test_cap_zero_rejected · method · L815-L820 — def test_cap_zero_rejected(self) -> None
- TP12JudgeFailureAuditToolFailure · class · L830-L951 — class TP12JudgeFailureAuditToolFailure(_PipelineTestBase)
- _run_one · method · L833-L834 — def _run_one(self, judge_fn: Any) -> dict[str, Any]
- _assert_audit_tool_failure · method · L836-L847 — def _assert_audit_tool_failure(self, out: dict[str, Any], expected_tag: str) -> None
- test_timeout_error_becomes_judge_timeout · method · L849-L853 — def test_timeout_error_becomes_judge_timeout(self) -> None
- judge_fn · function · L850-L851 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_value_error_becomes_judge_parse_error · method · L855-L859 — def test_value_error_becomes_judge_parse_error(self) -> None
- judge_fn · function · L856-L857 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_generic_exception_becomes_judge_api_error · method · L861-L865 — def test_generic_exception_becomes_judge_api_error(self) -> None
- judge_fn · function · L862-L863 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_malformed_return_missing_judgment_key · method · L867-L871 — def test_malformed_return_missing_judgment_key(self) -> None
- judge_fn · function · L868-L869 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_malformed_return_non_dict · method · L873-L877 — def test_malformed_return_non_dict(self) -> None
- judge_fn · function · L874-L875 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_unknown_judgment_value_rejected · method · L879-L886 — def test_unknown_judgment_value_rejected(self) -> None: # Step 13 R2 codex P2: _invoke_judge must validate the judgment enum, # not only check key presence. An unknown value MUST map to # judge_parse_error rather than reach passport-lint stage.
- judge_fn · function · L883-L884 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_violated_without_constraint_id_rejected · method · L888-L895 — def test_violated_without_constraint_id_rejected(self) -> None: # Step 13 R2 codex P2: VIOLATED without a violated_constraint_id would # otherwise emit an INV-7-failing negative_constraint_violation row. # Reject at invocation boundary instead.
- judge_fn · function · L892-L893 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_violated_with_blank_constraint_id_rejected · method · L897-L905 — def test_violated_with_blank_constraint_id_rejected(self) -> None
- judge_fn · function · L898-L903 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_cited_path_rejects_retrieval_failed_verdict · method · L907-L913 — def test_cited_path_rejects_retrieval_failed_verdict(self) -> None: # Step 13 R3 codex P2 #2: cited path must not accept RETRIEVAL_FAILED # / NOT_VIOLATED — they would crash in _judge_result_entry.
- judge_fn · function · L910-L911 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_cited_path_rejects_not_violated_verdict · method · L915-L919 — def test_cited_path_rejects_not_violated_verdict(self) -> None
- judge_fn · function · L916-L917 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_violated_id_outside_active_set_rejected · method · L921-L933 — def test_violated_id_outside_active_set_rejected(self) -> None: # Step 13 R3 codex P2 #1: VIOLATED with an id the author never declared # would otherwise gate-refuse the formatter on a hallucinated rule. # The default _citation() has no active constraints, so any nonblank # id is outside the active set.
- judge_fn · function · L926-L931 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_judgment_non_string_list_becomes_judge_parse_error · method · L941-L945 — def test_judgment_non_string_list_becomes_judge_parse_error(self) -> None
- judge_fn · function · L942-L943 — def judge_fn(**_kw: Any) -> dict[str, Any]
- test_judgment_non_string_dict_becomes_judge_parse_error · method · L947-L951 — def test_judgment_non_string_dict_becomes_judge_parse_error(self) -> None
- judge_fn · function · L948-L949 — def judge_fn(**_kw: Any) -> dict[str, Any]
- TP14RetrieveFailureAuditToolFailure · class · L961-L1037 — class TP14RetrieveFailureAuditToolFailure(_PipelineTestBase)
- _run_one · method · L964-L965 — def _run_one(self, retrieve_fn: Any) -> dict[str, Any]
- _assert_audit_tool_failure · method · L967-L978 — def _assert_audit_tool_failure(self, out: dict[str, Any], expected_tag: str) -> None
- test_timeout_error_becomes_retrieval_timeout · method · L980-L984 — def test_timeout_error_becomes_retrieval_timeout(self) -> None
- retrieve_fn · function · L981-L982 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_connection_error_becomes_retrieval_network_error · method · L986-L990 — def test_connection_error_becomes_retrieval_network_error(self) -> None
- retrieve_fn · function · L987-L988 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_generic_exception_becomes_retrieval_api_error · method · L992-L996 — def test_generic_exception_becomes_retrieval_api_error(self) -> None
- retrieve_fn · function · L993-L994 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_malformed_return_non_dict · method · L998-L1002 — def test_malformed_return_non_dict(self) -> None
- retrieve_fn · function · L999-L1000 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_malformed_return_missing_ref_retrieval_method · method · L1004-L1008 — def test_malformed_return_missing_ref_retrieval_method(self) -> None
- retrieve_fn · function · L1005-L1006 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_malformed_return_unknown_method · method · L1010-L1014 — def test_malformed_return_unknown_method(self) -> None
- retrieve_fn · function · L1011-L1012 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_malformed_return_non_string_method · method · L1016-L1023 — def test_malformed_return_non_string_method(self) -> None: # Step 13 R8 codex P2-4: ref_retrieval_method as a list raises # TypeError on set membership outside the translation boundary; # must surface as retrieval_api_error → audit_tool_failure.
- retrieve_fn · function · L1020-L1021 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_api_method_without_excerpt_rejected · method · L1025-L1031 — def test_api_method_without_excerpt_rejected(self) -> None: # Step 13 R3 codex P2 #3 — api with empty excerpt would let the judge # mark SUPPORTED with no source text.
- retrieve_fn · function · L1028-L1029 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- test_manual_pdf_with_none_excerpt_rejected · method · L1033-L1037 — def test_manual_pdf_with_none_excerpt_rejected(self) -> None
- retrieve_fn · function · L1034-L1035 — def retrieve_fn(_c: dict[str, Any]) -> dict[str, Any]
- TP21UncitedClaimLevelNC · class · L1055-L1109 — class TP21UncitedClaimLevelNC(_PipelineTestBase)
- test_nc_c_included_when_sentence_binds_claim_id · method · L1063-L1109 — def test_nc_c_included_when_sentence_binds_claim_id(self) -> None
- judge_fn · function · L1089-L1096 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- TP22DuplicateMNCIdAcrossManifests · class · L1112-L1161 — class TP22DuplicateMNCIdAcrossManifests(_PipelineTestBase)
- test_violation_attributed_to_correct_manifest · method · L1119-L1161 — def test_violation_attributed_to_correct_manifest(self) -> None
- judge_fn · function · L1136-L1145 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- TP20UncitedSentenceWithoutScope · class · L1164-L1250 — class TP20UncitedSentenceWithoutScope(_PipelineTestBase)
- test_uncited_sentence_no_scope_triggers_mnc_judge · method · L1177-L1211 — def test_uncited_sentence_no_scope_triggers_mnc_judge(self) -> None
- test_caller_provided_scope_restricts_mnc_set · method · L1213-L1250 — def test_caller_provided_scope_restricts_mnc_set(self) -> None: # When the caller pins scoped_manifest_id, only that manifest's MNCs # apply (cross-manifest leakage prevented).
- judge_fn · function · L1234-L1237 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- TP19ConstraintAbsorptionFullManifestScope · class · L1253-L1374 — class TP19ConstraintAbsorptionFullManifestScope(_PipelineTestBase)
- test_drifted_claim_id_in_same_manifest_as_violation_absorbed · method · L1264-L1321 — def test_drifted_claim_id_in_same_manifest_as_violation_absorbed(self) -> None
- judge_fn · function · L1295-L1303 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_drift_in_other_manifest_not_absorbed_by_violation_in_first · method · L1323-L1374 — def test_drift_in_other_manifest_not_absorbed_by_violation_in_first(self) -> None: # Cross-manifest absorption is forbidden — manifest A violation MUST # NOT silence drift in manifest B.
- judge_fn · function · L1350-L1358 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- TP18ManifestMissingNoSpuriousDrift · class · L1377-L1420 — class TP18ManifestMissingNoSpuriousDrift(_PipelineTestBase)
- test_no_manifest_no_drift_rows · method · L1385-L1408 — def test_no_manifest_no_drift_rows(self) -> None
- test_manifest_present_but_empty_claims_no_drift · method · L1410-L1420 — def test_manifest_present_but_empty_claims_no_drift(self) -> None: # A manifest with zero claims is equivalent to no baseline; drift # detection should still short-circuit.
- TP17ManifestMissingSentinelFallback · class · L1423-L1455 — class TP17ManifestMissingSentinelFallback(_PipelineTestBase)
- test_citation_without_scoped_manifest_id_emits_sentinel_row · method · L1435-L1455 — def test_citation_without_scoped_manifest_id_emits_sentinel_row(self) -> None
- TP16UncitedStreamSplit · class · L1458-L1553 — class TP16UncitedStreamSplit(_PipelineTestBase)
- _build_manifest_with_mnc · method · L1461-L1470 — def _build_manifest_with_mnc(self) -> dict[str, Any]
- test_constraint_violation_outside_d4c_trigger_still_emitted · method · L1472-L1502 — def test_constraint_violation_outside_d4c_trigger_still_emitted(self) -> None: # Sentence violates MNC ("caused improvement") but lacks D4-c trigger # tokens (no quantifier, no "%", no "p<"). Pre-R4 the constraint stream # would never see it.
- test_d4c_positive_emits_both_streams · method · L1504-L1526 — def test_d4c_positive_emits_both_streams(self) -> None: # Sentence is BOTH D4-c-positive AND violates MNC → both rows emit # (CV-INV-4 explicitly permits the dual presence).
- test_backwards_compat_when_all_uncited_omitted · method · L1528-L1553 — def test_backwards_compat_when_all_uncited_omitted(self) -> None: # Legacy caller passes only uncited_sentences (the D4-c subset). The # pipeline falls back to using that subset for stream (d) too — the # constraint check is narrower than the R4 expansion, but the API # surface still works.
- TP15CacheCorruption · class · L1563-L1614 — class TP15CacheCorruption(_PipelineTestBase)
- test_missing_judgment_key_in_cache · method · L1566-L1596 — def test_missing_judgment_key_in_cache(self) -> None: # Pre-seed cache with a malformed entry that lacks
judgment.
- judge_fn · function · L1572-L1574 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_unknown_judgment_in_cache · method · L1598-L1614 — def test_unknown_judgment_in_cache(self) -> None
- judge_fn · function · L1601-L1602 — def judge_fn(**_kw: Any) -> dict[str, Any]
- TP13EmittedNotIntendedDedupe · class · L1617-L1692 — class TP13EmittedNotIntendedDedupe(_PipelineTestBase)
- test_intended_not_emitted_text_match_under_renumbered_claim_id · method · L1620-L1653 — def test_intended_not_emitted_text_match_under_renumbered_claim_id(self) -> None: # Step 13 R2 codex P2: when the draft carries the manifest claim_text # but under a different claim_id (claim_id was renumbered), the # INTENDED_NOT_EMITTED side MUST use the same set-of-text semantics # as the EMITTED_NOT_INTENDED side. Otherwise a benign renumbering # produces false LOW-WARN drift findings.
- test_two_refs_one_drift · method · L1655-L1692 — def test_two_refs_one_drift(self) -> None: # Manifest pre-commits to C-001 only; the drafter emits a different # claim_text twice, once per citation marker (typical for a sentence # like "X is correlated with Y (Ref1, Ref2)" where the drafter chose # not to add this claim to the manifest).
- TP23UncitedJudgeOutageEmitsUAF · class · L1703-L1946 — class TP23UncitedJudgeOutageEmitsUAF(_PipelineTestBase)
- _manifest_with_mnc · method · L1706-L1709 — def _manifest_with_mnc(self) -> dict[str, Any]
- test_uncited_judge_timeout_emits_uaf · method · L1711-L1758 — def test_uncited_judge_timeout_emits_uaf(self) -> None: # judge_fn raises a raw TimeoutError; _invoke_judge maps it to # JudgeInvocationError("judge_timeout", ...) per the exception # translation layer at scripts/claim_audit_pipeline.py:_invoke_judge.
- failing_judge · function · L1715-L1716 — def failing_judge(**_kw: Any) -> dict[str, Any]
- test_uncited_judge_outage_no_audit_abort · method · L1760-L1794 — def test_uncited_judge_outage_no_audit_abort(self) -> None: # Coverage preservation: an outage on one sentence MUST NOT abort the # whole audit. With 3 sentences + judge that fails on the second, we # expect: rows for sentence 1, UAF for sentence 2, rows for sentence # 3 unaffected. ConnectionError → judge_api_error per _invoke_judge's # generic Exception translation branch.
- selectively_failing_judge · function · L1768-L1772 — def selectively_failing_judge(**kw: Any) -> dict[str, Any]
- test_uncited_judge_outage_nc_path_carries_manifest_claim_id · method · L1796-L1835 — def test_uncited_judge_outage_nc_path_carries_manifest_claim_id(self) -> None: # When the sentence is bound to a manifest claim (NC-C path), the UAF # row MUST carry the manifest_claim_id so the failure can be traced # back to which (manifest, claim) constraint set was being judged. # ValueError → judge_parse_error per _invoke_judge translation.
- failing_judge · function · L1801-L1802 — def failing_judge(**_kw: Any) -> dict[str, Any]
- test_uaf_multi_manifest_claim_id_polarity · method · L1837-L1901 — def test_uaf_multi_manifest_claim_id_polarity(self) -> None: # Codex cross-model review P2-2 (2026-05-17): when sentence carries # manifest_claim_id but is judged against MULTIPLE manifests (no # scoped_manifest_id pin), the UAF row's manifest_claim_id must # ONLY be set when the current (mid) actually owns the claim # binding. Without this guard, a UAF row would inherit a claim_id # that doesn't exist in this manifest's claims[], failing UAF-INV-3.
- failing_judge · function · L1844-L1845 — def failing_judge(**_kw: Any) -> dict[str, Any]
- test_uaf_mnc_only_claim_stays_null_manifest_claim_id · method · L1903-L1946 — def test_uaf_mnc_only_claim_stays_null_manifest_claim_id(self) -> None: # Codex R2 P2-1 (2026-05-17): when sentence binds to a claim that # exists in the manifest but the claim has NO negative_constraints, # the judge call is MNC-only and the UAF row's manifest_claim_id # MUST stay null. Pre-R2 fix would set manifest_claim_id to the # sentence's claim_id any time the claim resolved, conflating # MNC-only outages with NC-C outages for downstream consumers.
- failing_judge · function · L1910-L1911 — def failing_judge(**_kw: Any) -> dict[str, Any]
- TP24PartialDecomposition · class · L1949-L2140 — class TP24PartialDecomposition(_PipelineTestBase)
- test_partial_normalizes_to_unsupported_source_description · method · L1960-L1967 — def test_partial_normalizes_to_unsupported_source_description(self) -> None
- test_partial_copies_breakdown_onto_row · method · L1969-L1976 — def test_partial_copies_breakdown_onto_row(self) -> None
- test_partial_row_passes_schema_and_inv19 · method · L1978-L1985 — def test_partial_row_passes_schema_and_inv19(self) -> None: # The emitted row must satisfy BOTH the schema and the INV-19 lint — # this is the end-to-end binding the prior layer-isolated tests missed.
- test_supported_row_has_no_breakdown · method · L1987-L1990 — def test_supported_row_has_no_breakdown(self) -> None: # Non-PARTIAL rows must NOT carry sub_claim_breakdown (presence is the signal).
- test_malformed_partial_routes_to_judge_parse_error_not_bare_unsupported · method · L1992-L2012 — def test_malformed_partial_routes_to_judge_parse_error_not_bare_unsupported(self) -> None: # A malformed PARTIAL (here: all-SUPPORTED, not true-partial) must NOT # silently become a bare UNSUPPORTED. It routes to the judge_parse_error # inconclusive triple (the only contract-valid path) — ship-gate review finding.
- test_malformed_partial_item_missing_sub_claim_text_routes_inconclusive · method · L2014-L2030 — def test_malformed_partial_item_missing_sub_claim_text_routes_inconclusive(self) -> None: # Ship-gate round-2: an item that passes the verdict-MIX gate but lacks a # sub_claim_text would, if copied onto a completed row, emit # sub_claim_text=None (schema-invalid). It MUST take the judge_parse_error # path instead. This is the item-shape half of is_emittable_partial_breakdown.
- test_malformed_partial_item_empty_sub_claim_text_routes_inconclusive · method · L2032-L2040 — def test_malformed_partial_item_empty_sub_claim_text_routes_inconclusive(self) -> None
- test_malformed_partial_item_wrong_evidence_pointer_type_routes_inconclusive · method · L2042-L2058 — def test_malformed_partial_item_wrong_evidence_pointer_type_routes_inconclusive(self) -> None: # Ship-gate round-3: the runtime COPIES evidence_pointer onto the row, so a # wrong-typed one (a number) would emit a schema-invalid completed row. It # MUST route to judge_parse_error instead (the evidence_pointer-type half of # is_emittable_partial_breakdown).
- test_partial_with_null_evidence_pointer_emits_valid_row · method · L2060-L2070 — def test_partial_with_null_evidence_pointer_emits_valid_row(self) -> None: # A genuine PARTIAL with str + null evidence_pointers is emittable + lint-clean.
- test_malformed_partial_single_item_also_routes_inconclusive · method · L2072-L2079 — def test_malformed_partial_single_item_also_routes_inconclusive(self) -> None
- test_malformed_partial_row_passes_lint · method · L2081-L2089 — def test_malformed_partial_row_passes_lint(self) -> None: # The fallback inconclusive row must itself be lint-clean.
- test_malformed_partial_with_oversized_text_emits_schema_valid_row · method · L2091-L2120 — def test_malformed_partial_with_oversized_text_emits_schema_valid_row(self) -> None: # #355 P2#3: the malformed-PARTIAL fallback embeds the offending # breakdown's repr in the rationale. A >1000-char sub_claim_text is # itself a malformed trigger (is_emittable rejects len>1000), so its repr # alone overflows the rationale maxLength=2000 and the "clean inconclusive" # fallback row becomes schema-INVALID. The row MUST satisfy the schema. # 1700-char text overflows the rationale (measured: 2017 chars > 2000). # A judge is an LLM with no pre-emission length guarantee, so an # over-long claim or an over-decomposed breakdown is a real malformed # input — not a synthetic edge.
- test_malformed_partial_short_breakdown_fallback_is_schema_valid · method · L2122-L2140 — def test_malformed_partial_short_breakdown_fallback_is_schema_valid(self) -> None: # Regression guard: the existing short-breakdown malformed paths # (single-item, all-SUPPORTED) must STILL emit schema-valid rows after # the #355 P2#3 truncation fix — i.e. the bound must not drop the # fault-class tag or mangle short messages that never needed truncating.
- TP360JudgeRationaleBoundOnSuccessPath · class · L2143-L2237 — class TP360JudgeRationaleBoundOnSuccessPath(_PipelineTestBase)
- test_completed_row_clamps_overlong_judge_rationale · method · L2155-L2177 — def test_completed_row_clamps_overlong_judge_rationale(self) -> None: # SUPPORTED verdict → _judge_result_entry completed row (pipeline line 558).
- judge_fn · function · L2157-L2158 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_completed_row_keeps_short_rationale_verbatim · method · L2179-L2188 — def test_completed_row_keeps_short_rationale_verbatim(self) -> None: # Regression guard: a short rationale that never needed truncating must # pass through unchanged (the bound must not mangle the common case).
- judge_fn · function · L2182-L2183 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_constraint_violation_row_clamps_overlong_judge_rationale · method · L2190-L2237 — def test_constraint_violation_row_clamps_overlong_judge_rationale(self) -> None: # VIOLATED uncited claim → _constraint_violation_entry (pipeline line 644).
- judge_fn · function · L2208-L2213 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- TP360NonStringJudgeRationale · class · L2240-L2289 — class TP360NonStringJudgeRationale(_PipelineTestBase)
- test_completed_row_null_rationale_falls_back_to_placeholder · method · L2248-L2256 — def test_completed_row_null_rationale_falls_back_to_placeholder(self) -> None
- judge_fn · function · L2249-L2250 — def judge_fn(**kwargs: Any) -> dict[str, Any]
- test_constraint_violation_null_rationale_falls_back_to_default · method · L2258-L2289 — def test_constraint_violation_null_rationale_falls_back_to_default(self) -> None
- judge_fn · function · L2272-L2273 — def judge_fn(**kwargs: Any) -> dict[str, Any]