prestruct docs

An adversarial test harness attacks the only HTTP surface prestruct ships – the render-proxy pair – plus the repo’s own catalog of attack packs.

Crashtest targets

crashtest.config.js (repo root) attacks both deployed runtimes in-process:

The deployed copies (init/scripts/*) are the ones attacked, because that is what a scaffolded project actually ships; CI keeps them byte-identical to the engine sources via the sync checker.

The config deliberately runs two failure conditions as contracts, not accidents:

Attack packs

Attack packs live in packs/

Shape Contract
method-contract-walk every non-GET method is a clean 405 on both runtimes
malformed-target-fuzz hostile paths/queries fail 4xx, never 5xx or a throw
bot-render-fallback an unrenderable bot still exits via the live-site 302
refresh-strict-parity x-prestruct-refresh probes never crash the surface; an unset secret means the feature is off

Packs are vocabulary-driven: route names, method matrices, and env wiring come from the host config’s moduleCtx, so a pack runs against any wiring. A missing arm becomes a REFUSED skip row - always visible, never a false pass. Adoption into another repo is one config line (packs: ['/abs/path/to/prestruct/packs']) plus the moduleCtx vocabulary; see packs/README.md for the exact block.

Reading a hardening report

labs/hardening.md is the latest report (crashtest version, seed, ledger). CI rule: fail on a NEW EXPLOITED finding, or a REGRESSION of anything previously REFUSED. REFUSED means the attack was both attempted and cleanly survived; SKIP means the target does not declare that surface (declare the route in moduleCtx to arm it).

Limits of current coverage

Next steps