Files
minimize-tools/public/README.md
T
zemion 87a7ef6ddd
Verify / verify (push) Canceled after 0s
Release Minimize Tools 0.2.0
2026-09-02 04:45:12 +02:00

60 lines
2.6 KiB
Markdown

# Minimize Tools
Reduce a failing input while repeatedly proving that the selected failure still
occurs. Minimize Tools is a local-first delta-debugging module in the add·ideas
Toolbox.
## v0.2.0 capabilities
- Minimize plain text by lines, lexical tokens, and Unicode code points
- Apply structure-aware reductions before textual delta debugging for bounded
JSON and XML inputs
- Preserve a literal marker, invalid JSON/XML state, an isolated regular
expression match or time threshold, a focused JSON Schema failure, a local
XSLT exception, or a marker in XSLT output
- Preserve the first JSON Schema failing path and rule by default, preventing a
reduction from silently changing to an easier unrelated violation
- Run regular expressions in a disposable same-origin worker with a hard safety
timeout; cancel any run and retain the last complete result
- Enforce explicit predicate-test and wall-time budgets and show every accepted
size reduction
- Sample predicates with single, majority or strict stability profiles and
report observed flaky candidates rather than silently trusting one run
- Minimize bounded multi-file bundles first by file membership and then by
structure-aware file content, using deterministic JSON-map, delimited or
primary-file adapter profiles
- Export the minimized case and a deterministic report containing the predicate,
engine version, limits, and reduction trace
## Honest scope
The JSON Schema predicate implements a documented focused subset: common types,
properties, required/additional properties, items, enum/const, size, and numeric
bounds. Unsupported keywords fail closed; remote references and formats are not
silently approximated. The XSLT predicate uses the browser's XSLT 1.0 processor
when available and rejects imports, includes, href targets, DOCTYPE declarations,
and external-resource XPath functions. XSLT tests are additionally capped at 200.
Minimization finds a locally minimal case under the attempted transformations
and budget, not a mathematically globally shortest input. Regex timing depends on
the browser and device. Inputs are capped at 2 MiB, runs at 2,000 tests and 30
seconds, regex worker execution at one second, and stylesheets at 128 KiB.
Bundles are limited to 100 files, 4 MiB total and 2 MiB per file. Adapter
profiles serialize bundle candidates for an existing predicate; they do not
emulate a filesystem or execute a target program.
## Development
```sh
npm ci
npm run check
npm run test:browser
```
`npm run release:artifact` creates a deterministic release ZIP and SHA-256
sidecar after all checks pass.
## License
GPL-3.0-or-later. See [LICENSE](LICENSE).