Commit Graph
22 Commits
Author SHA1 Message Date
benbrownandClaude Opus 4.8 db5caf0b5d skill: fix unloadable SKILL.md frontmatter, and test it in CI
The description was an unquoted YAML scalar containing "trust layer:
equivalence" — a colon-space inside a plain scalar makes YAML parse it as a
nested mapping, so the frontmatter raised "mapping values are not allowed in
this context" and the skill would not load at all.

Quoted the scalar and replaced the colon with an em dash.

The real defect is that CI asserted the preflight script's behavior but never
checked that the skill it ships is loadable. Added a step that parses the
frontmatter, requires name/description to be non-empty strings, and requires
name to match the directory — so an unloadable skill fails the build instead
of failing the user.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 13:59:59 -04:00
benbrownandGitHub 85eaf43dfe Merge pull request #17 from bdbrown4/audit/resolve-findings
gates: close the audit findings — enforce the gates the docs claimed
2026-07-14 13:45:47 -04:00
benbrownandClaude Opus 4.8 af3fc3dccd skill: expose the trust layer as a consumable peltier skill
The reusable artifact here was never the vendored targets — it is the
discipline: prove equivalence, prove significance, or claim nothing. This
packages it as a Claude Code skill usable from any repo.

Two modes. `verify` works anywhere, on any two shell commands in any
language: equivalence before timing -> A/A calibration -> interleaved A/B
with a bootstrap CI -> a verdict decided by the CI lower bound, never the
median. `attempt` drives the full in-repo loop (gates, pristine-baseline
verdict, ledger row, ROI report).

It drives the real bench-runner binary and refuses rather than degrade: on
an unsupported host, or with no trust layer reachable, preflight stops and
says so instead of falling back to a hand-rolled timing loop. A second copy
of the statistics is a second thing that can lie. A refusal ends the claim,
not the work.

An adversarial review of the skill caught six high-severity defects, all
fixed here — several of them the very errors the skill exists to prevent:

- verify mode had no risk classification at all. bench-runner emits only
  accepted/rejected-bench; needs-human-review is minted by the in-repo
  verdict path, which verify does not run. A concurrency change with
  byte-identical output would have sailed through as "accepted". The skill
  now makes the agent the classifier and says so explicitly.
- the accept template exposed `pin_prefix`, which is inert for
  compare/aa/calibrate (only `verdict` reads it) — an agent would have set
  it and reported pinning that never happened. Now documents wrapping both
  sides in taskset instead.
- the equivalence gate compared stdout only, so two commands that write to
  stderr and a dist/ tree would "GOLDEN PASS" on two empty files. Now hashes
  stdout + stderr + exit code + artifact tree, and an empty diff over empty
  output is a failed gate, not a passed one.
- nothing told the agent to build two coexisting immutable artifacts, so a
  `cargo run` baseline could rebuild from the patched tree mid-bench — the
  exact trap phase1-verdict-smoke-001 recorded.
- service mode was documented as generic HTTP. It is not: the server must
  take <port> <doc> <iters>, print READY, and close the connection. A stock
  Express app hangs the harness forever. Contract now stated.
- the CI refusal test could not pass: preflight also walks up from its own
  location, so running it in-place found this very repo. The test now copies
  the skill out of the tree first.

CI job `skill-preflight` asserts the contract that matters — resolve when a
trust layer is reachable, REFUSE when it is not, and work when consumed from
another repo via PELTIER_HOME. It deliberately does not assert a statistical
outcome: a shared runner is too noisy for that, which is precisely why the
skill calibrates before it claims.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 13:39:38 -04:00
benbrownandClaude Opus 4.8 899d55f4b6 gates: close the audit findings — enforce the gates the docs claimed
An adversarial audit found the enforcement story ahead of the code: gates
that were documented as hard gates were advisory, manual, or absent, and
several human-facing claims outran the machine record. This makes the
claims true.

High findings

- Differential fuzz was documentation, not enforcement: verdict hardcoded
  fuzz_iters=0 and diff-test hardcoded the gate to Skipped, while the case
  studies claimed 10k-iteration fuzz on the same wins. Fuzz is now a real
  pipeline gate (strict FUZZ-RESULT contract, executed count recorded), and
  it is inherently baseline-vs-candidate, so it runs on the accept path and
  reports Skipped in the standalone `just gates` flow. New hard rule: a
  machine `accepted` verdict is impossible unless the fuzz gate actually
  passed — otherwise it caps at needs-human-review.
- The agent's system prompt claimed FP/concurrency/unsafe patches were
  "routed to human review automatically". No such mechanism existed. Added
  a conservative lexical risk classifier (crates/verdict/src/risk.rs) that
  forces needs-human-review on any would-be accept carrying those signals;
  fp-tolerance equivalence always signals.
- The local verdict path ran agent-influenced code unsandboxed. It now runs
  under scripts/no-net.sh (network namespace) and fails closed. Upstream
  test suites are hash-verified against corpora/<t>/TESTSUITE.sha256 when
  present (scripts/pin-testsuite.sh generates them).

