Releases: jkanselaar/python-code-validator
Release list
1.22.0
One key per repository instead of one per run: the action keeps its free key in the workflow cache, so the 25 checks a day are a limit the repository can actually reach rather than a counter that restarts every run.
The run now leaves one comment on the pull request, edited in place on later pushes: what was accepted, what was repaired, and what is left of the day's allowance. It needs permissions: pull-requests: write; without it nothing is written and the job is unaffected, and comment: "false" turns it off.
validate.py is again the same program the service serves at /v1/client, which also brings --write and the remedy text from a refusal to this copy.
1.21.0
A free key now covers 25 static checks a day, and one address gets a few keys a day: the allowance is a trial rather than a supply. Credits carry the rest — a static check costs 1, a repair 3 and a sandboxed run 10 — and can be bought with a card or in xDAI. Nothing in the client behaves differently; the numbers it quotes were wrong after the service changed them.
1.20.2
Credits can be bought with a card: POST /v1/keys/checkout answers with a Stripe Checkout page, and the credits are on the key seconds after it clears — no invoice and nobody to ask. The README now states what a call costs, that an identical call repeated within ten minutes is free, and that xDAI remains the route for an agent with a wallet.
The client reports 1.20.2, which is the validator it talks to.
1.19.2
Leads with what the service proves: state the intent as assertions or doctest lines, the code is run against them in a container with no network and a read-only filesystem, and a fix comes back only when every example passes — 41% repaired and 77% refused on the QuixBugs defects, no false alarms on the corrected programs.
The MCP handshake now also answers the fields a client and a directory display (title, site, icon, instructions), so a listing stays current without being maintained by hand.
v1.19.0
Matches validator service 1.19.0.
- A repeated call is free: the same key asking the same question — same mode, same code, same examples — within ten minutes is answered from the answer it already got, marked
x-msvc-repeat: 1, and charged nothing. An agent that validates at every step is not billed for verdicts that cannot have changed. - Service-side: a model may propose a rewrite when the deterministic search finds nothing, and it is returned only when it defines what the original defined and every example passes in the sandbox (off by default).
No change to the stdio bridge itself.
v1.18.0
Follows service 1.18.0: repair against the caller's examples now also tries a binary expression written the wrong way round, an index or bound that is one out, and a base case returned one step too empty. On the QuixBugs defect set that repairs 41% instead of 18%, refuses the same 77% as not doing what they say, and still raises no false alarm on the corrected programs.
The bridge itself is unchanged; the client carries the service's version so a caller can say which validator it talked to.
Action:
- uses: jkanselaar/python-code-validator@v1.18.0
with:
api-key: ${{ secrets.VALIDATOR_API_KEY }} # optional
1.17.1
Marketplace-ready: the action description now fits the 125-character limit that blocked publishing 1.17.0. No behaviour change.
- Pre-commit users:
rev: v1.17.1. - Action users:
uses: jkanselaar/python-code-validator@v1.17.1.
1.17.0
The action moves to the repository root, which is what makes it usable as uses: jkanselaar/python-code-validator@v1.17.0 and listable in the Actions marketplace.
- Root
action.ymlwith branding; the old.github/actions/validate-pythonpath is gone. - The client names itself (
x-client,VALIDATOR_SOURCE), so traffic from a workflow is countable rather than anonymous. - CI runs the action on this repository's own Python.
- Pre-commit users:
rev: v1.17.0.
1.16.0
The client side of service 1.16.0.
options.examplesin the stdio bridge and the tool schemas: pass what you asked the code to do (assert f(2) == 4, or doctest lines) andexecute_pythonchecks the code against it in the sandbox. Every other check passes on a function that computes the wrong answer; this is the one that does not.- The registry listing leads with that: "Proves AI-generated Python does what you asked".
- Pre-commit users:
rev: v1.16.0.
v1.6.7
Each tool names the tools to use instead of it, so an agent picking between validate_python, repair_python and execute_python is told which one is cheaper and which one actually runs the code. Tracks the service: 1.6.5 applies ruff's own lint fixes during repair, 1.6.6 carries an is None check to the place the value is used.