All notable changes to Greenlock are documented here. Format loosely follows Keep a Changelog; versions follow SemVer.
0.1.1 — 2026-06-19
Usability + multi-language accuracy. Coverage-based confidence now spans Python, JS, Go
and Rust (with tree-sitter precision parity), plus a unified greenlock CLI, doctor,
actionable reject hints, PR comments, a pre-commit hook, and PyPI publishing.
- Unified
greenlockCLI. A single console command with subcommands instead of the scatteredgreenlock-gate/-mcpscripts (and the README's non-existentgreenlock init):greenlock gate <repo> <diff>— verify a unified diff (--applyapplies it iff MERGE);greenlock check [repo]— gate your git changes with no manual diff (--staged,--against <ref>);greenlock doctor [repo]— report what Greenlock can verify here (languages, oracle, toolchains, Docker, coverage backends, expected confidence);greenlock harden,greenlock init,greenlock mcp,greenlock --version. The module forms (python -m greenlock.gate …) still work.
- Actionable REJECT hints — the CLI now prints how to fix a rejection (run
greenlock hardenfor missing coverage,--trustfor danger, etc.). - GitHub Action posts the verdict — writes a job summary and, on reject, a PR comment
with the reason (
comment: "false"to disable; needspull-requests: write). pre-commitframework support —.pre-commit-hooks.yamlso repos can add Greenlock to.pre-commit-config.yaml(runsgreenlock check --staged).- PyPI publishing —
publish.ymlbuilds and publishes via PyPI Trusted Publishing on release; once live,pip install greenlockprovides thegreenlockcommand. - Coverage-based confidence across supported languages (WS-1 multi-language).
confidence=fullnow requires changed lines to be exercised by the suite, per language:- JavaScript — built-in V8 coverage (
NODE_V8_COVERAGE); a line counts only if the tightest enclosing V8 range hascount > 0. Validated end-to-end. - Go —
go test -coverprofile; coverprofile blocks withcount > 0. - Rust —
cargo-llvm-cov --lcov(cargo has no built-in line coverage); LCOVDA:. - Python — stdlib
sys.settrace(already shipped in 0.1.0). Parsers (V8 / coverprofile / LCOV) are unit-tested. Fail-open everywhere: missing toolchain, no profile, or no data for a file never blocks a green patch — coverage only degrades on positive evidence that changed code wasn't executed.customverifier (arbitrary commands) has no generic coverage. Note: Go/Rust integration is not yet validated against a live toolchain in CI (none installed); the tested parsers + fail-open wiring make this safe (worst case: no-op).
- JavaScript — built-in V8 coverage (
- Precision parity with Python. For JS/Go/Rust the set of changed lines that require
coverage is computed via tree-sitter (
code_changed_lines): comments, blank/brace lines, declaration signatures and imports are excluded — so a comment- or signature-only change no longer falsely degrades, matching the Python AST-based behavior. Falls back to a heuristic without tree-sitter.
0.1.0 — 2026-06-19
First public alpha. A deterministic verify-gate for AI-generated code changes: a patch is applied only if the oracle is green (closed-world ✔, the project's own tests pass, no regression), otherwise refused. Headline: WRONG-APPLY = 0.
- gate — verify-only (
python -m greenlock.gate <repo> <diff>): closed-world check- the project's own test suite + regression vs. baseline →
merge/reject. Exit0/1for CI and pre-commit hooks. Also a generate-and-gate mode.
- the project's own test suite + regression vs. baseline →
- execution isolation —
--isolated(orGREENLOCK_DOCKER=1) runs the whole gate inside a locked Docker container (--network none, read-only rootfs, non-root, dropped caps, CPU/mem/PID limits, repo mounted read-only). Fail-closed if Docker is unavailable. Honored consistently by the CLI and the MCP server. - testgen — characterization (golden-master) tests so untested code gets a safety net.
- danger-check — rejects patches introducing
eval/exec/os.system/subprocess/ test-environment detection before the oracle runs.--trust/GREENLOCK_TRUSTmakes it advisory for trusted authors / self-CI. - delivery rails — MCP server (
greenlock-mcp) and a GitHub Action (action.yml). - closed-world grounding — deep for Python & JavaScript; conservative (zero false positives) for Go & Rust via tree-sitter; other languages oracle-only.
- Honest coverage-based confidence —
confidence=fullnow requires the changed lines to actually be exercised by the suite (stdlibsys.settrace, no new deps). Untested changes degrade → reject instead of a false MERGE. (Python/pytest only — see Known limitations.) - Fail-closed oracle — a baseline/verify failure now yields a clean REJECT instead of crashing the gate.
- closed-world index includes symbols introduced by the patch (no false reject on multi-file changes).
- isolation keys split —
GREENLOCK_DOCKER= strong whole-gate isolation everywhere; the weaker per-command runner moved toGREENLOCK_VERIFIER_DOCKER.
- Coverage-based confidence is Python/pytest only. The
node/go/rust/customverifiers still treat a green suite as full confidence, so an untested change in those languages can still merge. Multi-language coverage is the next milestone. - Coverage uses in-process tracing — execution in subprocesses spawned by the test suite is invisible to it; such suites may under-report coverage (fail-open: never blocks a green patch on a measurement gap).
- Not a sandbox unless
--isolated. The verifier executes the repo's tests; run untrusted patches with--isolated(needs a builtgreenlock:latestimage) or in an ephemeral environment. SeeSECURITY.md. - Alpha: limited real-world validation; not yet on PyPI (install from source).