1
0
Fork 0
llm-ingestion-pipeline-secu.../tests
Kjell Tore Guttormsen 3e324a1f86 feat(okf): a flow sequence of plain scalars parses, and the corpus number is 6/53
`tags: [a, b, c]` is the form SPEC.md 4.1's own frontmatter skeleton writes out,
and 9/53 upstream reference concepts use it. It raised on the `[` indicator.
It parses now, to the same list its block-sequence sibling already produced.

The predicate is character-level, inside `_parse_flow_sequence`: an element is a
plain scalar only if it is non-empty and carries none of `{ } [ ] : , " ' #`,
and it then passes the unchanged scalar-indicator rule. Everything that would
need YAML semantics to split or unquote still raises - a quoted element (quotes
are retained here, never stripped), a colon or comma inside an element, a
sequence inside a sequence, an empty element, an anchor, an alias. A sequence
may not mix scalars and mappings, the rule the block list already carries, and
the mixing verdict is reached before the element is parsed so the caller is told
about the mix rather than about a key the allowlist would have named instead.
The 1.3.0 `sources` flow-mapping carrier is unchanged and pinned against
regression. Depth 1 is not spent: the elements are leaves.

Measured with the denominator, against the pinned corpus (`_okf-upstream` @
3fcbb9f, 53 non-reserved documents) and the pinned SPEC (`_okf-canonical` @
ad30107). Baseline reproduced first, with a known-positive control, at 0/53.
After: 6/53, all six in acme_retail. It does not close the corpus - 44/53 still
stop on `generated` written as a top-level block mapping, which spends the
no-nesting-past-depth-1 rule and is a security decision, out of scope here.

P1 alone, per the operator decision of 08.09. The two neighbouring predicates
were measured and deliberately not built: a flush-left block sequence and a
folded plain scalar release 0/53 each on their own, and stacked on this one they
still measure 6/53. `_consume_block_list`, the `description` continuation and
the allowlist are untouched.

docs/LIMITATIONS.md's tags/description entry is rewritten against the
measurement: three of its claims were wrong. The parser does have a
sequence-value type (since 1.3.0 - what it lacks is the indentation the corpus
omits); the figure is 6/53, not the 1.2.0-era 4/53; and tags/description are
not the residual that blocks the corpus. README gains the sequence carrier in
the paragraph that already describes the mapping one.

Self-safety: the predicate compiles no regex, so docs/redos-sweep.py cannot see
it. Measured instead on the CPU clock - linear in element length (exponent
0.86-0.99) and in element count (0.97-1.05) over four doublings to 800_000 -
and pinned by two bounds in tests/test_okf.py.

Six rows that pinned the old refusal are re-aimed at the class that still
holds - the quoted element - the way the 1.3.0 rows were when the carrier
opened. One of them lives in src/llm_ingestion_guard/coverage.py, which is why
the src diff is three files rather than one.

Version 1.4.0 in the code only. The CHANGELOG entry stays under Unreleased and
no tag is cut: README's badge and install pin must keep naming a tag that
exists.

Gates after `git add`: 893 passed (was 868), coverage 130/130 + 6/6 gaps,
redos-sweep exit 0, LIMITATIONS still 45 entries.
2026-09-08 05:34:55 +02:00
..
inbox_frontend.py feat(okf): scan reserved index.md/log.md in mode-b import, not path-reject (review MAJOR #2) 2026-07-15 06:43:50 +02:00
redos_clock.py test(redos): the dead row had the wrong payload, and the last wall clock is retired 2026-08-13 21:47:43 +02:00
test_active_content.py test(redos): one CPU clock for every bound, and a second row measured dead 2026-08-13 21:25:36 +02:00
test_calibration.py feat(active-content): raw HTML graded on carrier, and a tag naming no target is inert 2026-08-12 00:42:44 +02:00
test_contract.py fix(security): harden 5 adversarial-review findings (M1/M2/M3 + m4/m6) via TDD 2026-07-05 10:45:05 +02:00
test_corpus.py measure(fp): the upload door costs a human on 16-53% of benign documents 2026-08-10 21:32:56 +02:00
test_coverage_matrix.py test(coverage): runnable threat-coverage matrix (real-case validation gate) 2026-07-15 11:20:22 +02:00
test_disposition.py docs(plan): kill the pointer that sent this session to the wrong section 2026-08-10 21:01:19 +02:00
test_docs_measurement_scripts.py test(docs): pin docs/redos-sweep.py under test.py's contract 2026-08-20 23:10:25 +02:00
test_entropy.py fix(security): harden 5 adversarial-review findings (M1/M2/M3 + m4/m6) via TDD 2026-07-05 10:45:05 +02:00
test_fence.py feat(fence): randomized unspoofable delimiter + attacker marker-strip (TDD) [skip-docs] 2026-07-04 18:23:35 +02:00
test_grounding.py feat(grounding): SourceGroundingCheck protocol + pass-through default — the semantic-poisoning seam (TDD) [skip-docs] 2026-07-04 22:44:41 +02:00
test_input_cap.py docs(readme,limitations): stop advertising a version that was not chosen 2026-08-02 21:21:21 +02:00
test_lexicon.py test(redos): the dead row had the wrong payload, and the last wall clock is retired 2026-08-13 21:47:43 +02:00
test_neutralize.py test(redos): one CPU clock for every bound, and a second row measured dead 2026-08-13 21:25:36 +02:00
test_okf.py feat(okf): a flow sequence of plain scalars parses, and the corpus number is 6/53 2026-09-08 05:34:55 +02:00
test_okf_inbox_uploads.py feat(inbox): .xlsx extraction — formula gate, hidden sheets, cell comments (stage 2h) 2026-07-07 07:41:00 +02:00
test_okf_showcase.py feat(okf): scan reserved index.md/log.md in mode-b import, not path-reject (review MAJOR #2) 2026-07-15 06:43:50 +02:00
test_output.py test(redos): the dead row had the wrong payload, and the last wall clock is retired 2026-08-13 21:47:43 +02:00
test_report.py feat: scaffold package + report and sanitize modules (TDD) 2026-07-04 09:24:20 +02:00
test_sanitize.py test(redos): one CPU clock for every bound, and a second row measured dead 2026-08-13 21:25:36 +02:00
test_showcase.py feat(guard): active-content detector wired into the output gate (review MAJOR #1) 2026-07-15 06:11:33 +02:00
test_url_shape_doc.py docs(url-shape): make the rule reconstructable, and record what three corpora measured 2026-07-27 08:56:24 +02:00
test_wiring.py feat(active-content): raw HTML graded on carrier, and a tag naming no target is inert 2026-08-12 00:42:44 +02:00