Skip to content

feat: add zero-config local proof check - #56

Merged
hippoley merged 14 commits into
mainfrom
feat/local-check
Sep 26, 2026
Merged

hippoley merged 14 commits into
mainfrom
feat/local-check

Conversation

@hippoley

@hippoley hippoley commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Goal

Make CounterProof produce useful local evidence before a developer has to open a pull request.

New first-run command

counterproof check

It automatically resolves a base branch, detects or accepts the test runner, runs Regression Witness on HEAD vs BASE, runs Proof Integrity, and prints one scoped local evidence result.

Example:

CounterProof local check

Regression       WITNESSED
Evidence scope   SUBMITTED JUDGE
Proof integrity  CLEAN
Strict gate      PASS
Product oracle   UNVERIFIED

Base             main
Runner           pytest
Evidence mode    PRECISE

The wording is deliberate: a red→green witness plus a clean evidence surface is not called VERIFIED, proof ready, product correctness, or merge readiness.

Strict mode

counterproof check --strict

returns non-zero unless both narrow conditions hold:

  • exact changed-test evidence is WITNESSED;
  • Proof Integrity is CLEAN.

This is a CI-friendly evidence gate, not an approval verdict.

Conservative auto-detection

Base preference:

explicit --base
origin/HEAD
origin/main
origin/master
main
master

CounterProof uses the merge-base with HEAD and refuses to invent a base when none can be resolved. Runner detection reuses the existing onboarding detector; teams can still pass --test-command explicitly.

Real verification

Tests construct a real Git repository, create a feature branch with an actual regression test, run real pytest execution, and perform the detached BASE replay. Clean-install CI also installs the wheel into a fresh environment and executes:

counterproof check --strict

Machine-readable boundary

JSON output keeps the same semantics:

  • status: the evidence status, e.g. witnessed;
  • strict_gate.passed: only the exact-witness + clean-integrity gate;
  • evidence_scope: submitted-judge;
  • oracle_alignment: unverified.

Capability truth

counterproof audit and the public capability JSON list local-check as TESTED only after the real-repository and clean-install paths pass.

Why this matters

Before:

install
→ understand --base
→ understand {tests}
→ determine runner
→ run witness
→ run integrity
→ interpret two results

After:

install
→ counterproof check
→ inspect scoped evidence

This PR changes time-to-first-value without expanding what CounterProof claims the evidence proves.

@hippoley
hippoley merged commit ccb7137 into main Sep 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant