Skip to content

Differential harness: no corpus contains a CJK name, so the fix(#271) rule never fires in a real run #295

Description

@derek73

tools/differential/ is the pre-release gate that diffs the v2 facade against pinned 1.4-from-PyPI, and docs/release_log.rst's Behavior Changes section names it as its source. It is currently structurally blind to 2.1's headline change: neither corpus contains a single CJK character.

The blindness is by construction, not accident:

Consequence: the fix(#271) rule in expected_changes.toml is pinned against _vocab._SCRIPT_RANGES by test_regex_sync.py and was verified against a throwaway synthetic corpus during #294, but classifies nothing in a real run. The behavioral guarantee currently lives in the 17 fix(#271) rows in tests/v2/cases.py.

The fix needs a provenance decision before any code, because the README deliberately forbids hand-authored corpora ("a corpus you have to ask for by name is a corpus that stops being run" cuts the other way here — compare.py globs corpus*.jsonl, so a new file would run automatically):

  1. Relax the generator's internal-space requirement for strings whose characters are wholly Han/Hangul, so tracker-harvested unspaced CJK names qualify for corpus_issues.jsonl. Keeps the harvested-provenance story; coverage depends on what the tracker happens to contain (Does not work for chinese name #83, Unspaced Chinese/Korean names: surnames constants + longest-match segmentation #271, and Japanese name segmentation via optional dependency (nameparser[ja]) #272 all carry native-script examples today).
  2. Sanction a third file (corpus_cjk.jsonl) with its own documented provenance — e.g. generated from the fix(#271) case-table rows, which are themselves reviewed. Deterministic coverage; adds a third provenance class to the README's table.

Either way, the acceptance test is the same: a real compare.py run in which the fix(#271) rule claims at least one name, so the rule can never again be dead-on-arrival without the run saying so (the failure mode #294 caught only by synthetic probe).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions