feat(output): report an instruction in plain prose
Session 7 of the 2026 threat plan (attack row 3): A08, A09, A12, A16 and A19 were red. Their payloads are ordinary English with no marker. - indirect:prose-instruction (MEDIUM): a paragraph that combines two of four classes: it speaks to the model, it is meant to act later, it writes to the model's memory, it hides from the user. One class alone is ordinary prose. A keyword prefilter skips text where no non-address class can match. Catches A08, A09, A16 and A19. - A12 (a task with no marker) is the seventh documented gap; a rule that caught it would be fitted to the payload's words. - redos-sweep walked no dicts, so the new class patterns were swept by nothing. It walks dicts now: 168 patterns, 0 flagged; positive control flagged at x4.0. Measured before building: 0 of 5494 benign documents fire (the three FP corpora, 577 package READMEs, 1412 vendor-published agent skills). Guard rule before/after: FP 106/198, 196/2918, 108/389 identical line for line; OKF import 47/31 identical. Matrix 144/144 + 7/7 gaps, suite 1233 passed. Row 3: 17 caught, 2 gaps, 0 open.
This commit is contained in:
parent
e7742dceba
commit
61ee8d3445
13 changed files with 497 additions and 29 deletions
|
|
@ -272,13 +272,21 @@ def test_redos_sweep_floor_and_flag_match_the_published_numbers():
|
|||
assert "2.6 flag threshold" in text
|
||||
|
||||
|
||||
def test_redos_sweep_collector_covers_163_patterns_across_11_tables():
|
||||
# The count docs/LIMITATIONS.md carries as "all 163 compiled patterns across
|
||||
def test_redos_sweep_collector_covers_168_patterns_across_11_tables():
|
||||
# The count docs/LIMITATIONS.md carries as "all 168 compiled patterns across
|
||||
# all eleven regex-bearing modules". A pattern added or removed in `src/`
|
||||
# without re-measuring would drift the doc's claim silently otherwise.
|
||||
assert len(redos_sweep.TABLES) == 11
|
||||
total = sum(len(collect()) for collect in redos_sweep.TABLES.values())
|
||||
assert total == 163
|
||||
assert total == 168
|
||||
|
||||
|
||||
def test_redos_sweep_collector_walks_a_dict_of_patterns():
|
||||
# 1.8.0: `output._PROSE_CLASSES` is a dict, and the walker skipped dicts, so
|
||||
# its four patterns were collected by nothing and swept by nothing.
|
||||
paths = {t.id for t in redos_sweep.TABLES["output"]()}
|
||||
for klass in ("address", "deferral", "memory", "concealment"):
|
||||
assert f"_PROSE_CLASSES[{klass!r}]" in paths
|
||||
|
||||
|
||||
# --- both scripts: the argument-less contract --------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue