Breviv0.24

Project

Changelog

What changed in each release, newest first, with what is on main for the next one under Unreleased. Built from CHANGELOG.md in the repository; each release's section is also its GitHub release notes.

View as Markdown · source

Each release's section here becomes its GitHub release notes (.github/workflows/release.yml; release-notes.yml re-syncs the notes of an existing release). Benchmark figures are tokens per finished task (code written plus errors read, retries scored as patches), from bench/LEADERBOARD.md. An entry for work by an outside contributor ends with its PR and thanks @handle; the release notes then list everyone thanked, and python3 tools/credits.py checks before a release that no one is missing.

Unreleased#

v0.24.6 (4 Nov 2026)#

Breaking: sandbox. Under --sandbox, and in the MCP tools, which sandbox by default, a program's own # allow read, # allow write or # allow native line no longer grants anything. Only the caller grants capabilities: --allow read,write,native, --allow-py requests,pydantic (CPython for just those Python libraries), or the MCP tools' allow and allow_py arguments. A sandboxed program whose allow line asks for more than the caller granted is refused. If your setup relied on an allow line in the file, pass the flag or MCP argument instead. Without --sandbox nothing changes: a program with an allow line is still held to it.

A security fix release, out ahead of the weekly Monday release: from v0.24.1 to v0.24.5 code written by an AI (or anyone) could free itself from the sandbox by adding an allow line, for example to reach the network through requests. It also brings dynamic builds that call Python libraries instead of falling back to CPython, and native argparse, textwrap, bytes, hashlib, base64 and a faster native random. Release test over two runs on the release commit: Sonnet 1.03x of Python's cost (95% range 0.97x to 1.09x), Haiku 1.02x (0.97x to 1.08x), every task passed on both sides, no check failed because of Brevi, and 47 of 48 and 48 of 48 final programs native (one Sonnet toc program ran in CPython).

v0.24.5 (3 Nov 2026)#

A fix release for four silent wrong outputs in typed builds, the ones the v0.24.4 release test found in its trains and poker checks: a list name set to None by a nested function, changes through nested setdefault, joining tuples, and comparing JSON values. On the 813-program corpus 565 programs build typed, up from 550. Release test over two runs on the release commit: Sonnet 1.06x of Python's cost (95% range 1.01x to 1.12x), Haiku 1.01x (0.95x to 1.07x), every task passed on both sides, no check failed because of Brevi (5 did in v0.24.4), and 48 of 48 and 47 of 48 final programs native (the one Haiku cron_next program ran in CPython).

v0.24.4 (3 Nov 2026)#

Every one of the 48 final release-test programs from v0.24.3's runs now builds natively, with no CPython: enum, io.StringIO, json.JSONDecoder().raw_decode and path text from os and pathlib run natively, and exact fractions.Fraction, bin/hex/oct, startswith with a start index re.S/re.M and csv.writer(sys.stdout) are on the typed path. On the 813-program corpus 550 programs build typed, up from 496, and eight silent wrong outputs are fixed (re groups and tuples, rows changed in a loop, typed $ and re.split, dict keys printed as None). Release test over five runs (four on main before #171 and #172, one on the release commit): Sonnet 1.06x of Python's cost (95% range 1.03x to 1.10x), Haiku 1.03x (0.98x to 1.10x), every task passed on both sides, 120 of 120 and 117 of 120 final programs native. The run on the release commit alone gave 1.02x and 1.03x. Five checks along the way (of 2 tasks, trains and poker) failed under Brevi where CPython passed the same files; the models fixed their code and passed, and those typed-build wrong outputs are being fixed for the next release. The 3 programs that ran in CPython were split into several files, where a module Brevi could not build (a with other than open, except IndexError) sends the whole program to CPython.

v0.24.3 (3 Nov 2026)#

brevi check gives its verdict in well under a second, and checking or running an unchanged program again replays the cached result in about 10 ms: the median check of a new file went from 559 ms to 144 ms (60 of 65 programs under a second, up from 40), and a re-check from 60 ms to 8 ms median. Standard-library calls now run natively instead of in CPython (of 47 probe programs, 19 needed CPython before and 5 now), math and time are on the fast typed path (a math.sqrt/math.log loop over 20 million numbers takes 0.09 s, CPython 1.9 s), and two silent wrong outputs are fixed (re.findall with groups, reading a missing defaultdict key). No new release-test run; the v0.24.2 figures stand.

v0.24.2 (3 Nov 2026)#

Every build off the fast typed path now says which path it took and which function to rewrite, in one JSON line an agent can act on. More plain Python stays on the typed path: of 765 agent-written programs, 477 build typed, up from 429. random and path functions work in the sandbox, Python files can use # allow read as a comment, fallback errors are shorter (--traceback for the whole one), and printing tuple(xs) no longer shows a list. Release test on this build (one run): 1.09x Python's cost for Sonnet and 1.06x for Haiku, every task passed, 23 of 24 final programs native for each model.

v0.24.1 (3 Nov 2026)#

A hardening release before the public preview. brevi run --sandbox can no longer be bypassed, and the MCP server survives programs that never end or flood their output. Plain Python comes first everywhere: the MCP server builds code as main.py, and brevi check, build and run report sure Python mistakes (an undefined name, a method no type has) instead of building them. Dataclasses and string escapes print as in CPython, programs killed by a signal say so, and the npm wrapper is now named brevi, as on crates.io and PyPI. The README and docs were rewritten for first-time visitors, and brevi-lang.org has a documentation section.

v0.24.0 (3 Nov 2026)#

Agents now pay less with Brevi than with Python on heavy work. Told that their Python is compiled to native code, models write the plain solution instead of hand-optimising it; on four tasks with a 10 s limit the whole job cost 0.58x Python's with Sonnet and 0.53x with Haiku, every program built natively and no check failed because of Brevi. On the 24-task release suite, ordinary work, the bar is still met (1.07x Sonnet, 1.00x Haiku). Plain generators and string indexing now build typed and fast, first builds take about 35% less time, and seven bugs found by the new shadow check (each pyb check also runs CPython) are fixed.

v0.23.0 (3 Nov 2026)#

Closes the last big-int gaps from v0.22.0: // and % now work on big integers, and growing numbers shared between functions (closures, nonlocal, global) grow as in Python. bench/compare still matches CPython on all 591 saved agent programs, 13 of 13 traps and 18 of 18 large programs. brevi build x.py --standalone now puts CPython inside the binary, so a program that uses Python libraries runs on a machine without Python. A new architecture doc explains how a file becomes a native program.

v0.22.0 (3 Nov 2026)#

A bug hunt and a head-to-head with Codon and Nuitka. Four rounds of bug hunting fixed the silent wrong answers they turned up (slices with negative steps, list aliasing on the first build attempt, catchable errors, copy.copy, and more), and the comparison found six more bugs, which are also fixed. On the same unchanged Python files, Brevi builds all 591 saved agent programs and all 18 large programs, and every one prints exactly what CPython prints; Codon builds 206 of the 591 and gets 36 of those wrong. Builds are faster by default: brevi run and brevi build without --release beat CPython on all 12 speed programs (1.7x to 40x). With --release, Brevi is level with Codon where Codon builds, and it also runs the object-heavy programs Codon refuses. Sets and deques in typed builds now give constant-time lookups and popleft(). Ints that grow past 64 bits, including values returned from functions (factorials, Fibonacci, recursion), become big ints as in Python. A growing value captured by a closure or nonlocal still stops with an overflow error.

v0.21.0 (2 Nov 2026)#

Brevi passes its release test: over four runs each with Sonnet and Haiku (e31 to e34, each side's prompt cache kept apart), every task passed, plain Python built by Brevi cost 1.10x CPython with Sonnet (right at the 10% bar) and 0.95x with Haiku, and all 48 final programs built natively. Python files the typed build cannot handle now build natively over dynamic values instead of falling back to python3, and Python libraries (numpy, pandas, sqlite3 and any other installed module) run inside native builds through CPython loaded at run time.

v0.20.0 (2 Nov 2026)#

Plain Python now always runs: brevi run x.py builds a native binary when it can and otherwise runs the file with python3, with a one-line note naming what stopped the build. Python objects, rows and records are shared by reference as in Python, values without one fixed type become dynamic values, error classes are real classes, files can be read and written with open(), and tkinter programs build (headless for tests, or a real window with --window). The parity probe of short Python programs shows no silent differences from CPython. On the release test, measured the fair way (runs e25 and e26, right after this release with #104 added, each side's prompt cache kept apart; every task passing), plain Python built by Brevi costs 0.99x CPython with Sonnet and 0.98x with Haiku. 16 of 24 final programs built natively (67%; it varies by run, 39 of 48 in e23 and e24; the bar is 90%), so the release test is not passed yet. Earlier runs (e15 to e24) let CPython reuse the prompt cache Brevi's runs had paid to write, which counted against Brevi (those runs showed 1.04x to 1.08x). brevi-lang.org leads with AI agents again: the fast, safe target for AI-written Python.

v0.19.0 (1 Nov 2026)#

Brevi now aims to build plain Python unchanged ("Python in, Rust speed out"). The release test is a plain-Python trial: models write ordinary Python, Brevi builds it, and the full API cost is compared with running the same models' Python on CPython. In run e14 Brevi costs 1.16x Python with Sonnet and 0.94x with Haiku, from 2.2x and 1.8x this morning. 331 of 580 saved Python solutions build and give the right output unchanged. The release test is not passed yet.

v0.18.0 (31 Oct 2026)#

Closes most of the gap on the six XL tasks (150 to 400 lines, two split over several files): Sonnet 12,630 vs Python 13,128 tokens (4% fewer), Haiku 15,908 vs 15,658 (2% more), from 8% and 13% behind. Brevi was tuned on these runs.

v0.17 (31 Oct 2026, no separate release)#

v0.16 and earlier#