Skip to content

PROVECODE 0.2.0 beta: Phase 1 harness rules and Phase 2 trusted re-run - #1

Merged
Shriram28Baskar merged 19 commits into
mainfrom
v2/phase-2-trusted-rerun
Nov 22, 2026
Merged

Shriram28Baskar merged 19 commits into
mainfrom
v2/phase-2-trusted-rerun

Conversation

@Shriram28Baskar

Copy link
Copy Markdown
Owner

PROVECODE 0.2.0 beta: Phase 1 (harness and test-body rules) and Phase 2 (trusted re-run), released for use outside this repository. Real-world precision is not yet measured.

What's in it

  • Phase 1 (ADR 0012): harness rules H1–H7 (conftest hooks, plugins, startup files and shadow modules, test selection, CI, coverage, test dependencies) and test-body rules T1–T5, with Tier H frozen before the detector code.
  • Phase 2 (ADR 0013): provecode rerun and check --execute run the base branch's tests against the head code in sealed containers (runs A/B/C), with the overlay, causes X1–X6, and provecode.isolate for contract-owned checks.
  • ADR 0014: blind-spot catalog fixes. A zero-config gate (check --block-on weakening; the Action's contract input is now optional), a Windows CI matrix, the MIT license and a changelog.
  • Fixes made during release verification:
    • the T2 hollowed-helper check was quadratic (kjd/idna guard: about 107 s down to about 5 s);
    • H5 command-parsing false alarms found by the real-history scan.

Verified locally (actual output)

  • pytest engine/tests benchmark/test_benchmark.py: 656 passed, 14 skipped.
  • PROVECODE_DOCKER=1 Docker tests: 15 passed.
  • mypy --strict and ruff check src: clean.
  • benchmark.regenerate: all 642 case results unchanged. Held-out recall: A 97.7%, A-u 96.4%, A-b 100%, H 93.6% (44/47). 0 legitimate edits blocked in every tier.
  • Pyodide parity: 642 cases, 0 mismatches.
  • regenerate --check byte-for-byte (on 47001ba). The site build, lint and Chrome e2e all pass.
  • guard_eval: 399/399 identical to commit mode. Median latency 0.785 s, within ADR 0010's 1 s budget.
  • Trusted re-run on 7 real repositories: all VERIFIED. prettytable's first attempt was INCONCLUSIVE (deps_failed, a network error) and is kept on record.
  • Cheat catalog: round 1 58/58 blocked, 0/19 false alarms; round 2 22/24 blocked, 0/16 false alarms (R05 and R19 are documented runtime-only limits).

Not done

  • The real-history rescan on the final engine (stopped twice by low memory; see ADR 0012).
  • Owner labels for real-world precision.
  • pipx install not tested.
  • Phases 3–6.

…: 9 new repos, 44 patterns, 243 cases, held-out split; before any rule code
…ependent Changeset (ADR 0012)

check and guard now collect conftest, pytest config, CI workflows, coverage config, dependency
files and changed source; a stdlib fail-closed YAML subset parser reads workflows. All seven
brief section 0.3 probes now produce findings. Developed on the Tier H tuning split only (one
logged round); Tiers A, A-u and A-b case results unchanged.
…baseline); YAML subset vs PyYAML on 3,494 real workflow blobs: identical 100%, 0 misparses
…arity; held-out 47/47 weakenings, 0/26 legitimate near-misses flagged

Pyodide 314.0.8 matches CPython on 642/642 cases (A 168, A-u 132, A-b 99, H 243). Tiers A,
A-u and A-b: every case result unchanged (provenance hashes only). README gains the H/T rule
rows and a Known blind spots section; architecture documents the Changeset path.
…lay, X1-X6, provecode.isolate (ADR 0013)

provecode rerun and check --execute run the base branch's tests against the head in sealed
containers. Every brief section 0.3 cheat fails in a real Docker run (A pass, B fail, C pass)
and an honest refactor is VERIFIED. provecode.isolate keeps candidate code out of the process
that judges a contract check; a test shows the forged pass without it and the failure with it.
T3 now resolves imports inside the test function (found by an executed probe).
… results unchanged, parity 642/642); rerun on 7 real repos (all VERIFIED, failed attempts kept); real-history flag rate after ADR 0012

Real-history scan (no contract, flag rate not precision): 502 of 3,032 test-editing commits
flagged (v1 rules: 422); 197 of 2,815 harness-touching commits flagged; 210 commits with H/T
findings listed for the owner to label. Nothing labeled.
…lone INCONCLUSIVE, H4 by simulated collection, non-test tox envs, report schema v2, mypy --strict and ruff clean

- record: contract checks run with only PROVECODE on sys.path and reach the candidate through
  provecode.isolate (closes brief section 0.4); a candidate that forges pytest reports still
  fails chk-cap in a real sealed run. Demo runs re-recorded.
- rerun: X5 alone gives INCONCLUSIVE (the demo's approved cap change was wrongly FAILED);
  lockfile pins, retries on network errors, failed plugin discovery is INCONCLUSIVE.
- H4/H5/H6 precision fixes found on real history; parsing ignores warnings about analyzed code.
- engine/schema/report.v2.json; every report produced in the tests is validated against it.
- corpus test over the 27 pinned repositories and a seeded fuzz test: no crashes.
- mypy --strict and ruff clean; two latent bugs fixed along the way (dropped wheelhouse notes,
  non-mapping base job).
… H cases change), parity 642/642, byte-for-byte check passes; real-history rescan (175 commits for owner labeling)
…, check --block-on weakening without a contract, optional action contract, Windows CI matrix, MIT license, changelog; artifacts regenerated (version and engine hash only, 642/642 case results unchanged)
…> about 5 s) and skip H2's double parse of test modules without pytest_plugins; findings unchanged, 642/642 case results identical, parity 642/642
… commit mode, median 0.785 s (ADR 0010 budget 1 s), kjd/idna 4.2 s; 0/95 legit blocked, 301/304 weakenings blocked
…ox posargs, coverage run -m, option values, widened paths, matrix expressions, shell comments, non-test tox envs); 642/642 case results unchanged, parity 642/642
…engine (FAILED and VERIFIED as expected; only timings and engine_version change)
…engine: all VERIFIED (prettytable after one deps_failed network attempt, kept); Docker tests 15 passed
…nd that the final-engine rescan is pending (stopped twice by low memory)
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
provecode Ready Ready Preview Nov 22, 2026 3:12pm UTC

… H 172/2,815; 179 commits for owner labeling, none labeled); scan script can run in parts and merge (checked equal to a single run)
@Shriram28Baskar
Shriram28Baskar merged commit 0ec9b9e into main Nov 22, 2026
8 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