Selectivity Reduces a Generated File From 20000 Lines to Two
The line-reduction demonstration starts with a deliberately oversized text file whose answer is known in advance. It has 20000 lines: alpha appears on line 702, omega on line 17891, and every other line contains an irrelevant row label. The predicate succeeds only when both trigger lines are present. This makes a useful check of the reducer, because a result that loses either trigger is wrong and a result that keeps unnecessary lines is visibly unfinished.
In one recorded run of Selectivity 0.1.1 in a Linux amd64 container, Selectivity reduces the 408866-byte file to 12 bytes containing alpha and omega on their own lines. The engine performs 80 predicate executions with repeats set to 1 for this demonstration. Baseline and final verification are included in that count. The saved summary reports completion with no unresolved checks and local deletion minimality at line granularity.
The command uses an explicit shell predicate that requires both exact line matches:
./selectivity --input large.txt --out lines --repeats 1 \
-- sh -c 'grep -qx alpha "$1" && grep -qx omega "$1"' check '{input}'
Selectivity does not know which two lines matter. It discovers that through candidate deletions and the predicate’s answers. The final content is compared byte for byte with the expected two-line file. The original remains available as a snapshot, and the JSONL audit records the candidate checks that led to the result. The fixture generator is included in scripts/demo.sh, so the example can be recreated rather than trusted as a screenshot.
This is a synthetic reduction example, and a fairly cooperative one. It establishes that this input can be reduced to its known answer under the supplied predicate. It does not measure a parser crash, prove that all reductions need 80 checks or demonstrate a globally smallest result across arbitrary edits. A real CSV or configuration file often needs validity checks in its predicate. The reference explains that boundary; the recorded evidence preserves the run details.