Reviewing a pull request with okproof
For a reviewer or tester who does not run builds or tests and does not edit the repository. okproof can help on the review side, but only with what it already does. This page says what that is and what is not built yet.
What works today, read-only
The author (or the author's coding agent) keeps the criteria in .okproof/<issue>.md and the tests tagged [okproof:<id>]. CI runs the tests. You then read, and run nothing:
- The check run and PR comment from the okproof Action show each criterion as met, failed, unproven, untested, insufficient, flaky, partial or wrong-build, with the evidence level.
- Download the CI results (the JUnit or CTRF artifact) and run
npx okproof explain <id> --results <file>for one criterion, ornpx okproof gate --results <file>for the whole verdict. These read files; they do not run tests. npx okproof lintreads the test source and flags weak or unrelated assertions. It does not execute anything.npx okproof check --issue-body <file> --issue <n>compares the proof file with the issue text and shows criteria that were added, removed or reworded after the issue was written.
What to check as a reviewer
- Every criterion in the issue has a criterion in the proof file, with the same meaning.
- Every criterion has a test that really asserts it (not an empty or trivial one).
- The pull request did not weaken a criterion: reworded it to be easier, lowered its evidence level, added
pre, or deleted it. Today you read the diff of.okproof/for this. Put.okproof/under CODEOWNERS so a change to it needs your approval (see trust.md).
Criteria changes and the reviewer table
npx okproof criteria-diff --base origin/mainlists every change to the criteria since the base and marks the ones that weaken the proof (removed, reworded, level lowered,preadded,{verify}dropped, id moved).npx okproof review --results junit.xml --base origin/mainprints one table per pull request: criterion, what changed in it, result and level, the tests that claim it (with file and line, and whether that file changed in this pull request), and flags.- In CI the Action runs both:
criteria-guardfails the gate on a weakening change andreviewer-tablewrites the table to the job summary. A weakening change is approved by adding theokproof-criteria-changelabel. The Action reads the label from the event, so the workflow must run on label changes:on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled]. Withoutlabeled, adding the label does nothing until the next push. - A change to
.okproof/still deserves a human read. Put it under CODEOWNERS so the approval is recorded.
Criteria from a table of cases
If the issue keeps its cases as a table, okproof sync --issue <n> --table "<heading>" --id-col ID --text-col Expected turns each row into a criterion with the case id as its stable id.
Limits
okproof still needs an .okproof/ folder in the repository, so a reviewer who cannot add files needs the author to add them first. The guard compares proof files, not the meaning of a reworded criterion: it tells you a criterion changed and shows the old text.