Changelog
All notable changes are listed here. The format follows Keep a Changelog, and versions follow Semantic Versioning.
[Unreleased]
Fixed
- The release workflow's MCP registry job waits until npm shows the new version before it publishes. npm takes a few minutes to show an upload, and the registry checks npm, so publishing straight away failed with "version was not found" (it did on 0.4.0).
[0.4.0] - 2026-11-29
Security
okproof_verify_findings(MCP): repro commands in a findings file now run only when the person who starts the server passesokproof mcp --allow-commands(or setsOKPROOF_MCP_ALLOW_COMMANDS=1) and the agent asks for them. Before, the agent's ownallow_commands: truewas enough to run shell commands from an untrusted file.okproof verify-findings --baseand the MCP tool refuse a base ref that starts with-; before,--output=<file>reachedgit diffas an option and wrote a file.- Action: the E4 base comparison now covers every folder in
proof-dirs. In a monorepo that used onlypackages/*/.okproofit compared a folder that did not exist and granted E4 even when a package's proof files changed.
Fixed
parseProofskips fenced code blocks and rejects a second## #<id>issue heading; before, an example checkbox in a fence became a criterion and a second heading was silently merged into the first issue.okproof check --issue-bodyreads the issue with the scannerokproof syncuses (code fences skipped, an "Acceptance criteria" section honoured), so the two commands agree.finalize(and so the Playwright reporter) treats a missing proof folder as nothing to do and skips one malformed proof file instead of failing every ledger.- JUnit: a testcase with both
<skipped>and<failure>isfailed, notskipped. okproof lintfinds Cypress*.cy.*files and files under__tests__/.- The
initworkflow grantschecks: write, so a fresh install gets the check run. - The Playwright reporter reads tags on enclosing
describetitles, reports evidence paths relative to the working directory, and writes no PR comment from a--shardrun. - The release workflow runs the tests before it stamps the release commit, so the stamped build is not run against tests that expect the placeholder.
- Docs:
docs/trust.mdon--headernow matches the code (the app's own origin only); the MCP tool no longer claims a proof can never be weakened (the tools cannot, a direct edit can: use CODEOWNERS).
Added
- Criteria-diff guard:
okproof criteria-diff --base <ref>,okproof gate --base <ref> [--allow-criteria-change], and the Action inputscriteria-guard(default on) with theokproof-criteria-changelabel as the reviewer's override. It fails on a removed or reworded criterion, a lowered evidence level,preadded,{verify}dropped, or a positional id that moved. okproof review --results <file|glob> [--base <ref>] [--json]and the Action inputreviewer-table: one table of criterion, change, result, level, claiming tests (file, line, changed in this pull request) and flags. Reads files only.okproof sync --table <heading> [--id-col ID] [--text-col Expected]: criteria from a table of cases, with the case id as the stable id.- A warning when a results file looks like Playwright's JUnit output, where a retried test is a plain pass.
packaging/: thin launchers that run the npm package of the same version, so theokproofcommand is available from pip (pypi/), cargo (crates/) and a container image (docker/), and the name is not left free for someone else. The Python launcher is built, checked with twine and unit-tested; the Rust and Docker ones are not built in CI. Publishing is maintainer-run, after the npm release.scripts/timestamp-release.ps1: a maintainer-run script that checks a release tarball's attestation, anchors its hash with OpenTimestamps and attaches the proof to the release.- docs/provenance.md: who made okproof and how to prove it (registry and release records), how to verify an official release (
npm audit signatures,gh attestation verify), the name and logo policy, and what to do about a copy or a false ownership claim. .editorconfig, a maintenance and support policy in the README, a pre-1.0 status badge, and a weekly workflow (stale.yml, issues labelledneeds-infoonly) that closes issues waiting on the reporter.- docs/reviewing-prs.md (a read-only guide for reviewers), and the skill says what to do when the MCP tools are not connected.
- Several results files:
--resultstakes repeated values and globs foringestandgate; outcomes merge (file, classname, suite, name), the worst status and lowest assertion count win across files; ledgers recordresults: [{path, sha256}]andrun: {id, sha, timestamp}. - Monorepos: repeatable
--dirand the Action'sproof-dirsinput; each folder is gated on its own ledgers, one comment section per folder. - Check run:
okproof gate --checksand the Action'schecksinput publish oneokproofcheck run with annotations; a token that cannot write checks falls back to the job summary. - Flaky verdict (not met, shown apart from
failed) and<dir>/quarantine.jsonwith--allow-quarantined. --tag-scope suite; lint reads Java, Kotlin and C# tests and warns about a tag only on a describe, suite or class.--jsonforcheck,gateandlint;okproof explain <id>;okproof suggestand theokproof_suggestMCP tool. See docs/json-output.md.- Ingest and gate warn about tests that claim a criterion no proof file lists.
- README guides for runners and languages, and the Cypress per-spec
[hash]recipe. okproof gate --replays <file>/--require-replays, andverify --replay-only --json [file]: a committedrepro/*.jsonneeds a passing replay from the same job; the Action has areplaysinput.okproof_statustakesresults(rebuild in memory) and shows run identity; it refuses "Done" when the ledger predates HEAD. Ledgers recordrun: { commit, run_id, at }.okproof verify --dry-run,--read-only(default whenCI=true) /--allow-destructive,--confirm 2of3,--concurrency,--check-links.ingest --require-issuesandOKPROOF_REQUIRE_ISSUES.editors/vscode/: a small VS Code extension (diagnostics for malformed and unknown[okproof:id]tags, CodeLens with claiming-test counts on criterion lines, go to definition from a tag). A separate package, not part of the npm tarball; its logic is tested from the root.okproof revert-check --mutate [--max-mutants n] [--allow-survivors]: deterministic mutation of the lines a PR changed, one test run per mutant in a temporary worktree. Criteria with surviving mutants areweakly-coveredand fail the gate unless allowed. Writes.okproof/mutate-<issue>.json. See docs/mutation-and-revert-check.md.- Optional tag text hash
[okproof:142.3#a1b2]andokproof tag-hash <id>: the gate andokproof lintreport a hashed tag whose criterion text changed. Tags without a hash are unchanged. okproof sync --push(opt-in): appends criteria only the proof file has to the issue body with a validated GitHub API PATCH; never edits or removes existing text.okproof verify --concurrency <1-8>: criteria run in parallel on the probe-first path, with a shared probe cache and one lazily made model; results, files and log keep criterion order.- New verdicts
partialandwrong-build. A results file that looks incomplete (fewer testcases than--baseline, an abort or truncation marker, a summary count that disagrees with its testcases, XML that ends inside a suite) makes criteria with no evidencepartial, and a testcase cut off at the end of the file is no longer trusted as a pass. With--expect-commit <sha>/OKPROOF_EXPECT_COMMIT(and optionally--expect-url), results that name another commit, or none, make every criterionwrong-build. The Action sets the commit by default (inputsexpect-commit,expect-url,baseline). Seedocs/proof-first.md. - A "Decision" header on the ledger and PR comment: counts, the single blocking reason, and the criteria that still need a live check after deploy.
- Root-cause variants: confirmed failures are re-run with varied input, repetition, reload, back and forward, 375px width and offline-then-online, and the result is saved in the repro file as
variants.verify --no-variantsturns it off;verify --replay-only --variantsre-runs them and reports a narrow fix. - Sequence checks
n-records,two-actors(two independent browser contexts) andin-app-navigation, run when a criterion's words match.verify --no-sequencesturns them off. Driver:src/driver/contexts.ts, aforwardaction, and thenoFieldValuecheck. okproof verify-findings <file>and the MCP toolokproof_verify_findings: check review findings against the code (confirmed, fixed, false-positive-suspect, outside-scope, unverified) with no model. Seedocs/review-findings.md.okproof brief-check <brief.md> [dir]and the Action inputbrief: compare a product brief's must/never/always/shall rules with the proof files.- JSON schemas under
docs/schemas/. - Attested runtime: the Action installs the exact published
okproofversion of its ownpackage.jsonfrom npm and checks it withnpm audit signatures(inputruntime: published, the default;sourcebuilds from the action folder for a ref that is not a release).okproof initpins the Action to a full commit sha. - Signed ledgers: the Action input
attestsigns the ledgers with a Sigstore attestation (GitHub OIDC);okproof attestation verify <ledger.json> --repo owner/namechecks one.upload-ledgersandartifact-nameupload the ledgers and a static report as a workflow artifact. okproof report [--out file.html] <ledger.json|dir>...: one static HTML report from ledger files, with history when several are given.- Issue provenance:
okproof syncrecords a digest of the issue and of the proof file in one comment line, so the gate can say whether the issue or the proof file changed since the last sync. - MCP Registry listing:
mcpNamein package.json,server.jsonat the repository root,scripts/check-server-json.mjs(run by the tests andnpm run smoke), an optionalmcp-registryrelease job (off unless the repository variableMCP_REGISTRYistrue), and docs/mcp-registry.md and docs/mcp-directories.md.server.jsonis not shipped in the npm tarball.
Changed
- A criterion whose tests passed only on retry is now
flakyinstead offailed(still not met). - The job summary is written even when the pull request comment is off. Comments are cut at a table row with a "N more criteria" footer, and evidence links to the CI run.
buildLedgerindexes outcomes by claimed id: linear instead of criteria times outcomes.- One run identity in every ledger:
runcarries bothcommit/run_id/atandsha/id/timestamp(same values); readers accept either set. - A re-run on the same commit updates the existing
okproofcheck run (found by name and head sha) and sends only annotations it does not already show, instead of creating a second run. - Proof headings and checkbox items are scanned with plain string code instead of regular expressions that backtrack polynomially on long runs of white space (CodeQL
js/polynomial-redos); accepted input is unchanged.
Security
- Replay is origin-locked: a replayed
gototo another origin is refused,--replay-onlywith credentials needs--urland refuses a repro recorded against another origin, and--headervalues are added to same-origin requests only (Fetch interception) instead of every request. - A marked PR comment is adopted only when the token's own identity wrote it, so another user's lookalike comment cannot silence okproof.
- MCP:
okproof_add_criterionvalidates before writing (and allows 20 adds per session); paths are resolved through symlinks; input lines over 1 MB are dropped; criterion and test text in tool output is shown as quoted data. - On Linux as root, Chrome's
--no-sandboxnow prints a warning.
Fixed
- One gate verdict everywhere: the PR comment, the Action
provenoutput and MCP status apply the same linked-issue and file-name checks asokproof gate(evaluateGateoptionsrequireIssues,checkNames). - Lint results are matched to runner outcomes by full test title (and file when known), not substring, so a weak
logintest no longer markslogin worksweak. - The assertion heuristic counts call forms only, so a variable named
assertionsis not an assertion. - The Node 22 requirement of the browser driver and verifier is reported clearly on Node 20.
Docs and community
- Launch kit in
docs/launch/(post, Show HN and Reddit variants, thread, 90-second demo script), all describing only what 0.4.0 ships. - README: animated terminal of the real demo output (
docs/assets/demo.svg) and the OpenSSF Best Practices badge.scripts/make-assets.mjsregenerates it and the 1280x640 social preview with okproof's own driver; seedocs/assets/README.md. The roadmap no longer lists the revert check as unbuilt (it shipped in 0.3.0). docs/bestpractices-answers.md: draft OpenSSF Best Practices (passing) answers, with the maintainer-only items marked.scripts/apply-rulesets.ps1: maintainer script to apply themainruleset (required checks, review count and code-owner review as parameters,-DryRun).docs/maintainers.mdstates the review policy, including that both maintainer accounts are one person.- CODEOWNERS names
.okproof/,.github/,action.ymland release files explicitly. docs/good-first-issues.md(six starter issues) andscripts/create-issues.ps1to file them;docs/reviewers-wanted.md;SUPPORT.md;docs/repo-settings.md(topics and thegh repo editcommand);docs/adoption.md(pilot guide and tracker).- The feature request template now asks for acceptance criteria.
- Docs site, CITATION.cff, llms.txt, discoverability kit: a GitHub Pages site built from the docs by
scripts/build-site.mjs(no dependencies;.github/workflows/pages.yml),CITATION.cff,llms.txtandllms-full.txt(npm run llms), more accurate npmkeywordsandhomepage, a clearer skill description, and maintainer checklists indocs/discoverability/.
[0.3.0] - 2026-11-25
Added
okproof diff --base <ref> --test <command> --results <file>: differential proof. Runs the PR's tests on the merge base and on HEAD in temporary git worktrees (zero tokens, no model). A criterion isproven-by-change,not-differential(passes on both: not met, unless the criterion carries thepretoken, or--allow-preexisting),regressedorfailing. Writes.okproof/diff-<issue>.json; the gate and ledger honour it.okproof revert-check: reverts each changed source file in a worktree and records which criteria's tests notice; a criterion whose tests stay green isuncovered(not met, unless--allow-uncovered). Writes.okproof/revert-<issue>.json.- Action inputs
differential(off/on) andtest-command. Needsfetch-depth: 0. okproof gate --allow-preexisting --allow-uncovered.- Evidence levels E0 to E4 (README, "Evidence levels"). Ledger entries carry
level,requiredandgaps; a criterion is met only when its level reaches the level it requires. A criterion line can require a level with a{E3}token, combinable with{#id}andpre({#pay E3 pre}); the default is E2, set with--min-levelor the Action'smin-levelinput. The ledger table and PR comment gain a Level column (E2/E3 ▰▰▱), gate messages say what evidence is missing, andokproof_statusshows levels and the next step to raise each. New verdictinsufficient. E3 reads optionalverify-<n>.json,diff-<n>.jsonandrevert-<n>.json; E4 is attested only bygate --resultswith--proof-matches-base(the Action passes it when.okproof/matches the base branch). - Verifier cost: snapshot diffs after the first view (full snapshot at least every fifth view), a per-criterion token budget (
--budget-tokens, default 20000, 0 for none; an over-budget run isinconclusive), tokens per criterion inverify-<n>.jsonand the CLI output. - Zero-token probes:
okproof verifynow runs deterministic probes first (persistence, back-forward, double-submit, narrow-viewport, keyboard, offline, hostile-input), each replay-confirmed with no model, and calls the model only for criteria no probe refuted.--probes-onlyruns just the probes and needs no key;--no-probesrestores model-only behaviour. See the README section "Zero-token probes". - Driver:
page.goto(url, { waitUntil: 'load' | 'domcontentloaded' | 'networkidle', timeoutMs })andokproof verify --wait-until. A page that does not finish loading fails with the event it waited for and what to try instead.page.doubleClick(ref)andpage.requests()were added too. okproof doctor [--repo owner/name] [--dir d] [--check job] [--no-network]: read-only checks that CODEOWNERS covers.okproof/, branch protection or a ruleset requires the okproof check and code-owner review,.gitignoreignores ledgers, and the workflow passesresults(andfetch-depthwhen differential is on). Exit 1 on a failure.- Gate:
{verify}in a proof file heading and--require-verifymakeverify-<issue>.jsonmandatory. - Action inputs:
allow-committed-ledgers,strict-assertions,strict-relevance,max-claims,allow-empty,require-linked-proof,require-verify. The CLI reads the matchingOKPROOF_LINT,OKPROOF_STRICT_ASSERTIONS,OKPROOF_STRICT_RELEVANCE,OKPROOF_MAX_CLAIMSvariables. okproof lint --max-claims N: a test claiming more than N criteria (default 3) is reportedOVERCLAIM; with--strict-relevanceit fails.okproof initprints a copy-paste tag example for the chosen runner..gitattributes(LF everywhere) and a Windows job in CI.
Changed
- JUnit parsing uses a linear-time XML tokenizer instead of regular expressions: quoted attributes containing
>or/, comments (a<testcase>inside a comment no longer counts), CDATA, processing instructions, DOCTYPE, entities, namespaces and nested suites. Results files over 50 MB (JUnit and CTRF) are refused with a clear error. - The gate fails (it used to note) when a repro exists for an issue but
verify-<issue>.jsonis missing. - The proof file written by
okproof initis marked{placeholder}and fails the gate until its example criteria are replaced. - The Action fails when no
resultsinput is given (setallow-committed-ledgers: trueto keep the old behaviour), treats unknown assertion counts as weak and enables strict relevance by default. When lint finds a real assertion in a test whose runner reported no count, the count becomes positive. - Lint treats as weak: constant-only comparisons,
toBeDefined/toBeTruthy/not.toBeNullon fixtures (page,browser,driver, ...),expect.assertions(0), assertions in dead code, in functions the test never calls, or in atry/catchthat swallows the failure. - README no longer states "made a real assertion" as fact: it depends on runner counts and heuristic lint. docs/trust.md opens with the trust model (CODEOWNERS and required review are the real control).
- The Action parses its inputs once (
scripts/action-options.mjs) instead of in each step. - With
--lint, a passing test that lint calls "possibly unrelated" now holds its criterion at E1, which fails the default E2 requirement (it was advisory before). Use{E1}on a criterion,--min-level E1, or fix the test.
[0.2.0] - 2026-11-24
Added
okproof init [--issue N --title T] [--runner r] [--agents] [--workflow] [--yes]: one-step setup of.okproof/, a CI workflow, and agent files (AGENTS.md, CLAUDE.md, skill,.mcp.json). Never overwrites.- Lint findings feed the ledger:
okproof ingest <results> --lint [path|glob]andokproof gate --results <file> --lint [path|glob]mark tests lint finds weak (no or trivial assertions) as asserting nothing, so their criterion isunproveneven when the runner reports no assertion counts. Matched by tag and title. The Action has alintinput (auto, a path or glob, oroff). - JUnit: a passing
<testcase>with<flakyFailure>,<flakyError>,<rerunFailure>,<rerunError>or a non-zerorerunproperty isflaky, never met. okproof lintflags tagged tests whose only assertions are trivial (expect(true).toBe(true),assert True, ...) as weak, and warns when a tagged test never mentions any key word of its criterion ("possibly unrelated"; advisory,--strict-relevancemakes it fail). Also inlintTests()and the newokproof_lintMCP tool.okproof gate --results <file>: rebuild ledgers in memory from this job's test results and ignore committed ones;--require-issues 142,143; results and proof sha256 recorded in ledgers. See docs/trust.md.- Linked-issue enforcement in the Action (
require-linked): a PR that closes an issue with no proof file fails the gate. - Verifier: per-detector attribution of findings (
--strict-detectorsrestores page-global attribution); authentication with--storage-state,--headerand--login. - Stable criterion ids,
{#id}prefix on a criterion line (docs/stable-ids.md). - Property-based tests (fast-check, a dev dependency only) for the parsers, issue sync, lint scanner and ledger invariants.
- Release workflow attaches the packed tarball and its build-provenance attestation bundle (
okproof-<version>.intoto.jsonl) to the GitHub release.
Changed
- The gate is the single source of truth: the Action
provenoutput, the PR comment headline and MCPokproof_statusall useevaluateGate. GitHub posting is more robust.verify-<issue>.jsonrecords acriteriaHash, and stale verifier results fail the gate. - Relevance check treats regex and template literals in the test body as text. The lint scanner tells a regex from a division by the preceding token.
--testsglobs are matched by a plain string matcher (no regular expression built from the pattern), with a 512 character limit.@anthropic-ai/sdkpeer dependency is pinned to>=1.0.0 <2.0.0.- Docs say precisely what is checked; signed ledgers and the hosted proof page are marked roadmap. WHY.md replaces the vision and rationale documents; governance and roadmap moved into the README "Project" section and CONTRIBUTING.md. CODEOWNERS protection for
.okproof/is documented. README rewritten around a quick start.
[0.1.0] - 2026-11-24
First release. okproof checks a pull request against the acceptance criteria in its issue and ends with a ledger that marks each criterion met, failed or untested.
Added
- Proof files (
.okproof/<issue>.md) that hold the acceptance criteria, and tests that claim criteria by[okproof:<issue>.<n>]tag. A ledger (.okproof/ledger-<issue>.jsonand.md) marks each criterion met, failed or untested. Untested and flaky passes never count as met. okproof gate: exits 1 unless every proof file has a fresh, fully met ledger. The proof file is the source of truth. A criterion added, removed or edited after the ledger was written makes it stale, a missing or invalid ledger fails, and an empty directory fails unless--allow-emptyis passed.okproof check [dir]: validates proof files and prints each criterion's tag.check --issue-body <file> [--issue N]fails when the issue's checkboxes and the proof file disagree, in either direction.- Ledger posted as one pull request comment that reruns update, and written to the job summary, in GitHub Actions.
OKPROOF_NO_COMMENT=1turns this off; a read-only fork token is skipped, not fatal. - Playwright Test reporter (
okproof/playwright). A pass that needs a retry is flaky, and a recorded trace is linked as evidence. okproof ingestfor JUnit XML (Jest, Vitest, pytest, JUnit, Cypress, Go and more) and CTRF JSON, with format auto-detection and--format junit|ctrf.- Own Chrome driver (
okproof/driver): talks the DevTools Protocol directly over Node's built-in WebSocket, returns short accessibility-tree snapshots, and acts by ref. HonoursOKPROOF_CHROME. Needs Node 22. - MCP server (
okproof mcp, stdio) withokproof_criteria,okproof_status,okproof_ingest_junitandokproof_add_criterion, so coding agents check the definition of done before claiming a task is finished. Agents can add criteria but not remove or edit them. Shipsskills/okproof/SKILL.md, a Claude Code skill for that loop. - Composite GitHub Action (
okproof/okproof) withresults,dir,gate,comment,node-versionandgithub-tokeninputs, andprovenandsummaryoutputs. - Verifier (
okproof verify --url <app>,okproof/verify): an adversarial agent that tries to prove each criterion false through the driver. Every action is recorded as JSON, and a violation counts only if its assertion fails again when replayed with no model in a fresh browser; unconfirmed claims are listed and do not fail the criterion. Writesverify-<issue>.json, model-free repro scripts and screenshots, andokproof ingestturns a confirmed refutation into a failed criterion.--replay-onlyreruns saved repros with no model and no key, and exits 1 while a bug still reproduces. - Model-free detectors that run after every action: console errors, uncaught exceptions, failed requests and HTTP 4xx/5xx, unnamed interactive elements, horizontal overflow and (opt in) broken links, confirmed by replay. Severity 3 or more refutes a criterion.
- Anthropic model adapter that needs an explicit key (
OKPROOF_ANTHROPIC_API_KEYornew AnthropicModel({ apiKey })) and never falls back to other credentials.@anthropic-ai/sdkis an optional peer dependency, and anyModelClientcan be used instead. - Project vision, roadmap, governance, trademark policy and CLA.
npm run smoke: packs the package, extracts the tarball and runs the packed CLI and every export path, in CI on Node 22.
Security
- Supply chain: all GitHub Actions pinned by commit SHA, CodeQL, OpenSSF Scorecard, dependency review, DCO check, Dependabot, and zero runtime dependencies.
- Releases are published only by the release workflow, with an npm provenance attestation and an attested tarball.
- Gate bypasses closed: the gate reads proof files, not ledgers, as the source of truth, with regression tests for the bypass cases.
- Linear-time regexes for JUnit attributes and snapshot refs (CodeQL polynomial-ReDoS), and race-free proof reads in the MCP server.
- MCP tools keep
dirinside the working directory.
Known limits
- The Anthropic adapter has been tested against a fake client only, not the live API.
- The driver and verifier need Node 22 or later; the rest runs on Node 20.
- Ledger and proof file formats are not yet documented as a stable schema.