Skip to content
CAI
Software that uses CAICheck a score

pydantic/monty

60.1

Adequate · 14 November 2026

260.8k

lines of production code

Rust

with Python

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add \`collections\` types and expand \`bytes\` methods

The \collections\ module now includes \deque\, \namedtuple\, \defaultdict\, and \Counter\, providing standard Python container types. The \bytes\ type has been significantly expanded with new methods for case transformation, searching, stripping, splitting, and padding, along with encoding/decoding support. Additionally, a new \CallableIterator\ type implements the two-argument \iter(callable, sentinel)\ pattern, handling re-entrant Python calls and garbage collection correctly.

crates/monty/src/types · high confidence

Add antigravity example running in a Monty sandbox

The antigravity example is now available in the browser, running the xkcd 353 comic inside a Monty WebAssembly sandbox. The Python script (\antigravity.py\) is restricted to only \random\ and \time\ imports, while DOM access is provided via host objects and functions defined in \main.ts\. The example uses a loop with \time.sleep()\ for animation instead of \set\_interval\ to comply with sandbox restrictions on passing functions to the host.

examples/antigravity · high confidence

Add expense analysis example demonstrating custom budget handling

The \examples/expense\_analysis\ directory now contains a complete example that analyzes team travel expenses against both standard and per-user custom budgets. The example includes simulated data for five team members, where only one user (Bob) has a specific custom budget limit. The main script demonstrates how to use the \pydantic\_monty\ library to execute Python code that iterates through team members, sums their Q3 travel expenses, and identifies those exceeding their applicable budget (standard or custom), outputting a summary of over-budget details.

_examples/expense\analysis · high confidence

Add json module with loads and dumps functions

The \json\ module is now available, providing \json.loads()\ to parse JSON text into Monty values and \json.dumps()\ to serialize Monty values into JSON text. The implementation supports standard keyword arguments such as \indent\, \sort\_keys\, \ensure\_ascii\, \allow\_nan\, \separators\, and \skipkeys\, while intentionally omitting CPython kwargs like \cls\ and \default\. Parsing uses the \jiter\ library for performance and includes a per-run string cache to deduplicate repeated strings during \loads()\. The module also exposes \JSONDecodeError\ for handling syntax errors.

crates/monty/src/modules/json · high confidence

Added Julia set rendering examples

New example scripts demonstrate rendering Julia sets: \julia.py\ generates ASCII art in the terminal, while \julia\_image.py\ uses the Monty sandbox to compute escape counts and renders a PNG image on the host using Pillow.

examples · high confidence

Browser support via Web Workers

Monty now runs in the browser by executing the Python interpreter inside Web Workers. This change introduces a browser-specific worker factory, a dedicated entry point for the worker thread, and a shared channel layer that manages request-response lifecycles, hard per-turn timeouts, and worker termination. The pool infrastructure is unified so that both Node.js (using \worker\_threads\) and browsers (using \Web Worker\) present the same \Monty\ API, allowing users to run Monty directly in the browser without a Node.js backend.

crates/monty-js/ts/worker · high confidence

Expanded standard library coverage with new and extended modules

This update significantly broadens the Python standard library available in the sandbox. New modules include \asyncio\ (providing \run\, \gather\, and \sleep\), \copy\ (supporting \copy\ and \deepcopy\ for various heap types), \functools\ (adding \reduce\ and the \partial\ type), \gc\ (exposing \collect\, \enable\, and \disable\ for test hooks), and \itertools\ (implementing a wide range of iterators like \count\, \repeat\, \chain\, \accumulate\, \takewhile\, and more). Existing modules have also been extended: \base64\ now covers all codecs including ascii85 and MIME helpers, \binascii\ is fully implemented with checksums and encoding pairs, and \datetime\ exposes its core types (\date\, \datetime\, \time\, \timedelta\, \timezone\). A new \CLAUDE.md\ guide establishes strict CPython parity requirements for argument binding and error messages across all modules.

crates/monty/src/modules · high confidence

Initial devcontainer configuration for local development

Added a new devcontainer setup (devcontainer.json and setup.sh) to enable development within Codespaces or VS Code Remote Containers. This configuration provisions an Ubuntu 24.04 environment with Rust, Node.js, and SSH, and automates the installation of Python and JavaScript dependencies via uv and make. It specifically addresses pyo3 build requirements by configuring a shared libpython and updating system loader paths to ensure datatest and benchmark binaries run correctly.

.devcontainer · high confidence

Initial release of @pydantic/monty for JavaScript/TypeScript

This change introduces the \monty-js\ crate, enabling users to run Python code within Monty's sandbox from JavaScript and TypeScript environments. The package provides a public API for creating execution pools and sessions, allowing code to be fed and executed with support for inputs, print callbacks, and state retention across feeds. It supports both Node.js (using subprocess workers) and browser environments (using Web Workers via WASM). The release includes a build script that synchronizes the package version with the Cargo workspace, TypeScript type definitions for the native addon, and a test suite using Vitest to verify the public API contract.

crates/monty-js · high confidence

Introduce \`monty-types\` crate for sandbox boundary data structures

The \monty-types\ crate is added to define the core data types used at the sandbox boundary, including the \MontyObject\ arena-based graph for serializing Python values, \MontyException\ with CPython-matching traceback formatting, \FileMode\ for parsing \open()\ mode strings, and \PrintWriter\ for handling print output with memory caps. This establishes the foundational types for passing data between the host and the sandboxed environment.

crates/monty-types/src · high confidence

Introduce async/await support and versioned dump format

The interpreter now supports Python's async/await syntax, introducing coroutine objects, external futures, and task scheduling types in the new \asyncio\ module. To support session persistence with these new types, the dump serialization format has been updated to version 13, switching to CBOR encoding and embedding session metadata (script name, type-check state) directly in the dump header.

crates/monty/src · high confidence

Introduce elastic worker pool with subprocess and WebSocket transports

The \monty-pool\ crate now provides an elastic pool of sandboxed workers that can be reached either by spawning local subprocesses or by connecting to remote workers over WebSocket. The pool manages worker lifecycle, including pre-warming, on-demand spawning, and transparent replacement of crashed workers. Checkouts (REPL sessions) can be configured with resource limits, type checking, and custom print buffering. The WebSocket transport supports custom connect headers for authentication or tracing, and enables session persistence with automatic resume capabilities when connections drop.

crates/monty-pool/src · high confidence

Introduce in-memory overlay mount mode for sandboxed filesystems

The \monty-fs\ crate now supports an \OverlayMemory\ mount mode, allowing sandboxed code to perform copy-on-write filesystem operations where writes are captured in memory rather than persisted to the host. This mode provides a sandbox boundary that is enforced structurally via \cap\_std\ descriptors, preventing path escapes and symlink traversal, while maintaining a configurable memory budget to limit the size of retained overlay data. The implementation includes a new dispatch layer that routes filesystem requests to either direct or overlay backends, ensuring that read-only mounts and write limits are strictly enforced.

crates/monty-fs/src · high confidence

Introduce memory-limiting global allocator for workers

The \monty-alloc\ crate now provides a custom global allocator that enforces a hard memory ceiling on untrusted Python workers. By tracking live byte usage at the allocation level, the worker terminates itself (via exit code or abort) if it exceeds the configured budget, preventing resource exhaustion. This mechanism complements the interpreter's soft-limit checks by providing a hard safety net that catches all allocator-backed memory requests.

crates/monty-alloc · high confidence

Introduce native Rust bindings for the Monty JavaScript runtime

This change adds the \monty-js\ crate, providing the native Rust layer for the Monty TypeScript/JavaScript bindings. It implements bidirectional conversion between Monty sandbox values and JavaScript types (including \BigInt\, \Map\, \Set\, and \Buffer\), exposes a crash-isolated execution pool via \NativePool\ and \NativeSession\, and configures resource limits and OS policies (such as timezone, sleep, and datetime sources) for the sandboxed environment. Additionally, it bridges Monty's telemetry pipeline to the Node.js event loop and provides structured exception handling with detailed traceback support.

crates/monty-js/src · high confidence

Introduce pydantic-monty Python client package with sandboxing and OS access APIs

The \pydantic-monty\ package is now available as a Python client for the Monty sandboxing runtime. It exposes core execution classes (\Monty\, \AsyncMonty\, \MontySession\) and configuration types like \ResourceLimits\ and \OSPolicy\ for controlling sandbox behavior. The package includes \MountDir\ for mapping host directories into the sandbox with configurable modes (read-only, read-write, or overlay) and limits, as well as \CollectString\ and \CollectStreams\ for capturing print output with memory caps. It also provides \instrument\_telemetry\ for OpenTelemetry integration and a CLI shim (\python -m pydantic\_monty\) to invoke the underlying \monty\ binary.

crates/monty-python/python · high confidence

Introduce pydantic-monty-client package with sandboxing features

The \crates/monty-python\ location now contains the source for the \pydantic-monty-client\ package, a Python client for connecting to the Monty sandbox via websockets or local workers. This release adds support for setting a virtual working directory via the \cwd\ parameter, exposes snapshot source positions for debugging, and integrates OpenTelemetry tracing context into snapshots. It also introduces resource limits such as \max\_suspensions\ to abort feeds, configurable OS policies for time and random number generation, and a \max\_urandom\_bytes\ cap to prevent memory exhaustion from unseeded random requests.

crates/monty-python · high confidence

Introduce sandboxed Python execution with host integration and observability

This change adds the TypeScript client library for the Monty sandbox, enabling Node.js applications to spawn and manage isolated Python worker subprocesses. It introduces the \Monty\ class for managing a pool of crash-isolated workers and the \MontySession\ class for driving Python code via \feedRun\ and \feedStart\. The library provides a \MountDir\ API to safely expose host directories to the sandbox with configurable access modes (read-only, read-write, or overlay) and memory limits. It also includes a \ClassInstance\ wrapper to expose host JavaScript objects to Python with strict attribute and method policies, and integrates OpenTelemetry for tracing and telemetry across the host-sandbox boundary. Also in this area: 2 commits (1 fix) modifying (repo-wide); 1 commit (0 fixes) modifying (repo-wide); Improved resilience for FutureSnapshot auto-resume and background pool refilling; Support for Python's decimal.Decimal type; Add WebSocket-based remote worker pool to the JavaScript client; and 1 more.

crates/monty-js/ts · low confidence · unverified

Introduce standalone CLI and protocol subprocess modes for the Monty sandbox

The \monty-runtime\ crate now provides a dual-mode execution entry point: a standalone CLI for interactive REPLs, file execution, and command-line scripts, and a \subprocess\ mode for protocol-driven child processes. The CLI exposes granular resource controls including memory limits, feed/turn durations, recursion depth, suspension caps, and sleep budgets, alongside features like host directory mounting, working directory configuration, and optional type checking. The subprocess mode implements a strict turn-based protocol over framed protobufs on stdin/stdout, handling crash isolation and memory limit enforcement per session to support parent orchestrators like \monty-pool\.

crates/monty-runtime/src · high confidence

Introduce vendored typeshed stubs for Monty's type checker

The new \monty-typeshed\ crate provides a trimmed, vendored subset of Python's typeshed stubs that powers Monty's static type checking. By shipping only the stubs for the stdlib modules Monty actually implements (such as \collections\, \math\, \json\, and \datetime\), the type checker now fails early on unsupported builtins or modules rather than passing type checking and failing at runtime. The crate includes a build script that zips these stubs into the binary, ensuring type checking works without external files, and exposes a \file\_system()\ API for the type-checking crate to resolve standard library modules.

crates/monty-typeshed · high confidence

Introduce versioned wire protocol for subprocess communication

The \monty-proto\ crate now defines the v1 wire protocol schema (\monty/v1/monty.proto\) used to drive a Python subprocess child process. This protocol establishes a strict request-response alternation where the parent sends \ParentRequest\ messages and the child replies with \ChildEvent\ streams, enabling features like timezone support, arbitrary-precision integers, and user-defined classes to cross the process boundary. The schema includes its own versioning mechanism, allowing the parent to declare a supported protocol version and the child to reject incompatible requests, ensuring safe evolution of the interface independent of the main package version.

crates/monty-proto/proto · high confidence

Introduces WebAssembly Component Model runtime for browser sessions

Adds a new \monty-wasm-runtime\ crate that implements the Monty worker as a WebAssembly Component Model guest, enabling persistent Python sessions in the browser via Web Workers. This runtime replaces the previous protobuf-based wire protocol with a flat, index-based arena for value serialization, ensuring that protobuf bytes never cross the component boundary into JavaScript. It enforces resource limits (memory, suspensions, sleep duration) via a custom allocator and provides a typed interface for handling requests, events, and OS calls within the sandboxed environment.

crates/monty-wasm-runtime · high confidence

Introduces memory-safe wire protocol with allocation budgets and versioning

The \monty-proto\ crate now enforces strict memory safety on the wire protocol by introducing a cumulative decode budget that charges allocations before they occur, preventing unbounded memory growth from malicious or corrupted payloads. This is implemented via a new \BudgetVec\ type for fallible vector growth, a \FrameReader\ with a 256 MiB frame length cap, and a 1 GiB per-frame decode budget. The wire schema version has been bumped to 5 (dropping support for versions 3 and 4), and the protocol now supports flat arena layouts for value serialization, replacing the previous recursive \MontyObject\ tree structure. Additionally, a new \generate.rs\ tool ensures generated protobuf code stays in sync with the schema, and a \validate\_requirement\ function guards against command-line injection in package requirements.

crates/monty-proto/src · high confidence

Introduction of a new bytecode-based virtual machine and compiler

Monty replaces its previous tree-walking interpreter with a new stack-based virtual machine and bytecode compiler. This change introduces a new \bytecode\ module containing the \Code\ object format, a \CodeBuilder\ for emitting instructions, and the \Compiler\ that transforms the AST into bytecode. The new system supports a comprehensive set of opcodes for stack manipulation, constants, variables, binary/unary/comparison operations, control flow (jumps, loops, try/except), and function calls, enabling more efficient execution and better integration with source location tracking for tracebacks.

crates/monty/src/bytecode · high confidence

Native dataclass support and host-sandbox object bridging

The sandbox now supports native Python \@dataclass\ definitions, including field-based construction, synthesized \\_\init\\\, \\\repr\\\, \\\eq\\\, and \\\hash\\_\ (with \eq\ and \frozen\ options), as well as \is\_dataclass\ and \ClassVar\ handling. Additionally, a new \pydantic\_monty\ module introduces \ClassInstance\ and \ClassType\ wrappers, allowing host-side objects and classes to be passed into the sandbox with explicit policies for attribute exposure and method calls, ensuring identity round-trips for returned instances. Also in this area: 1 commit (0 fixes) modifying crates/monty-fs, crates/monty-types, monty-workspace; 1 commit adding/updating tests in crates/monty-runtime, monty-workspace; Fix text append behavior for byte-backed files; Added tests for the decimal module; OSAccess now prevents invalid file and directory renames; and 3 more.

monty-workspace · medium confidence · unverified

New AI agent skills for code review and documentation parity

Added a suite of AI agent skills under \.agents/skills/\ to standardize pull request reviews and documentation maintenance. These include a \docs-parity-reviewer\ to ensure changes are reflected across all documentation surfaces (README, docs site, limitations, and crate READMEs), a \coverage\ skill to fetch Codecov diff data, and specialized review skills for general bugs, security risks, usability, and verbosity. The \fix-pr-comments\ skill and its \pr-threads.sh\ helper enable agents to automatically resolve review threads from known bots, while \writing-style\ and its \rewrap\_md.py\ utility enforce consistent, concise documentation prose. Also in this area: Agent now processes maintainer review comments alongside bot feedback.

.agents · high confidence

New Python sandbox runtime crate with async support and strict error handling

The \monty-python\ crate (now part of the \pydantic-monty\ package) introduces the core Python sandbox runtime, providing both synchronous (\PyMonty\) and asynchronous (\PyAsyncMonty\) execution modes. It adds comprehensive exception handling with a dedicated \MontyError\ hierarchy (including \MontySyntaxError\, \MontyRuntimeError\, and \MontyTypingError\) to ensure sandbox failures are properly surfaced to Python code. The runtime includes robust input validation, rejecting unknown resource limit keys and invalid UTF-8 in source code, and supports filesystem mounting via \MountDir\ with configurable access modes. Async execution is enabled through \async\_dispatch.rs\, allowing coroutines to be awaited or spawned as Tokio tasks, while \callback\_context.rs\ ensures proper OpenTelemetry context propagation during host callbacks.

crates/monty-python/src · high confidence

New SQL Playground example for cross-format sentiment analysis

Added a new example demonstrating how to combine SQL queries on CSV data with JSON processing and external sentiment analysis within a sandboxed environment. The example shows how to join customer purchase data with social media tweets, perform loop-based external calls for sentiment scoring, and use type checking to validate LLM-generated code before execution.

_examples/sql\playground · high confidence

New automated Rust API reference documentation generator

The \monty-apidoc\ crate now generates the Rust API reference pages for the documentation site. It runs the pinned nightly \rustdoc\ to produce JSON, then renders that data into Markdown files under \docs/api/rust/\. The generator handles signature reconstruction, converts rustdoc-style intra-doc links into resolved Markdown links, and demotes headings to fit the mkdocs/Starlight layout. It also configures specific reading orders and feature flags for each crate (such as \monty\, \monty-pool\, and \monty-types\) to ensure the generated pages reflect the correct public API surface.

crates/monty-apidoc · high confidence

New built-in functions: abs, all, any, bin, chr, divmod, enumerate, eval, exec, filter, format, getattr, hasattr, hash, hex, id, isinstance, len, locals, map, min, max

The \crates/monty/src/builtins\ module now includes implementations for a wide range of Python built-in functions. This adds support for \abs\ (handling \i64::MIN\ overflow by promoting to \LongInt\), \all\ and \any\ (short-circuiting iterable checks), \bin\, \hex\, and \oct\ (integer-to-string conversion), \chr\ and \ord\ (Unicode code point conversion), \divmod\, \enumerate\ (returning a list of tuples), \eval\ and \exec\ (compiling and running source snippets), \filter\ (returning a list), \format\ (using the runtime format spec mini-language), \getattr\ and \hasattr\ (attribute access with default handling), \hash\ (hashing objects), \id\ (object identity), \isinstance\ (type checking including tuples of classes and unions), \len\ (container length), \locals\ (local variable snapshot), \map\ (applying functions to iterables), and \min\/\max\ (finding extremes with optional \key\ and \default\ arguments).

crates/monty/src/builtins · high confidence

New bytecode VM implementation with async support and standard operations

The \crates/monty/src/bytecode/vm\ module has been replaced with a new bytecode interpreter implementation. This change introduces full async execution support, including coroutine awaiting, task scheduling, and gather future handling. It also adds comprehensive implementations for standard Python operations: attribute access (including lazy host-routed lookups for \getattr\/\hasattr\), binary and unary operators, function calls (builtins, defined functions, and external/OS calls), collection building (lists, dicts, sets, slices), comparison operations, context managers (\with\ statements), exception handling with traceback support, and f-string formatting.

crates/monty/src/bytecode/vm · high confidence

New class-instance examples across the sandbox boundary

Added a new set of Python and TypeScript examples in the \examples/classes\ directory that demonstrate how to expose host objects to the sandbox using \ClassInstance\ and \ClassType\. These examples cover identity round-trips, lazy attribute fetching, async method invocation, class member access, and sandbox-defined class proxies, providing runnable reference implementations for both languages.

examples/classes · high confidence

New data-driven test harness and PGO training tool

The \monty-datatest\ crate now provides a data-driven test harness that runs Python test cases against both the Monty runtime and CPython to detect behavioral divergences, and a separate \pgo-exercise\ binary that exercises the Monty binary with the test corpus to generate profile-guided optimization data. This includes support for test configuration directives (such as expected failures, timezone settings, and resource limits) and automatic handling of suspensions during test execution.

crates/monty-datatest · high confidence

New development and testing utility scripts

Added a suite of Python scripts to support development, testing, and performance analysis: \bench\_type\_checking.py\ benchmarks type-checking latency; \complete\_tests.py\ auto-fills test expectations using CPython; \cpython\_watchdog.py\ provides thread-interrupt support for test timeouts; \flamegraph\_to\_text.py\ converts flamegraph SVGs to LLM-readable text; \gen\_unicode\_type.py\ generates Rust Unicode property tables from CPython; \run\_nasty\_code.py\ and \run\_traceback.py\ execute code snippets and capture tracebacks for testing; \startup\_latency\_chart.py\ and \startup\_performance.py\ measure and visualize startup latency; and \websocket\_relay.py\ bridges WebSocket connections to local Monty subprocesses for remote worker testing.

scripts · high confidence

New packaging scripts for platform-specific npm packages and WASM component bindings

Added three new build scripts in the \scripts\ directory to streamline the creation of platform-specific npm packages and WASM component bindings. \assemble-packages.mjs\ orchestrates the final packaging process, extracting the \monty\ CLI binary from Python wheels and bundling it alongside native addons for various platforms (macOS, Linux, Windows). \create-platform-packages.mjs\ patches the generated npm manifests to ensure the CLI binary is included and kept unpacked for subprocess execution. \build-component.mjs\ handles the generation of TypeScript bindings and WASM components from the Rust runtime using \@bytecodealliance/jco\, enabling the library to run in browser Web Workers and Node.js worker threads.

crates/monty-js/scripts · high confidence

New procedural macros for Python argument parsing and host calls

The \monty-macros\ crate now provides \\#\[derive(FromArgs)\]\ and \\#\[derive(ToArgs)\]\ procedural macros. \FromArgs\ generates code to parse Python function arguments (positional, keyword, varargs, and varkwargs) into typed Rust structs, supporting various CPython argument-parsing styles for accurate error reporting. \ToArgs\ performs the inverse, projecting Rust structs back into host call arguments. These macros streamline the implementation of Python builtins and methods by automating argument validation, type coercion, and refcount management.

crates/monty-macros/src · high confidence

New protocol conversion layer for Monty-to-protobuf serialization

This change introduces the \crates/monty-proto/src/convert\ module, which handles the serialization and deserialization of Monty runtime types to and from protobuf wire formats. It implements conversions for core execution data including \MontyObject\ graphs, \ResourceLimits\ (with safe saturation for 32-bit hosts), and \OsFunctionCall\ payloads (supporting file operations, timezone handling, and sleep durations). It also adds robust, validated conversion for \MontyException\ tracebacks and error data (JSON and Unicode), ensuring that untrusted child-process data is sanitized against size limits and malformed fields before reaching the host. Additionally, it covers conversion for \OsPolicy\ (sandbox configuration), resume payloads (call results, name lookups, futures), and type-checking configuration formats.

crates/monty-proto/src/convert · high confidence

New sandbox-to-host object serialization layer

The \monty-proto\ crate now includes a complete Python boundary implementation (\crates/monty-proto/src/python\) that handles bidirectional serialization of Python objects to and from the sandbox. This adds support for encoding and decoding complex types including containers, \datetime\ objects, file handles, and exceptions, while preserving object identity and sharing. It introduces a proxy system (\PyMontyClassProxy\, \PyMontyStdTypeProxy\) for objects that cannot be directly materialized on the host, ensuring that sandbox output remains safe and controlled.

crates/monty-proto/src/python · high confidence

New telemetry system for pool health and session tracing

The pool now records aggregate metrics (worker counts, checkout wait times, session and turn durations, suspension counts, and data volumes) and structured traces mirroring the protocol conversation. These are delivered via a new \TelemetryAdapter\ bridge for foreign-language hosts and directly to Logfire for Rust hosts, with W3C trace context propagation to link pool activity to upstream services. Also in this area: 2 commits (1 fix) modifying (repo-wide); 1 commit (0 fixes) modifying (repo-wide); Background refill of worker processes to maintain minimum pool size; Support for Python's decimal.Decimal type; Host modules can now be imported in the sandbox.

crates/monty-pool/src/telemetry · medium confidence · unverified

New type-checking crate with benchmarking and in-memory database

The \monty-type-checking\ crate introduces a new capability for validating Python source code via an in-memory type checker. It provides a \TypeChecker\ API that accepts source files and optional stubs, returning structured diagnostics. The implementation relies on a custom \MemoryDb\ built on Salsa and \ty\_python\_semantic\, handling file writes, revision bumping, and cleanup to ensure isolation between sessions. Additionally, the crate includes benchmarks (\benches/type\_check.rs\) to measure steady-state type-checking performance for trivial, builtin, and REPL-like sequences.

crates/monty-type-checking/src · high confidence

Spreadsheet example using openpyxl

Added a new example in the \examples/spreadsheet\ directory that demonstrates reading an Excel workbook via the \openpyxl\ library within a sandboxed environment. The example wraps \openpyxl\ objects as host objects, cleans untidy data from an order sheet, and returns the results as a list of \Row\ dataclasses, while enforcing strict confinement limits on file access and memory usage.

examples/spreadsheet · high confidence

Behavioural changes

1 commit (0 fixes) modifying crates/monty/src/sorting

A change to existing behaviour in crates/monty/src/sorting — 1 commit, 2 files: “Sort with a port of CPython's timsort (\#1232)” (refs \#1232).

crates/monty/src/sorting · medium confidence · unverified

1 commit (0 fixes) modifying examples/browser\_cdp

A change to existing behaviour in examples/browser\_cdp — 1 commit, 2 files: “Add a \browser\_cdp\ example (\#1244)” (refs \#1244).

_examples/browser\cdp · medium confidence · unverified

17 commits (0 fixes) modifying crates/monty/src/modules/dataclasses

A change to existing behaviour in crates/monty/src/modules/dataclasses — 17 commits, 5 files: “Support \@dataclass(eq=..., frozen=...)\ (\#650)”; “add \allocate\_as\ helper for typed allocation (\#781)”; “avoid passing \self\_id\ around (\#765)”; and 14 more (refs \#650, \#781, \#765, \#626, \#668, …).

crates/monty/src/modules/dataclasses · medium confidence · unverified

19 commits (0 fixes) modifying crates/monty/src/modules/collections

A change to existing behaviour in crates/monty/src/modules/collections — 19 commits, 3 files: “add \allocate\_as\ helper for typed allocation (\#781)”; “Add \collections\: deque, namedtuple, defaultdict, Counter (\#608)”; “Tweaks to resource tracker intermittence (\#706)”; and 16 more (refs \#781, \#608, \#706, \#857, \#668, …).

crates/monty/src/modules/collections · medium confidence · unverified

2 commits (0 fixes) modifying crates/monty-bench

A change to existing behaviour in crates/monty-bench — 2 commits, 1 file: “move datatests & benches to separate crates (\#325)”; “Split CodSpeed walltime from shared x86 simulation and memory (\#1087)” (refs \#325, \#1087).

crates/monty-bench · medium confidence · unverified

3 commits (0 fixes) modifying crates/monty

A change to existing behaviour in crates/monty — 3 commits, 28 files: “Reject ASTs too deep to drop instead of overflowing the stack (\#1324)”; “Implement int.bit\_length() and int.bit\_count() (\#1326)”; “Unify string operations on PyStr (\#1325)” (refs \#1324, \#1326, \#1325). Also in this area: 2 commits (1 fix) modifying (repo-wide); Added test coverage for sandbox execution and runtime behavior.

crates/monty/tests/snapshots · medium confidence · unverified

9 commits (0 fixes) modifying crates/monty-bench/benches/python

A change to existing behaviour in crates/monty-bench/benches/python — 9 commits, 46 files: “Add \pyperformance\ benchmarks (\#996)”; “Register interpreter benchmarks from the python/ directory (\#1057)”; “Make len and indexing O(1) on ASCII heap strings (\#1127)”; and 6 more (refs \#996, \#1057, \#1127, \#1055, \#1106, …).

crates/monty-bench/benches/python · medium confidence · unverified

The \.claude\ directory is initialized with a new configuration file (\settings.json\) that enables the \codspeed@claude-plugins-official\ plugin and restricts the agent's ability to execute \git push\ commands, requiring user confirmation. Additionally, symbolic links are created to point the \agents\ and \skills\ directories to their respective locations in the parent \.agents\ directory, establishing the local agent configuration structure.

.claude · high confidence

Custom type stubs for Monty's standard library modules

The type checker now receives custom \.pyi\ stubs for \asyncio\, \base64\, \binascii\, \copy\, \functools\, \os\, \random\, \sys\, \time\, and \unicodedata\ that are trimmed to match Monty's actual runtime capabilities. By omitting features not implemented in Monty (such as \bytearray\/\memoryview\ in \base64\/\binascii\, file-object encoding in \base64\, or \lru\_cache\ in \functools\), type errors are caught at check time rather than causing \AttributeError\ at runtime. These stubs are generated from upstream typeshed and copied into the vendor directory by \update.py\ to keep type checking aligned with Monty's minimal standard library surface.

crates/monty-typeshed/vendor · high confidence

Introduce stable heap with trial-deletion cycle collection

The heap implementation now uses a paged arena (\StableHeap\) that guarantees address stability, allowing safe shared-reference allocation and efficient repeated access via \HeapReader\. It also integrates a trial-deletion cycle collector (Bacon–Rajan) to detect and collect reference cycles, and switches serialization of heap entries to use CBOR for snapshot stability. Also in this area: 3 commits (0 fixes) modifying crates/monty; Decimal module implementation and float formatting performance improvements; Dataclass methods are now generated and stored on the heap; Support for host-provided modules and file iteration buffering.

crates/monty/src/heap · medium confidence · unverified

New argument binding system for native and Python functions

The argument binding logic for both native (Rust-implemented) and user-defined Python functions has been restructured into dedicated modules (\bind\_native.rs\ and \bind\_python.rs\) with a shared \FromValue\ trait for type coercion. This change introduces a new \ArgValues\ enum in \mod.rs\ that optimizes for common call patterns (0-2 arguments) to reduce heap allocations, and implements CPython-compatible error ordering for arity checks, keyword conflicts, and type mismatches during function calls.

crates/monty/src/args · high confidence

Python parser switched from python-parser to rustpython-parser

The project has replaced the \python-parser\ crate with \rustpython-parser\ for parsing Python source code. This change updates the underlying AST generation logic, requiring adjustments to how parsed nodes are mapped to internal representations (such as the \Node\ and \Expr\ enums). Users will benefit from the improved compatibility and feature set provided by the RustPython parser, although specific behavioral differences in edge cases may arise due to the change in parsing engine.

src · high confidence

Rust quickstart documentation included in library crate

The \crates/monty-doctest\ library now includes the Rust quickstart guide as its primary documentation via \include\_str!\, enabling the examples to be treated as doctests. A specific Clippy lint expectation is added to allow four-space list indentation in the markdown content, ensuring the documentation compiles without warnings.

crates/monty-doctest · high confidence

Updated wire protocol definitions for datetime and timezone support

The generated Rust types for the \monty.v1\ wire protocol have been updated to include new message structures for \Date\, \Time\, \DateTime\, and \TimeZone\. This change enables the serialization and deserialization of Python datetime objects with timezone awareness (including UTC offsets and timezone names) and fold information for ambiguous times, aligning the protocol with the newly added \datetime.time\ and timezone support features.

crates/monty-proto/src/generated · high confidence

Test coverage

15 commits adding/updating tests in crates/monty-types/tests; 2 commits adding/updating tests in crates/monty-python/tests/rust; 7 commits adding/updating tests in crates/monty/tests/fixtures; Add comprehensive test cases for argument validation, async behavior, and chained assignment; Added compile-fail tests for HeapReader API soundness; Added comprehensive test coverage for the Monty wire protocol; Added comprehensive type-checking test suite; Added end-to-end tests for pool metrics, worker lifecycle, and WebSocket transport; Added fuzz testing targets for interpreter stability; Added integration tests for CLI mounts and subprocess mode; Added integration tests for monty-fs mount confinement and security; Added smoke tests for Node and browser environments; Added test coverage for sandbox execution and runtime behavior; Added tests for wire protocol repeated field budgeting; Initial test suite for pydantic\_monty sandbox execution; New benchmark suite for decoding, interpreter execution, and subprocess pool overhead; New test suite for the JavaScript sandbox runtime.

Dependencies

Initial release of Monty 1.0.0 with full workspace structure

This change introduces the Monty 1.0.0 release, establishing the complete project workspace. It adds the \monty-js\ package (version 1.0.0) for Node.js/TypeScript bindings, including its \package.json\ and \package-lock.json\, and the \monty-python\ client package for Python integration. The Rust workspace is reorganized into multiple crates (e.g., \monty\, \monty-pool\, \monty-proto\, \monty-types\, \monty-fs\, \monty-alloc\, \monty-wasm-runtime\, \monty-runtime\, \monty-type-checking\, \monty-datatest\, \monty-bench\, \monty-doctest\, \monty-fuzz\, \monty-apidoc\, \monty-macros\, \monty-typeshed\) with their respective \Cargo.toml\ manifests. The \Cargo.lock\ is updated to version 4, reflecting the new dependency graph. The release also includes example projects (\antigravity\, \classes\) and a metapackage \pydantic-monty\ that combines the client and runtime components.

(dependencies) · high confidence

Housekeeping

Initial repository configuration and tooling setup

This change establishes the foundational development environment and project metadata for Monty. It introduces configuration files for code formatting and linting (\.rustfmt.toml\, \.python-version\, \clippy.toml\, \.yamlfmt.yaml\, \.mdformat.toml\), sets up pre-commit hooks for automated checks (\.pre-commit-config.yaml\), and defines the CI coverage reporting settings (\.codecov.yml\). It also adds the project license, a Makefile for managing build and test workflows, documentation scaffolding (\mkdocs.yml\, \README.md\, \CLAUDE.md\), and the Python dependency lockfile (\uv.lock\).

(repo-wide) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 59 → 60 (+1.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 68 → 66 (-1.9)
  • Architecture 83 → 82 (-0.5)
  • Maturity 64 → 64 (+0.5)
  • Readiness 61 → 62 (+1.2)
  • Security 51 → 53 (+2.0)
  • Performance 94 → 94 (+0.0)

Resolved (146)

  • Change coupling: init.py ↔ lib.rs (crates/monty-python/python/pydantic_monty/init.py)
  • Change coupling: str.rs ↔ str__methods.py (crates/monty/src/types/str.rs)
  • Child::drive (cognitive 16) (crates/monty-proto/src/worker.rs)
  • Child::handle_resume_call (cognitive 17) (crates/monty-proto/src/worker.rs)
  • Child::handle_resume_stubs (cognitive 18) (crates/monty-proto/src/worker.rs)
  • Child::handle_resume_stubs (cyclomatic 16) (crates/monty-proto/src/worker.rs)
  • ClassTooLong: Child (crates/monty-proto/src/worker.rs)
  • Duplicated block (10 lines × 2) (crates/monty-python/src/pool.rs)
  • Duplicated block (10 lines × 2) (crates/monty/src/heap/mod.rs)
  • Duplicated block (10 lines × 2) (crates/monty/src/types/str.rs)
  • Duplicated block (10–11 lines × 2) (crates/monty/src/repl.rs)
  • Duplicated block (11 lines × 2) (crates/monty/src/bytecode/vm/async_exec.rs)
  • Duplicated block (11 lines × 2) (crates/monty/src/types/str.rs)
  • Duplicated block (11–12 lines × 3) (crates/monty/src/bytecode/compiler.rs)
  • Duplicated block (12 lines × 2) (crates/monty/src/types/bytes.rs)
  • Duplicated block (12 lines × 2) (crates/monty/src/types/bytes.rs)
  • Duplicated block (12 lines × 2) (crates/monty/src/types/list.rs)
  • Duplicated block (13 lines × 2) (crates/monty-js/src/telemetry.rs)
  • Duplicated block (13 lines × 2) (crates/monty/src/types/str.rs)
  • Duplicated block (16–20 lines × 2) (crates/monty/src/prepare.rs)
  • …and 126 more

New (520)

  • Change coupling: dict.rs ↔ iter.rs (crates/monty/src/types/dict.rs)
  • Change coupling: list.rs ↔ tuple__ops.py (crates/monty/src/types/list.rs)
  • Change coupling: mod.rs ↔ str__methods.py (crates/monty/src/types/str/mod.rs)
  • Change coupling: range.rs ↔ mod.rs (crates/monty/src/types/range.rs)
  • Change coupling: tuple.rs ↔ tuple__ops.py (crates/monty/src/types/tuple.rs)
  • Change coupling: worker.rs ↔ lib.rs (crates/monty-proto/src/worker.rs)
  • Checkout::abort_if_over_budget (cognitive 16) (crates/monty-pool/src/checkout.rs)
  • Checkout::turn_io_raw (cognitive 36) (crates/monty-pool/src/checkout.rs)
  • Checkout::turn_io_raw (cyclomatic 23) (crates/monty-pool/src/checkout.rs)
  • ClassTooLong: Worker (crates/monty-proto/src/worker.rs)
  • Critical CVE: [GHSA redacted] (Cargo.lock)
  • Critical CVE: [GHSA redacted] (Cargo.lock)
  • Duplicated block (10 lines × 2) (crates/monty/src/repl.rs)
  • Duplicated block (10 lines × 2) (crates/monty/src/run.rs)
  • Duplicated block (10 lines × 2) (crates/monty/src/types/itertools/count.rs)
  • Duplicated block (11 lines × 2) (crates/monty-datatest/src/main.rs)
  • Duplicated block (11 lines × 2) (crates/monty/src/types/list.rs)
  • Duplicated block (11 lines × 2) (crates/monty/src/types/str/mod.rs)
  • Duplicated block (11 lines × 2) (crates/monty/src/types/str/mod.rs)
  • Duplicated block (12 lines × 2) (crates/monty-python/src/pool.rs)
  • …and 500 more

Changes since last survey

  • 91 commits — 86 feature/other, 5 fixes

By area

  • crates/monty — 44 commits
  • .github/workflows — 10 commits
  • (root) — 8 commits
  • crates/monty-pool — 8 commits
  • crates/monty-python — 6 commits
  • crates/monty-js — 5 commits
  • crates/monty-proto — 3 commits
  • crates/monty-fs — 2 commits
  • .github/dependabot.yml — 1 commit
  • crates/monty-bench — 1 commit
  • crates/monty-type-checking — 1 commit
  • crates/monty-types — 1 commit
  • examples/web_scraper — 1 commit

Notable commits

  • fix: Fix CI on Rust 1.100 (#1318)
  • fix: Fix in-place mutation for builtin containers (#1229)
  • fix: Fix out-of-range bounds in str and bytes methods (#1136)
  • fix: Fix session disposal race in websocket header test (#1167)
  • fix: Fix type checking for open builtin (#943)
  • change: Unify string operations on PyStr (#1325)
  • change: Add UTF-8 string access benchmarks (#1306)
  • change: Add Value::InlineString variant (#994)
  • change: Add annotationlib, get_type_hints formats and PEP 563 handling (#1194)
  • change: Add datetime.fromtimestamp() and date.fromtimestamp() (#1170)
  • change: Add typing.get_type_hints() (#1126)
  • change: Add a browser_cdp example (#1244)
  • change: Add exclusive file creation to the filesystem protocol (#1245)
  • change: Add numeric fast paths for binary arithmetic (#1090)
  • change: Add the fnmatch module (#1172)
  • change: Add the statistics module (#1277)
  • change: Allow checkouts to confirm subprocess termination (#1215)
  • change: Allow hosts to lower the protocol decode budget (#1145)
  • change: Apply the checkout's os_policy to restored sessions (#1225)
  • change: Avoid repeated full-string scans in indexing and search (#1195)
  • …and 71 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

pydantic/monty was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ec229a66959b740b695de69d42cb50d460207da5 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.