Skip to main content

Verification harness for AI-generated code

Project description

goalie

Status: learning project, not maintained. goalie was built to explore this idea end to end — design, implementation, dogfooding on itself, publishing — and it does what it says. It is not actively developed and issues will likely go unanswered. If you want this class of tool for real work, look at CrossHair's diffbehavior command (old-vs-new behavior comparison via symbolic execution) and Hypothesis's hypothesis write ghostwriter (property-test generation). Both are maintained and cover this space well.

Verification harness for AI-generated code. Checks that a diff actually does what it should, using oracles independent of whoever (or whatever) wrote it — and returns machine-readable verdicts an agent loop can act on.

Commands

goalie diff-test     # old vs new implementation on generated inputs
goalie properties    # generate + run property-based tests  [planned]

diff-test

For refactors, the old implementation is a free oracle. goalie extracts changed functions from the git diff, generates inputs with Hypothesis, and runs both versions:

{
  "target": "core/rolling.py::rolling_max",
  "verdict": "FAIL",
  "examples": 2000,
  "seed": 42,
  "counterexample": {
    "kwargs": { "xs": "[1, 2, 2]", "w": "2" },
    "old": "2",
    "new": "1"
  }
}

Deterministic, reproducible from the seed, no LLM involved. Add one line to your AGENTS.md / CLAUDE.md and your agent has to prove its refactor preserved behavior before calling it done.

properties

An LLM proposes Hypothesis invariants for a function; they're written to tests/properties as plain Python code you review and commit. Generation uses a model once — execution is deterministic forever. Automatic functions update detection by checking signature changes upon running the code. Properties are run via pytest as simple tests, without any additional infrastructure.

Roadmap

v0 — diff-test end-to-end on pure-ish typed functions ✅ v0.1 — pipx install goalie, CI exit codes, kwargs/exceptions handling ✅ v0.2 — properties ✅ v0.3 mutate vx.x — MCP server mode, bench, stateful testing

Out of scope: sandboxing, non-Python, greenfield code with nothing to diff against.

Status

diff-test v0 implemented. Design spec: docs/superpowers/specs/2026-07-24-diff-test-design.md

Quickstart

uv sync
uv run goalie diff-test

Report written to .goalie/latest.json and .goalie/reports/. To waive an intentional behavior change:

uv run goalie waive path/to/file.py::function_name --reason "<why>"

Running tests

Agent-verifiable suite (green):

uv run pytest --ignore=tests/human -q

Gated suite — behavioral tests for the human-owned modules (src/goalie/discovery.py, src/goalie/orchestrator.py), green since they were implemented:

uv run pytest tests/human -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goalie-0.2.0.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goalie-0.2.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file goalie-0.2.0.tar.gz.

File metadata

  • Download URL: goalie-0.2.0.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for goalie-0.2.0.tar.gz
Algorithm Hash digest
SHA256 20460c190f9bdb1e13b8bd74c5559b94f7412a52b8f09f561e1958f59de0ee3d
MD5 0f41f04b4dce3b45453d7e605961f5dd
BLAKE2b-256 fb8b022777a0881a8c6de9fa1520414478bdcbf8ae705d230d799109fab3baa7

See more details on using hashes here.

File details

Details for the file goalie-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: goalie-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for goalie-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8b9f9714a8996650b224963c0f13a4096a287476ff41c52fdc2402177598c1f
MD5 5f456df4445e4f42f6a702e361b80ae8
BLAKE2b-256 41caaa4ab3c73eac9618fdda9f4c16477d2183c0ed8922fe078eabe2cfd970c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page