Also fixed, found while fixing the above

- The pipeline script's `set -e` was inert (brace group as the left operand
  of `&&`), so a failing candidate build did not abort the run and verdict
  could bench a stale binary. Now a scoped subshell whose status is branched
  on at top level.
- A wrapper that exits before exec'ing (no-net.sh refusing, bad wrapper path)
  stranded RUNNING.lock and left read_verdict polling forever. Failure
  accounting now lives outside the wrapper.
- harnessd's patch allowlist ignored git rename/copy headers and --no-prefix
  diffs; the rename-escape case is now a committed regression test.
- The workspace did not compile on Windows (ungated Unix APIs). cfg-gated;
  71 portable tests now run on both platforms.
- pin-check regenerated the corpus manifest instead of verifying it; it is
  now verify-only, with a deliberate `just pin-corpus` to re-pin.
- Max RSS is captured per run on Unix; PMU counters are opt-in diagnostics
  (compare --perf-stat), never part of the accept decision.

Docs now match the code, including what is NOT yet enforced: no target ships
a TESTSUITE.sha256 pin, no target declares [build].tsan, and matmul is not
wired to the fp-tolerance gate — each is stated as mechanized-but-inert
rather than done. Corrected the stale "33 ledger rows" (34), the playbook's
class-3 cJSON win (rejected), adversarial-review.md's sanitizer-separation
claim (five accepted rows carry sanitizers_clean=false), the unsupported
"40,000 requests" figure, and the blanket "historical rows record
fuzz_iters=0" (8 of 10; phase0-tokei-002/-003 record 4,332).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 13:10:14 -04:00
benbrownandGitHub 21352efe6c Correct project name in README.md
Update project name from 'Peltier' to 'peltier.io' in README.
2026-07-12 14:19:24 -04:00
benbrownandGitHub 1fbead809c Merge pull request #16 from bdbrown4/copilot/configure-github-pages-deployment
docs: wire up configure-pages in GitHub Pages workflow
2026-07-12 14:17:11 -04:00
benbrownandGitHub e55ac2b9c7 Merge pull request #15 from bdbrown4/claude/test-wsk42i 2026-07-12 13:35:47 -04:00
benbrownandGitHub 94b3ab9154 Merge pull request #14 from bdbrown4/claude/test-wsk42i
Phase 5 research forks + adversarial review, mimalloc ruling, and docs site
2026-07-11 20:41:05 -04:00
benbrownandGitHub d1ef2a0dd6 Merge pull request #13 from bdbrown4/claude/test-wsk42i
Phase 4 complete: service latency bench, real service win under replay, mechanical ROI reports
2026-07-11 20:00:51 -04:00
benbrownandGitHub 3951857cf2 Merge pull request #12 from bdbrown4/claude/test-wsk42i 2026-07-11 19:12:09 -04:00
benbrownandGitHub 7f67c3bb02 Merge pull request #11 from bdbrown4/claude/test-wsk42i
Phase 2 complete: unattended agent loop, OS isolation, 20 audited attempts, 3 verified wins
2026-07-11 13:57:47 -04:00
benbrownandGitHub 2386151ddb Merge pull request #10 from bdbrown4/claude/test-wsk42i 2026-07-10 08:25:39 -04:00
benbrownandGitHub 4eef6a7bd4 Merge pull request #9 from bdbrown4/claude/test-wsk42i 2026-07-09 19:38:59 -04:00
benbrownandGitHub 5be5cad0d3 Merge pull request #8 from bdbrown4/claude/test-wsk42i 2026-07-09 18:39:47 -04:00
benbrownandGitHub 01ac70034c Merge pull request #7 from bdbrown4/claude/test-wsk42i 2026-07-06 20:22:53 -04:00
benbrownandGitHub d7a83c1b3c Merge pull request #6 from bdbrown4/claude/test-wsk42i 2026-07-06 20:08:20 -04:00
benbrownandGitHub eb32fc24c0 Merge pull request #5 from bdbrown4/claude/test-wsk42i 2026-07-06 19:53:31 -04:00
benbrownandGitHub 5209d8e633 Merge pull request #4 from bdbrown4/claude/test-wsk42i 2026-07-06 19:40:43 -04:00
benbrownandGitHub 7cd9db4971 Merge pull request #3 from bdbrown4/claude/test-wsk42i 2026-07-06 19:09:09 -04:00
benbrownandGitHub e69d2c46ed Merge pull request #2 from bdbrown4/claude/test-wsk42i 2026-07-06 16:04:24 -04:00
benbrownandGitHub 1ef2bb4fdb Merge pull request #1 from bdbrown4/claude/test-wsk42i 2026-07-06 14:48:02 -04:00
benbrownandGitHub 836d4c9208 Initial commit 2026-07-06 14:20:25 -04:00