docs(plan): measure which watch probe answers each catalog and freeze the seven gaps
Row 1: 12 of 16 register entries answer through an existing probe class of the reused edition watch (positive control 4 of 4); unicode and rfc-3986 need a host on its list, the commons repository is private, and the Dual LLM post has no edition. Row 2: the seven documented gaps are frozen in gaps-frozen.tsv and held by tests/test_gap_register.py. docs/gap-sweep.py measures the cheapest rule per gap on the three false-positive corpora and the pinned OKF corpus before anything is built: gaps 4, 1 and 6 are closable without new alarms; 2, 3, 5 and 7 get measured reasons.
This commit is contained in:
parent
136d9311e5
commit
0ed305e979
5 changed files with 452 additions and 2 deletions
|
|
@ -289,7 +289,21 @@ def test_redos_sweep_collector_walks_a_dict_of_patterns():
|
|||
assert f"_PROSE_CLASSES[{klass!r}]" in paths
|
||||
|
||||
|
||||
# --- both scripts: the argument-less contract --------------------------------
|
||||
# --- gap sweep: its positive controls are the contract -------------------------
|
||||
|
||||
|
||||
def test_gap_sweep_rules_fire_on_their_own_gap_text():
|
||||
# The sweep's numbers mean nothing if a rule cannot fire at all: each rule
|
||||
# must fire on its gap's matrix text (rule 4 reports surface, since a count
|
||||
# never reaches the disposition). This also pins the private names it reads.
|
||||
gs = _load("gap-sweep.py")
|
||||
for name, texts in gs.POSITIVE.items():
|
||||
for text in texts:
|
||||
surface, fires = gs.RULES[name](text, gs.scan_output(text, source=gs.Source.OUTPUT).findings)
|
||||
assert (surface if name == "4-count" else fires), (name, text[:40])
|
||||
|
||||
|
||||
# --- every script: the argument-less contract --------------------------------
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
@ -297,6 +311,7 @@ def test_redos_sweep_collector_walks_a_dict_of_patterns():
|
|||
[
|
||||
("fp-sweep.py", "POPULATIONS ARE NEVER SUMMED"),
|
||||
("rawhtml-census.py", "TWO METHOD TRAPS IT EXISTS TO AVOID"),
|
||||
("gap-sweep.py", "POSITIVE CONTROLS RUN FIRST"),
|
||||
],
|
||||
)
|
||||
def test_script_run_without_arguments_refuses_and_prints_its_usage(script, marker):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue