← Về thư mục
scripts/test_claim_audit_schema.py
- supported_entry · function · L64-L81 — def supported_entry() -> dict[str, Any]
- manifest_entry · function · L84-L108 — def manifest_entry( manifest_id: str = MANIFEST_ID, *, emitted_by: str = "synthesis_agent", claims: list[dict[str, Any]] | None = None, mncs: list[dict[str, str]] | None = None, ) -> dict[str, Any]
- uncited_assertion_entry · function · L111-L120 — def uncited_assertion_entry() -> dict[str, Any]
- claim_drift_entry · function · L123-L139 — def claim_drift_entry(*, drift_kind: str = "EMITTED_NOT_INTENDED") -> dict[str, Any]
- constraint_violation_entry · function · L142-L160 — def constraint_violation_entry( *, constraint_id: str = "MNC-1", manifest_claim_id: str | None = None, ) -> dict[str, Any]
- sampling_summary_entry · function · L163-L178 — def sampling_summary_entry( *, total: int = 150, cap: int = 100, ) -> dict[str, Any]
- uncited_audit_failure_entry · function · L181-L199 — def uncited_audit_failure_entry( *, finding_id: str = "UAF-001", fault_class: str = "judge_timeout", manifest_claim_id: str | None = None, ) -> dict[str, Any]
- build_passport · function · L202-L221 — def build_passport( *, manifests: list[dict[str, Any]] | None = None, results: list[dict[str, Any]] | None = None, uncited: list[dict[str, Any]] | None = None, drifts: list[dict[str, Any]] | None = None, violations: list[dict[str, Any]] | None = None, samplings: list[dict[str, Any]] | None = None, uaf: list[dict[str, Any]] | None = None, ) -> dict[str, Any]
- write_passport · function · L224-L227 — def write_passport(tmp: Path, body: dict[str, Any]) -> Path
- run_lint · function · L230-L238 — def run_lint(passport: Path) -> tuple[int, str, str]
- TS1ValidMinimalEntry · class · L246-L304 — class TS1ValidMinimalEntry(unittest.TestCase)
- test_supported_entry_validates · method · L249-L253 — def test_supported_entry_validates(self) -> None
- test_all_five_schemas_parse_as_draft_2020_12 · method · L255-L258 — def test_all_five_schemas_parse_as_draft_2020_12(self) -> None
- test_subclaim_breakdown_optional_field_validates · method · L260-L280 — def test_subclaim_breakdown_optional_field_validates(self) -> None
- test_subclaim_breakdown_rejects_unknown_subfield · method · L282-L304 — def test_subclaim_breakdown_rejects_unknown_subfield(self) -> None
- _LintTestBase · class · L312-L353 — class _LintTestBase(unittest.TestCase)
- setUp · method · L313-L319 — def setUp(self) -> None: # Each test owns its tmpdir so concurrent unittest runners don't collide.
- assertLintFinds · method · L321-L337 — def assertLintFinds( self, passport_body: dict[str, Any], *, invariant: str, msg: str | None = None, ) -> tuple[int, str]
- assertLintClean · method · L339-L353 — def assertLintClean( self, passport_body: dict[str, Any], *, msg: str | None = None, ) -> None
- TS2ClaimAuditInvariants · class · L362-L660 — class TS2ClaimAuditInvariants(_LintTestBase)
- test_inv_baseline_positive · method · L366-L367 — def test_inv_baseline_positive(self) -> None
- test_inv_1_supported_with_non_null_defect · method · L370-L374 — def test_inv_1_supported_with_non_null_defect(self) -> None: # INV-1: SUPPORTED -> defect_stage=null AND violated_constraint_id=null
- test_inv_2_unsupported_with_null_defect · method · L376-L382 — def test_inv_2_unsupported_with_null_defect(self) -> None: # INV-2: UNSUPPORTED -> defect_stage != null
- test_inv_3_ambiguous_with_disallowed_defect · method · L384-L389 — def test_inv_3_ambiguous_with_disallowed_defect(self) -> None: # INV-3: AMBIGUOUS -> defect_stage NOT in {metadata, negative_constraint_violation}
- test_inv_4_retrieval_failed_inconclusive_wrong_defect · method · L391-L398 — def test_inv_4_retrieval_failed_inconclusive_wrong_defect(self) -> None: # INV-4: RETRIEVAL_FAILED + inconclusive -> defect_stage=not_applicable
- test_inv_5_retrieval_failed_completed_wrong_defect · method · L400-L407 — def test_inv_5_retrieval_failed_completed_wrong_defect(self) -> None: # INV-5: RETRIEVAL_FAILED + completed -> defect_stage=retrieval_existence
- test_inv_6_anchor_none_without_rationale_prefix · method · L409-L419 — def test_inv_6_anchor_none_without_rationale_prefix(self) -> None: # INV-6: anchor_kind=none -> rationale starts with the canonical prefix
- test_inv_6_anchor_none_with_non_empty_anchor_value · method · L421-L436 — def test_inv_6_anchor_none_with_non_empty_anchor_value(self) -> None: # INV-6: anchor_kind=none MUST carry empty sentinel anchor_value. # A stale residual value (e.g. "123") violates the schema contract. # Step 13 R1 Gemini finding (a832d3f).
- test_inv_7_constraint_violation_without_violated_id · method · L438-L445 — def test_inv_7_constraint_violation_without_violated_id(self) -> None: # INV-7: negative_constraint_violation -> violated_constraint_id != null
- test_inv_8_constraint_violation_wrong_judgment · method · L447-L455 — def test_inv_8_constraint_violation_wrong_judgment(self) -> None: # INV-8: negative_constraint_violation -> judgment=UNSUPPORTED
- test_inv_9_dispute_on_not_applicable · method · L457-L466 — def test_inv_9_dispute_on_not_applicable(self) -> None: # INV-9: upstream_dispute != null -> defect_stage NOT in {null, not_applicable}
- test_inv_10_failed_method_wrong_state · method · L468-L473 — def test_inv_10_failed_method_wrong_state(self) -> None: # INV-10: ref_retrieval_method=failed -> RETRIEVAL_FAILED + inconclusive + not_applicable
- test_inv_11_not_attempted_without_anchor_none · method · L475-L480 — def test_inv_11_not_attempted_without_anchor_none(self) -> None: # INV-11: ref_retrieval_method=not_attempted iff anchor_kind=none
- test_inv_12_not_found_wrong_state · method · L482-L487 — def test_inv_12_not_found_wrong_state(self) -> None: # INV-12: ref_retrieval_method=not_found iff fabricated-reference triple
- test_inv_13_metadata_wrong_method · method · L489-L496 — def test_inv_13_metadata_wrong_method(self) -> None: # INV-13: defect_stage=metadata -> ref_retrieval_method in {api, manual_pdf}
- test_inv_14_audit_tool_failure_without_fault_class_prefix · method · L498-L506 — def test_inv_14_audit_tool_failure_without_fault_class_prefix(self) -> None: # INV-14: ref_retrieval_method=audit_tool_failure -> rationale begins with fault-class tag
- test_inv_15_dangling_scoped_manifest_id · method · L508-L512 — def test_inv_15_dangling_scoped_manifest_id(self) -> None: # INV-15: (scoped_manifest_id, claim_id) must resolve in some manifest entry
- test_inv_15_sentinel_manifest_permitted · method · L514-L522 — def test_inv_15_sentinel_manifest_permitted(self) -> None: # INV-15 sentinel positive case — MANIFEST-MISSING fallback row.
- test_inv_16_empty_anchor_value_with_non_none_kind · method · L524-L528 — def test_inv_16_empty_anchor_value_with_non_none_kind(self) -> None: # INV-16: anchor_kind != none -> anchor_value non-empty after strip
- test_inv_16_url_encoded_whitespace_does_not_bypass · method · L530-L536 — def test_inv_16_url_encoded_whitespace_does_not_bypass(self) -> None: # INV-16: URL-encoded whitespace (%20, %09) must NOT bypass the firm # rule — docstring + schema both require non-empty after URL-decode. # Step 13 R1 Gemini finding (a832d3f).
- test_inv_16_url_encoded_non_whitespace_passes · method · L538-L543 — def test_inv_16_url_encoded_non_whitespace_passes(self) -> None: # INV-16: URL-encoded printable content must still satisfy the rule.
- test_inv_17_constraint_id_inner_hyphen_form · method · L545-L566 — def test_inv_17_constraint_id_inner_hyphen_form(self) -> None: # INV-17: NC-C{n}-{m} parse rule — NO inner hyphen between C and digits
- test_inv_18_inconclusive_not_applicable_wrong_method · method · L568-L576 — def test_inv_18_inconclusive_not_applicable_wrong_method(self) -> None: # INV-18: (RETRIEVAL_FAILED, inconclusive, not_applicable) -> method in # {not_attempted, failed, audit_tool_failure}.
api is forbidden.
- _partial_entry · method · L579-L589 — def _partial_entry(self) -> dict[str, Any]
- test_inv_19_valid_partial_breakdown_passes · method · L591-L593 — def test_inv_19_valid_partial_breakdown_passes(self) -> None: # INV-19 positive baseline: a true-partial row is clean.
- test_inv_19_breakdown_on_supported_row_flagged · method · L595-L602 — def test_inv_19_breakdown_on_supported_row_flagged(self) -> None: # INV-19: a sub_claim_breakdown on a non-UNSUPPORTED row is illegal.
- test_inv_19_breakdown_wrong_defect_stage_flagged · method · L604-L608 — def test_inv_19_breakdown_wrong_defect_stage_flagged(self) -> None: # INV-19: breakdown row must carry defect_stage=source_description.
- test_inv_19_all_unsupported_breakdown_flagged · method · L610-L617 — def test_inv_19_all_unsupported_breakdown_flagged(self) -> None: # INV-19: not true-partial — needs >=1 SUPPORTED (round-1 review #2).
- test_inv_19_all_supported_breakdown_flagged · method · L619-L626 — def test_inv_19_all_supported_breakdown_flagged(self) -> None: # INV-19: not true-partial — needs >=1 non-SUPPORTED.
- test_inv_19_single_item_breakdown_flagged · method · L628-L636 — def test_inv_19_single_item_breakdown_flagged(self) -> None: # INV-19: a decomposition with <2 items is not a true partial.
- test_inv_19_breakdown_on_ambiguous_row_flagged · method · L638-L647 — def test_inv_19_breakdown_on_ambiguous_row_flagged(self) -> None: # INV-19 judgment-pin isolation: AMBIGUOUS + completed + source_description # passes INV-3 AND is in ALLOWED_MATRIX, so the ONLY invariant that can # fire is INV-19's judgment check. This catches a partially-broken guard # that forgets the judgment pin but keeps the defect_stage pin — which the # SUPPORTED-row case can't catch (it also has defect_stage=None). # (round-2 review #3.)
- test_inv_19_missing_sub_verdict_not_counted_as_non_supported · method · L649-L660 — def test_inv_19_missing_sub_verdict_not_counted_as_non_supported(self) -> None: # INV-19 must NOT read a missing/out-of-enum sub_verdict as "non-SUPPORTED" # (round-2 review #1). [SUPPORTED, ] is NOT true-partial: it has no # valid non-SUPPORTED verdict. A guard using
v != "SUPPORTED" would wrongly # accept it. The schema also rejects the missing required key, but INV-19 must # independently flag the not-true-partial shape with its own tag.
- TS3AnchorNoneInv6 · class · L667-L694 — class TS3AnchorNoneInv6(_LintTestBase)
- _none_entry · method · L670-L679 — def _none_entry(self) -> dict[str, Any]
- test_anchor_none_positive_baseline · method · L681-L683 — def test_anchor_none_positive_baseline(self) -> None: # Canonical INV-6 compliant row should pass.
- test_anchor_none_missing_rationale_prefix · method · L685-L688 — def test_anchor_none_missing_rationale_prefix(self) -> None
- test_anchor_none_wrong_retrieval_method · method · L690-L694 — def test_anchor_none_wrong_retrieval_method(self) -> None
- TS4ManifestInv1 · class · L701-L746 — class TS4ManifestInv1(_LintTestBase)
- test_duplicate_claim_id_within_one_manifest_rejected · method · L704-L724 — def test_duplicate_claim_id_within_one_manifest_rejected(self) -> None
- test_cross_manifest_claim_id_collision_permitted · method · L726-L735 — def test_cross_manifest_claim_id_collision_permitted(self) -> None
- test_m_inv_4_duplicate_manifest_id_across_passport_rejected · method · L737-L746 — def test_m_inv_4_duplicate_manifest_id_across_passport_rejected(self) -> None
- TS5ManifestInv2 · class · L753-L777 — class TS5ManifestInv2(_LintTestBase)
- test_dangling_claim_level_nc · method · L756-L777 — def test_dangling_claim_level_nc(self) -> None
- TS6ManifestInv3 · class · L784-L816 — class TS6ManifestInv3(_LintTestBase)
- test_claim_level_nc_collides_with_mnc_id · method · L787-L816 — def test_claim_level_nc_collides_with_mnc_id(self) -> None: # M-INV-3 — claim-level constraint reusing an MNC- id is the override # signature the lint must reject (claim level can ADD via fresh NC-C{n}-{m} # ids, never via re-using an MNC- id).
- TS7UncitedAssertionInvariants · class · L823-L873 — class TS7UncitedAssertionInvariants(_LintTestBase)
- test_u_baseline_positive · method · L826-L827 — def test_u_baseline_positive(self) -> None
- test_u_inv_1_duplicate_finding_id · method · L829-L835 — def test_u_inv_1_duplicate_finding_id(self) -> None
- test_u_inv_2_empty_trigger_tokens · method · L837-L844 — def test_u_inv_2_empty_trigger_tokens(self) -> None
- test_u_inv_3_wrong_rule_version · method · L846-L853 — def test_u_inv_3_wrong_rule_version(self) -> None
- test_u_inv_4_orphan_manifest_pointer · method · L855-L863 — def test_u_inv_4_orphan_manifest_pointer(self) -> None: # manifest_claim_id set without matching manifest entry -> U-INV-4
- test_u_inv_4_null_manifest_id_with_set_claim_id · method · L865-L873 — def test_u_inv_4_null_manifest_id_with_set_claim_id(self) -> None: # manifest_claim_id != null requires scoped_manifest_id != null.
- TS8AllowedMatrix · class · L882-L999 — class TS8AllowedMatrix(_LintTestBase)
- _build_row · method · L967-L981 — def _build_row(self, j: str, a: str, d: Any, overrides: dict[str, Any]) -> dict[str, Any]
- test_every_allowed_row_passes · method · L983-L990 — def test_every_allowed_row_passes(self) -> None
- test_disallowed_rows_rejected · method · L992-L999 — def test_disallowed_rows_rejected(self) -> None
- TSDDriftInvariants · class · L1007-L1055 — class TSDDriftInvariants(_LintTestBase)
- test_d_baseline_emitted_not_intended · method · L1010-L1011 — def test_d_baseline_emitted_not_intended(self) -> None
- test_d_baseline_intended_not_emitted · method · L1013-L1015 — def test_d_baseline_intended_not_emitted(self) -> None
- test_d_inv_1_duplicate_finding_id · method · L1017-L1020 — def test_d_inv_1_duplicate_finding_id(self) -> None
- test_d_inv_2_intended_not_emitted_missing_manifest_pointer · method · L1022-L1026 — def test_d_inv_2_intended_not_emitted_missing_manifest_pointer(self) -> None
- test_d_inv_2_emitted_not_intended_with_manifest_pointer · method · L1028-L1032 — def test_d_inv_2_emitted_not_intended_with_manifest_pointer(self) -> None
- test_d_inv_2_dangling_intended_not_emitted_pair · method · L1034-L1038 — def test_d_inv_2_dangling_intended_not_emitted_pair(self) -> None
- test_d_inv_3_wrong_rule_version · method · L1040-L1043 — def test_d_inv_3_wrong_rule_version(self) -> None
- test_d_inv_4_uncited_and_drift_collision · method · L1045-L1055 — def test_d_inv_4_uncited_and_drift_collision(self) -> None: # A single sentence appears in both uncited_assertions[] and claim_drifts[].
- TSCVConstraintViolationInvariants · class · L1062-L1164 — class TSCVConstraintViolationInvariants(_LintTestBase)
- _manifest_with_mnc_and_nc · method · L1065-L1082 — def _manifest_with_mnc_and_nc(self) -> dict[str, Any]
- test_cv_baseline_mnc_violation · method · L1084-L1089 — def test_cv_baseline_mnc_violation(self) -> None
- test_cv_baseline_nc_violation · method · L1091-L1101 — def test_cv_baseline_nc_violation(self) -> None
- test_cv_inv_1_duplicate_finding_id · method · L1103-L1110 — def test_cv_inv_1_duplicate_finding_id(self) -> None
- test_cv_inv_2_dangling_mnc · method · L1112-L1117 — def test_cv_inv_2_dangling_mnc(self) -> None
- test_cv_inv_2_dangling_nc · method · L1119-L1129 — def test_cv_inv_2_dangling_nc(self) -> None
- test_cv_inv_3_mnc_with_set_manifest_claim_id · method · L1131-L1141 — def test_cv_inv_3_mnc_with_set_manifest_claim_id(self) -> None
- test_cv_inv_3_nc_polarity_mismatch · method · L1143-L1153 — def test_cv_inv_3_nc_polarity_mismatch(self) -> None
- test_cv_inv_4_duplicate_per_constraint · method · L1155-L1164 — def test_cv_inv_4_duplicate_per_constraint(self) -> None: # Two violations for (same sentence, same constraint) -> dedup rule.
- TSCVDedupeManifestScope · class · L1176-L1223 — class TSCVDedupeManifestScope(_LintTestBase)
- _two_manifests_with_colliding_mnc · method · L1179-L1194 — def _two_manifests_with_colliding_mnc(self) -> list[dict[str, Any]]: # Two manifests each carrying the SAME constraint_id "MNC-1" but # bound to different manifests (M-INV-4 permits — manifest_id is # the joinable scope). Schema requires claims[] non-empty so we # add a minimal claim to each manifest; the claim itself is not # under test.
- test_same_constraint_id_across_manifests_not_deduped · method · L1196-L1211 — def test_same_constraint_id_across_manifests_not_deduped(self) -> None: # Two CV rows on the same sentence text + same constraint_id (MNC-1) # but DIFFERENT scoped_manifest_id. Legitimate per M-INV-4 + # manifest_negative_constraints scoping — dedupe must keep both.
- test_same_constraint_id_same_manifest_still_deduped · method · L1213-L1223 — def test_same_constraint_id_same_manifest_still_deduped(self) -> None: # Negative test: dedupe still catches true within-manifest duplicates.
- TSSamplingInvariants · class · L1230-L1263 — class TSSamplingInvariants(_LintTestBase)
- test_s_baseline · method · L1233-L1234 — def test_s_baseline(self) -> None
- test_s_inv_1_count_vs_indices_mismatch · method · L1236-L1239 — def test_s_inv_1_count_vs_indices_mismatch(self) -> None
- test_s_inv_2_count_exceeds_cap · method · L1241-L1245 — def test_s_inv_2_count_exceeds_cap(self) -> None
- test_s_inv_2_count_exceeds_total · method · L1247-L1251 — def test_s_inv_2_count_exceeds_total(self) -> None
- test_s_inv_4_non_ascending_indices · method · L1253-L1257 — def test_s_inv_4_non_ascending_indices(self) -> None
- test_s_inv_4_duplicate_indices · method · L1259-L1263 — def test_s_inv_4_duplicate_indices(self) -> None
- TSUAFUncitedAuditFailureInvariants · class · L1272-L1523 — class TSUAFUncitedAuditFailureInvariants(_LintTestBase)
- _manifest_with_mnc_and_nc · method · L1275-L1292 — def _manifest_with_mnc_and_nc(self) -> dict[str, Any]
- test_uaf_schema_valid_minimal_entry · method · L1295-L1299 — def test_uaf_schema_valid_minimal_entry(self) -> None
- test_uaf_schema_fault_class_enum_matches_constants · method · L1301-L1327 — def test_uaf_schema_fault_class_enum_matches_constants(self) -> None
- test_uaf_schema_rejects_missing_fault_class · method · L1329-L1335 — def test_uaf_schema_rejects_missing_fault_class(self) -> None
- test_uaf_schema_rejects_unknown_fault_class · method · L1337-L1343 — def test_uaf_schema_rejects_unknown_fault_class(self) -> None
- test_uaf_baseline_mnc_failure · method · L1346-L1351 — def test_uaf_baseline_mnc_failure(self) -> None
- test_uaf_baseline_nc_failure · method · L1353-L1359 — def test_uaf_baseline_nc_failure(self) -> None: # NC-C path: judge failed on a claim-level constraint check; manifest_claim_id set.
- test_uaf_inv_1_duplicate_finding_id · method · L1362-L1374 — def test_uaf_inv_1_duplicate_finding_id(self) -> None
- test_uaf_inv_2_dangling_manifest_id · method · L1377-L1384 — def test_uaf_inv_2_dangling_manifest_id(self) -> None
- test_uaf_inv_3_dangling_claim_id · method · L1387-L1393 — def test_uaf_inv_3_dangling_claim_id(self) -> None
- test_uaf_inv_3_null_claim_id_allowed_when_mnc_only · method · L1395-L1401 — def test_uaf_inv_3_null_claim_id_allowed_when_mnc_only(self) -> None: # manifest_claim_id=null is legitimate when the failure was against MNCs only.
- test_uaf_inv_4_same_sentence_same_manifest_dup · method · L1404-L1412 — def test_uaf_inv_4_same_sentence_same_manifest_dup(self) -> None
- test_uaf_inv_4_same_sentence_different_manifests_not_deduped · method · L1414-L1429 — def test_uaf_inv_4_same_sentence_different_manifests_not_deduped(self) -> None: # Two manifests both failing on the same sentence text emit two rows # legitimately (mirrors CV-INV-4 cross-manifest reasoning).
- test_uaf_inv_5_rationale_missing_fault_prefix · method · L1432-L1439 — def test_uaf_inv_5_rationale_missing_fault_prefix(self) -> None
- test_uaf_inv_5_rationale_wrong_fault_prefix · method · L1441-L1453 — def test_uaf_inv_5_rationale_wrong_fault_prefix(self) -> None: # Rationale starts with "made_up_class:" — schema rejected via fault_class # enum, but UAF-INV-5 also flags rationale prefix mismatch independently. # Here we keep fault_class valid but flip rationale to a different valid # tag — should still trip UAF-INV-5 (prefix must match the row's # fault_class, not just any known tag).
- test_uaf_cross_aggregate_exclusive_with_cv · method · L1456-L1466 — def test_uaf_cross_aggregate_exclusive_with_cv(self) -> None: # Same (sentence, manifest) MUST NOT have both an audit_tool_failure (UAF) # and a VIOLATED row (CV). They are mutually exclusive verdict states.
- test_uaf_malformed_manifest_claim_id_does_not_crash_lint · method · L1469-L1490 — def test_uaf_malformed_manifest_claim_id_does_not_crash_lint(self) -> None: # Schema validator flags type errors separately; lint walker must # skip cleanly on unhashable values rather than raise TypeError.
- test_uaf_malformed_rationale_does_not_crash_lint · method · L1492-L1510 — def test_uaf_malformed_rationale_does_not_crash_lint(self) -> None
- test_uaf_coexists_with_uncited_assertion · method · L1513-L1523 — def test_uaf_coexists_with_uncited_assertion(self) -> None: # D4-c detector positive (UA) + judge failure (UAF) on the same sentence # are independent signals; cross-aggregate exclusivity does NOT apply.
- TS9MalformedPassportGuard · class · L1534-L1740 — class TS9MalformedPassportGuard(_LintTestBase)
- test_claim_audit_results_with_non_dict_entry · method · L1537-L1554 — def test_claim_audit_results_with_non_dict_entry(self) -> None: # Pre-R4: list of non-dict in claim_audit_results raised AttributeError # because dict-only invariant loops ran .get() before noticing the shape.
- test_claim_intent_manifests_as_dict_instead_of_list · method · L1556-L1563 — def test_claim_intent_manifests_as_dict_instead_of_list(self) -> None
- test_non_object_passport_body_yields_clean_finding · method · L1565-L1584 — def test_non_object_passport_body_yields_clean_finding(self) -> None: # Step 13 R7 codex P3:
[], null, scalar top-level JSON would # previously crash with AttributeError on .get(). Validate that # each surfaces as a schema finding without traceback.
- test_falsey_malformed_aggregate_does_not_bypass_schema · method · L1586-L1603 — def test_falsey_malformed_aggregate_does_not_bypass_schema(self) -> None: # Step 13 R5 codex P2 #1:
body.get(k, []) or [] would silently # convert a malformed {} / null / 0 / "" value to an empty # list and skip schema validation. Each falsey-but-malformed shape # must surface as a schema finding.
- test_manifest_claims_as_string_does_not_crash_invariant_walker · method · L1610-L1621 — def test_manifest_claims_as_string_does_not_crash_invariant_walker(self) -> None: # #119 + #120 P2-2: claim_intent_manifests[0].claims is a string, # not a list. Schema validator records the finding; the cross-field # invariant walker (M-INV-1..M-INV-4) must NOT iterate the string # and crash. Expect clean exit=1 with schema finding, no traceback.
- test_manifest_claim_with_non_string_claim_id_does_not_crash · method · L1623-L1633 — def test_manifest_claim_with_non_string_claim_id_does_not_crash(self) -> None: # #119: manifest.claims[].claim_id is a non-string. Schema records # the type mismatch; invariant walker must skip this manifest's # cross-field checks instead of crashing on .get() / regex match.
- test_audited_indices_mixed_types_does_not_crash_sampling_walker · method · L1635-L1654 — def test_audited_indices_mixed_types_does_not_crash_sampling_walker(self) -> None: # #119: audit_sampling_summaries[].audited_indices contains mixed # str/int types. Schema records the type mismatch; S-INV-4 walker # (indices[i] <= indices[i-1]) must skip instead of raising # TypeError on '<=' between str and int.
- test_unhashable_claim_id_does_not_crash_m_inv_1 · method · L1660-L1671 — def test_unhashable_claim_id_does_not_crash_m_inv_1(self) -> None: # codex round 2 P2: claim.get("claim_id") returns a list/dict # (unhashable). M-INV-1 uniqueness
cid in claim_ids crashes with # TypeError. Schema records the type mismatch but the invariant walker # still raises, masking the schema findings.
- test_unhashable_finding_id_does_not_crash_cv_inv_1 · method · L1673-L1698 — def test_unhashable_finding_id_does_not_crash_cv_inv_1(self) -> None: # CV-INV-1 finding_id uniqueness
fid in seen crashes when finding_id # is a list / dict (schema-invalid). Same surface class as the M-INV-1 # case codex flagged; included for parity coverage across all four # finding_id uniqueness sites (M-INV-4 / U-INV-1 / D-INV-1 / CV-INV-1).
- test_unhashable_mnc_constraint_id_does_not_crash_m_inv_3 · method · L1700-L1713 — def test_unhashable_mnc_constraint_id_does_not_crash_m_inv_3(self) -> None: # codex round 3 P2: manifest_negative_constraints[].constraint_id as # list/dict crashes the
mnc_ids = {nc.get("constraint_id") for ...} # set comprehension when the implementation builds an (unused) set. # Schema records the type mismatch but the lint still raises.
- test_non_string_claim_text_does_not_crash_cv_inv_4_dedupe · method · L1715-L1740 — def test_non_string_claim_text_does_not_crash_cv_inv_4_dedupe(self) -> None: # CV-INV-4 dedupe key constructs hashlib.sha256((claim_text or "").encode()) # — if claim_text is a list / dict / int (schema-invalid), the
or "" # idiom passes the non-string through and .encode() raises AttributeError. # Codex round 2 adversarial probing surfaced this same class.
- TSManifestIdNonStringGuard · class · L1747-L1774 — class TSManifestIdNonStringGuard(_LintTestBase)
- test_manifest_id_as_list_does_not_crash · method · L1750-L1761 — def test_manifest_id_as_list_does_not_crash(self) -> None
- test_manifest_id_as_dict_does_not_crash · method · L1763-L1774 — def test_manifest_id_as_dict_does_not_crash(self) -> None