> **It's not the Mech — it's the pilot.**
>
> This repo is part of [CochranBlock](https://cochranblock.org) — 8 Unlicense Rust repositories that power an entire company on a **single <10MB binary**, a laptop, and a **$10/month** Cloudflare tunnel. No AWS. No Kubernetes. No six-figure DevOps team. Zero cloud.
>
> **[cochranblock.org](https://cochranblock.org)** is a live demo of this architecture. You're welcome to read every line of source code — it's all public domain.
>
> Every repo ships with **[Proof of Artifacts](PROOF_OF_ARTIFACTS.md)** (wire diagrams, screenshots, and build output proving the work is real) and a **[Timeline of Invention](TIMELINE_OF_INVENTION.md)** (dated commit-level record of what was built, when, and why — proving human-piloted AI development, not generated spaghetti).
>
> **Looking to cut your server bill by 90%?** → [Zero-Cloud Tech Intake Form](https://cochranblock.org/deploy)

---

# exopack

Testing augmentation for Rust binaries: screenshot capture, video recording, interface creation, API mocking, TRIPLE SIMS, demo record/replay, baked demos.

Used by cochranblock, kova, approuter, oakilydokily, whyyoulying, wowasticker for test binaries (`*-test`).

## Wire / Architecture

```mermaid
flowchart TB
    subgraph Workspace
        App[app binary]
        Test["*-test binary"]
    end

    subgraph exopack
        Screenshot[screenshot]
        Interface[interface]
        Mock[mock]
        Video[video]
        Triple[triple_sims]
        Devtools[devtools]
        Demo[demo]
        BakedDemo[baked_demo]
        Standards[standards_check]
    end

    App --> Core[shared lib]
    Test --> Core
    Test --> exopack

    Screenshot --> |Sim 4: capture→diff| VisualRegression
    Interface --> |spawn + HTTP| Harness
    Mock --> |WireMock| Stub
    Triple --> |run 3×| AllPass
    Demo --> |record/replay| JSON
    BakedDemo --> |CLI + HTTP| Verify
```

## Features

- **screenshot** — Sim 4 visual regression: capture → baseline → pixel diff → red-highlight diff image. Auto-creates baselines on first run. Pure Rust (no Chrome for basic capture, devtools fallback for full browser)
- **interface** — Test server harness: random-port binding, HTTP client with cookie store
- **triple_sims** — Run test runner 3 times; all must pass. Includes live-demo and test-bin discovery
- **devtools** — Headless Chromium via CDP: console error check, full-page screenshots (WASM-aware)
- **mock** — WireMock for on-demand API mocking (GET/POST text/JSON, custom status codes)
- **video** — Screen capture trait + xcap impl (always compiled; xcap requires `video` feature)
- **demo** — Action script recording: WebClick, WebInput, ApiCall, EguiSend → JSON replay
- **baked_demo** — Zero-input automation: exercises all CLI subcommands + HTTP endpoints
- **standards_check** — 14-point Rust industry standards gate: clippy, fmt, audit, deny, MSRV, unsafe, docs, changelog, license, P16 test binary, allow(unused), error handling, secrets, Cargo.toml metadata. Runs against entire portfolio (10 projects, 140 checks)

## Standards Gate (P23 Triple Lens validated)

```
cargo test --features standards_check portfolio_standards_gate -- --nocapture
```

14 checks per project. Pass/fail table across the portfolio. First baseline: 72/140.

| Check | What it verifies |
|-------|-----------------|
| clippy | `cargo clippy -- -D warnings` zero warnings |
| fmt | `cargo fmt --check` properly formatted |
| audit | `cargo audit` no known vulnerabilities |
| deny | `cargo deny check` license compliance |
| msrv | `rust-version` declared in Cargo.toml |
| unsafe | `#![forbid(unsafe_code)]` or justified usage |
| docs | `//!` module docs in lib.rs or main.rs |
| changelog | CHANGELOG.md or TIMELINE_OF_INVENTION.md exists |
| license_file | LICENSE/UNLICENSE file present |
| test_binary | P16 `*-test` binary in Cargo.toml |
| allow_unused | No unjustified `#[allow(unused)]` |
| error_handling | No `unwrap()` in library code |
| secrets | No .env files or hardcoded keys committed |
| cargo_meta | description, license, repository in Cargo.toml |

## Docs

- [docs/testing_architecture.md](docs/testing_architecture.md) — Two-binary test model
- [docs/ROUGH_DRAFT_EXOPACK.md](docs/ROUGH_DRAFT_EXOPACK.md) — Design notes
- [docs/compression_map.md](docs/compression_map.md) — P13 token registry (f60–f116, t60–t72)
- [govdocs/](govdocs/) — Federal compliance (SBOM, SSDF, FIPS, FedRAMP, CMMC, ITAR/EAR)
- [USER_STORY_ANALYSIS.md](USER_STORY_ANALYSIS.md) — Full user walkthrough and scoring
