Skip to content

About

Evidence-bound measurement of silent false acceptance in AI-assisted software engineering.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

fa-patchward — standalone measurement tool

Version 0.2.0.

fa-patchward measures a conditional silent-false-accept rate from frozen tasks, explicit agent outcomes, and separately supplied evaluator evidence. It is a measurement instrument, not a verdict layer, merge gate, model ranking, or general proof of code correctness.

The repository includes the strict evidence/report/verify path and a smoke adapter. It does not bundle a provider integration or launch a benchmark evaluator. A complete live-agent public-benchmark chain must be qualified separately before any public measurement claim.

Version coordination

The currently published PyPI release fa-patchward 0.1.0 predates this strict evidence contract and uses an earlier workflow. This repository's 0.2.0 source release is intentionally not presented as the same interface.

Until a 0.2.0 package is actually published on PyPI, an ordinary pip install fa-patchward may install the existing stable 0.1.0. Use this repository's source instructions for the 0.2.0 release. No PyPI upload is implied by the GitHub source release.

Install from source and run the test suite

The core package has no runtime dependencies. Dataset selection uses the optional datasets dependency; real benchmark evaluation uses a separately provisioned evaluator.

python -m pip wheel --no-deps --no-build-isolation . -w dist
python -m venv .venv
.venv/bin/python -m pip install --no-deps dist/fa_patchward-0.2.0-py3-none-any.whl
python tests/test_gauge.py
python tests/test_strict.py

Fresh strict measurement contract

  1. Commit the completed preregistration before measuring; pin the public dataset revision and its test split. select --from-ids requires the same public membership check as seeded sampling. Use --synthetic --from-ids only for offline smoke tests.
  2. Freeze the IDs, exact solver payload and selection manifest. Preserve those exact files in an immutable evidence store before running. SHA-256 checks consistency, not authorship, trusted timestamps or authenticity.
  3. Run one adapter invocation per task. done requires a nonblank patch; abstain requires an explicit empty string. Launch, timeout, exit and protocol errors remain errors. This release supports one attempt per frozen ID and no retries.
  4. A separately controlled evaluator must evaluate accepted patches and issue a receipt binding exact raw reports and patch bytes to the run. fa-patchward does not launch that evaluator, certify evaluator authenticity, isolate arbitrary processes, or generate ground truth.
  5. Compute the report and run verify. A successful verify proves internal consistency of the supplied evidence and rendered outputs, not authenticity or general correctness.

Illustrative command shape:

fa-patchward init --dir work
fa-patchward select --dataset SWE-bench/SWE-bench_Lite --split test --revision "$DATASET_COMMIT" --preregistration-commit "$PREREG_COMMIT" --n 50 --seed 50 --out frozen
fa-patchward run --tasks frozen/tasks.txt --agent 'python work/my_agent.py' --label candidate-agent --run-id run1 --out predictions.jsonl
fa-patchward report --tasks frozen/tasks.txt --predictions predictions.jsonl --reports evaluator-reports --evaluation evaluation.json --label candidate-agent --out report
fa-patchward verify --tasks frozen/tasks.txt --predictions predictions.jsonl --reports evaluator-reports --evaluation evaluation.json --report-dir report

Between run and report, the operator must separately provision the evaluator, evaluate accepted patches, retain its raw records and construct evaluation.json from those records using adapters/README.md.

The solver must not receive evaluator inputs/results, reference patches or privileged credentials. The subprocess boundary is not a sandbox. Public measurement also requires immutable runtime/environment pins, rights review, and independent verification.

External imports

The strict schema also supports source="external-import" for an already completed external run. External provenance and attempt records are operator-supplied assertions; Self-check binds and reconciles them but does not authenticate the provider or runtime. See adapters/README.md.

What the number means

Every frozen ID receives exactly one disposition:

  • shipped_correct
  • silent_false_accept
  • apply_failed
  • abstained
  • unscored
  • missing
  • agent_error

Only applied, definitively evaluated, explicitly declared shipments enter the denominator.

rate = silent_false_accept / (shipped_correct + silent_false_accept)

When that denominator is zero, the rate and confidence interval are undefined (null), not zero. Coverage, correct yield and declared shipments are separate. Exact Clopper-Pearson intervals describe a binomial model; they do not establish representativeness or independence of selected tasks. Synthetic figures are not public-benchmark measurements.

results.csv, summary.json and RESULTS.md are recomputed byte-for-byte by verify, including bound input hashes. A coherent forgery of all inputs is outside its guarantees.

Keep predictions, attempt ledgers, run receipts, evaluator receipts and raw evaluator reports private unless you are authorized to publish them. Default ignore patterns cover common output locations but are not a complete data-loss-prevention control.

Historical replay — distinct mode

Historical source: kolesnikov-arch/patchward at commit 44f4573.

Historical artifacts are not vendored. The inherited report-authoritative statistic was 17/50 wrong evaluated/applied outcomes (34%, exact 95% interval about 21.2–48.8%). Two historical prediction patches were blank while the reports recorded evaluated/applied patches; their original bytes and cause are unresolved. No missing bytes are reconstructed.

Opt-in original-byte replay:

python tests/test_gauge.py --historical-artifacts /path/to/evaluation-artifacts

The replay checks pinned blob hashes and performs report-authoritative reconciliation only. It is not a fresh model run or benchmark rerun.

See PROVENANCE.md and WHERE_THIS_STOPS.md.

Licensing

See LICENSE.

The identified Python source, adapters and tests are MIT. Documentation/prose and published/generated results are CC BY-NC 4.0 as stated in LICENSE. Historical third-party benchmark materials are not included.

Repository configuration/package metadata and historical locator metadata are included for build and reproducibility purposes. No additional license grant for those files is implied beyond the actual LICENSE text and any file-specific notice.

Security and contributions

For vulnerabilities see SECURITY.md. For contributions see CONTRIBUTING.md. Do not put credentials, customer code, private reports or sensitive evaluator evidence in public issues.

About

Evidence-bound measurement of silent false acceptance in AI-assisted software engineering.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages