← Về thư mục
scripts/test_check_v3_8_annotation_literal_sync.py
- AnnotationPrefixHelperTest · class · L35-L77 — class AnnotationPrefixHelperTest(unittest.TestCase)
- test_plain_closed_literal_keeps_closing_bracket · method · L36-L45 — def test_plain_closed_literal_keeps_closing_bracket(self) -> None: # Step 8 codex R2 P2-1 closure: closed literals require exact match # INCLUDING the closing bracket. Cutting at
] left the prefix without # the bracket, so a renamed formatter rule # [HIGH-WARN-FABRICATED-REFERENCE-RENAMED] would still satisfy the # check for finalizer literal [HIGH-WARN-FABRICATED-REFERENCE].
- test_interpolated_parenthesized_variable_cuts_at_space_paren · method · L47-L53 — def test_interpolated_parenthesized_variable_cuts_at_space_paren(self) -> None
- test_em_dash_contextual_suffix_cuts_at_space_emdash · method · L55-L61 — def test_em_dash_contextual_suffix_cuts_at_space_emdash(self) -> None
- test_interpolated_uncited_constraint_violation_prefix · method · L63-L69 — def test_interpolated_uncited_constraint_violation_prefix(self) -> None
- test_fabricated_reference_plain_literal · method · L71-L77 — def test_fabricated_reference_plain_literal(self) -> None: # Closed plain literal keeps the closing bracket for exact match # (Step 8 codex R2 P2-1 closure).
- RefuseBlockExtractorTest · class · L80-L114 — class RefuseBlockExtractorTest(unittest.TestCase)
- test_extracts_block_starting_at_refuse_marker · method · L83-L110 — def test_extracts_block_starting_at_refuse_marker(self) -> None
- test_returns_none_when_refuse_marker_absent · method · L112-L114 — def test_returns_none_when_refuse_marker_absent(self) -> None
- LintScriptTest · class · L117-L258 — class LintScriptTest(unittest.TestCase)
- test_lint_passes_on_current_repo_state · method · L118-L135 — def test_lint_passes_on_current_repo_state(self) -> None: # The lint MUST pass on the shipped repo — Step 8 commit cluster # closed the §3.6 + REFUSE list rules 6-10. A failure here means a # subsequent edit drifted the finalizer literals away from the # formatter prose without updating both sides.
- test_lint_detects_dynamic_literal_substring_match_attack · method · L137-L175 — def test_lint_detects_dynamic_literal_substring_match_attack(self) -> None: # Step 8 codex R3 P2 closure: interpolated/em-dash literals MUST # also require a boundary character following the token in formatter # prose, not raw substring match. A rename that appends text # (
[HIGH-WARN-NEGATIVE-CONSTRAINT-VIOLATION-RENAMED) would have # passed the R1/R2 lint via prefix-substring containment.
- test_lint_detects_closed_literal_substring_match_attack · method · L177-L217 — def test_lint_detects_closed_literal_substring_match_attack(self) -> None: # Step 8 codex R2 P2-1 closure: the lint MUST NOT pass when the # formatter prose contains a SUPERSTRING of the finalizer literal # (e.g. finalizer says
[HIGH-WARN-FABRICATED-REFERENCE] but # formatter REFUSE list was edited to [HIGH-WARN-FABRICATED- # REFERENCE-RENAMED]). The closing bracket is the contract # terminator for closed literals.
- test_lint_detects_renamed_constant_missing_from_formatter · method · L219-L258 — def test_lint_detects_renamed_constant_missing_from_formatter(self) -> None: # Simulate the canonical drift scenario: the finalizer renames an # existing HIGH-WARN constant's literal (e.g. CLAIM-NOT-SUPPORTED → # CLAIM-UNSUPPORTED) without coordinating with the formatter prose. # The lint MUST exit 1 and surface the renamed prefix as missing. # Renaming (not adding) keeps the count at 5 so the constant-count # gate doesn't fire first — the real failure mode is the literal- # match gate, which is what we want this test to pin.