|
| 1 | +# COMMITS.md — chio-test-harness |
| 2 | + |
| 3 | +Reusable live-daemon fixture. Consumed by `@chio/bridge` live tests and |
| 4 | +by every plugin's smoke script (ST.2.x). No mocks — boots real |
| 5 | +`chio trust serve` + `chio mcp serve-http` subprocesses. Target first |
| 6 | +ship tag: `v0.1.0`. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## 1. chore: scaffold harness with bin scripts and gitignore |
| 11 | + |
| 12 | +**Body.** Initial scaffold — `LICENSE`, `.gitignore` (excludes `var/` |
| 13 | +runtime state), the `bin/` skeleton. No package.json — harness is |
| 14 | +bash-first so smoke tests in any language can source it. Wave 1. |
| 15 | + |
| 16 | +**Files.** |
| 17 | + |
| 18 | +- `LICENSE` |
| 19 | +- `.gitignore` |
| 20 | +- `bin/` directory layout (empty placeholders committed as part of the |
| 21 | + next commit; included here only as the directory reservation). |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## 2. feat: add start, stop, wait-ready, env scripts backed by real chio |
| 26 | + |
| 27 | +**Body.** `bin/start.sh` idempotently boots `chio trust serve` |
| 28 | +(127.0.0.1:8940) + `chio mcp serve-http` (127.0.0.1:8931), waits for |
| 29 | +`/health` to go 200 on both. `bin/stop.sh` kills both by pid-file, |
| 30 | +retains logs in `var/`. `bin/wait-ready.sh` polls until both services |
| 31 | +respond. `bin/env.sh` exports the `CHIO_*` env vars every downstream |
| 32 | +smoke script reads. Wave 1. |
| 33 | + |
| 34 | +**Files.** |
| 35 | + |
| 36 | +- `bin/start.sh` |
| 37 | +- `bin/stop.sh` |
| 38 | +- `bin/wait-ready.sh` |
| 39 | +- `bin/env.sh` |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## 3. feat: add canonical policy fixtures and hello-mcp subprocess |
| 44 | + |
| 45 | +**Body.** Three HushSpec 0.1.0 policies (`canonical.yaml`, |
| 46 | +`tiny-budget.yaml`, `extensions.yaml`) covering the happy path, a |
| 47 | +velocity-capped variant, and the `extensions.chio.*` passthrough |
| 48 | +path. `hello-mcp/server.mjs` is a stdio MCP server exposing `echo`, |
| 49 | +`delete_file`, and `paid_action` — the minimum toolset needed to |
| 50 | +exercise allow / deny-by-forbidden-path / deny-by-budget. MCP SDK |
| 51 | +pinned to `0.6.0` to work around the `capabilities.sampling.tools` |
| 52 | +forward-compat bug on `0.7.x`. Wave 1. |
| 53 | + |
| 54 | +**Files.** |
| 55 | + |
| 56 | +- `policy/canonical.yaml` |
| 57 | +- `policy/tiny-budget.yaml` |
| 58 | +- `policy/extensions.yaml` |
| 59 | +- `hello-mcp/server.mjs` |
| 60 | +- `hello-mcp/package.json` |
| 61 | +- `hello-mcp/bun.lock` |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## 4. feat: prefer chio over legacy arc binary during harness bootstrap |
| 66 | + |
| 67 | +**Body.** Harness resolves the runtime binary in this order: |
| 68 | +explicit `CHIO_BIN`, sibling `chio` next to `CHIO_ARC_BIN`, |
| 69 | +`../arc/target/release/chio` fallback, then `chio` on `PATH`. |
| 70 | +Mirrors the ladder `@chio/bridge` uses, so harness + bridge never |
| 71 | +diverge on which runtime they boot. Wave 5.0.1. |
| 72 | + |
| 73 | +**Files.** |
| 74 | + |
| 75 | +- `bin/env.sh` — `CHIO_BIN` resolution block. |
| 76 | +- `bin/start.sh` — uses `$CHIO_BIN` to launch trust + edge. |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## 5. ci: smoke-test the harness against a real chio build |
| 81 | + |
| 82 | +**Body.** GitHub Actions workflow: check out arc, run |
| 83 | +`setup-chio@v0.1.0`, start the harness, hit `/health` on both |
| 84 | +endpoints, run a minimal `chio check` allow/deny round-trip, tear |
| 85 | +down. Typecheck is non-blocking per Wave 5.1. Wave 5.1. |
| 86 | + |
| 87 | +**Files.** |
| 88 | + |
| 89 | +- `.github/workflows/ci.yml` |
| 90 | + |
| 91 | +--- |
| 92 | + |
| 93 | +## 6. ci: add SLSA L3 release workflow for harness tarball |
| 94 | + |
| 95 | +**Body.** Tag-triggered workflow that packages `bin/`, `policy/`, |
| 96 | +and `hello-mcp/package.json` as a GitHub Release asset, signs it |
| 97 | +with Sigstore keyless, and attaches a generic SLSA L3 provenance |
| 98 | +statement. Harness isn't on npm — it's consumed via |
| 99 | +`actions/checkout` from downstream CI. Wave 5.5. |
| 100 | + |
| 101 | +**Files.** |
| 102 | + |
| 103 | +- `.github/workflows/release.yml` |
| 104 | +- `scripts/verify-release.sh` — verifies the release asset sha256 |
| 105 | + matches the attestation subject. |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +## 7. docs: README with usage, caveats, and smoke assertions |
| 110 | + |
| 111 | +**Body.** Documents the prereqs, the six smoke assertions every |
| 112 | +ST.2.x plugin must cover, the MCP SDK 0.6.0 pin rationale, and the |
| 113 | +two canonical-policy caveats (`human_in_loop.approve_above` and |
| 114 | +`rules.velocity.max_spend_per_window` — both require grant shapes |
| 115 | +`chio check`'s synthetic grant doesn't provide). Wave 5.2. |
| 116 | + |
| 117 | +**Files.** |
| 118 | + |
| 119 | +- `README.md` |
0 commit comments