Skip to content

Instantly share code, notes, and snippets.

View copyleftdev's full-sized avatar
🎯
Focusing

Don Johnson copyleftdev

🎯
Focusing
View GitHub Profile
@copyleftdev
copyleftdev / Dockerfile
Created May 26, 2026 19:58
micro-containers: WASM/WASI Dockerfile — scratch base + wasip1 binary
# WASM image — compiled to WASI preview1 target (Go 1.21+).
# The resulting container holds a single .wasm binary on a scratch base.
# Run via Docker+Wasm (experimental) or directly with wasmtime/wasmedge.
# Build (from repo root): docker build -f runtimes/wasm/Dockerfile -t micro-containers-wasm .
FROM golang:1.24 AS builder
WORKDIR /src
COPY go.mod ./
RUN go mod download
COPY cmd/wasm/ ./cmd/wasm/
@copyleftdev
copyleftdev / oddly-exact-nist-mutation-record.md
Created July 25, 2026 06:08
Oddly Exact NIST mutation record: 389 tests passed, Longley caught the formula defect

Oddly Exact: NIST mutation record

This record supports the article “389 Tests Passed. NIST Still Caught the Bug.”

  • Pre-repair baseline: 8e87c2fbee580efb7d38690634a0ee60d0d77dff
  • Rust package: agent-calc 0.1.0
  • Contract: calc1/0.1.0
  • Mutation runner: cargo-mutants 27.0.0
  • External reference: NIST Statistical Reference Datasets, Longley linear
@copyleftdev
copyleftdev / oddly-exact-contract-challenge.sh
Created July 25, 2026 06:08
Oddly Exact replay: reject unknown fields and refuse unbounded optimizer work
#!/usr/bin/env bash
set -euo pipefail
# Replay the three requests that exposed contract and resource-boundary gaps in
# Oddly Exact. Run from the agent-calc repository:
#
# cargo build --locked
# bash oddly-exact-contract-challenge.sh
calc_bin="${1:-target/debug/agent-calc}"
@copyleftdev
copyleftdev / oddly-exact-optimizer-mutation-gate.md
Created July 25, 2026 06:08
Oddly Exact optimizer guard mutation gate: 11 of 11 mutations caught

Oddly Exact: repaired optimizer mutation gate

The contract audit found that optimizer iteration counts and grid resolution had no published upper ceilings. The repair added and enforced these limits:

  • maximum iterations: 100000
  • maximum grid resolution: 1000000

The focused mutation pass selected every mutation generated for validate_max_iters and validate_grid_resolution, including replacements