chore(engine): update monty to v0.0.11 - #2364
Conversation
Bump the embedded Python interpreter (pydantic/monty) from rev 7a0d4b7 to the v0.0.11 release. Notable upstream changes: ~2x faster JSON loads/~1.6x faster dumps, filesystem mounting, Rust-side async API additions, and mount edge case fixes. No Python-level syntax changes, so the CodeAct preamble is unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the embedded Monty (Rust-native Python interpreter) dependency to the v0.0.11 release and aligns repository documentation/lockfile with the new pin.
Changes:
- Bump
montygit dependency from a pinned commit totag = "v0.0.11". - Update
Cargo.lockto reflect Monty0.0.11and the new git source reference. - Update
crates/ironclaw_engine/MONTY.mdto reference the new pin and add a changelog entry.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/ironclaw_engine/Cargo.toml | Updates Monty dependency specification to v0.0.11 tag. |
| Cargo.lock | Locks Monty to 0.0.11 with updated git source metadata. |
| crates/ironclaw_engine/MONTY.md | Updates pin/source references and adds a v0.0.11 changelog entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ironclaw_skills = { path = "../ironclaw_skills", version = "0.1.0", default-features = false } | ||
| chrono = { version = "0.4", features = ["serde"] } | ||
| monty = { git = "https://github.com/pydantic/monty.git", rev = "7a0d4b75b72e6ddacafaf36e26486186cdb6eb68" } | ||
| monty = { git = "https://github.com/pydantic/monty.git", tag = "v0.0.11" } |
There was a problem hiding this comment.
Using a git tag here makes the dependency specification potentially mutable if the upstream tag is ever moved/retagged. For maximum reproducibility, consider pinning monty by immutable rev (commit SHA) and optionally documenting the corresponding tag in a comment/release note.
There was a problem hiding this comment.
Tags are the standard Cargo convention for versioned git deps, and Cargo.lock already pins the exact commit SHA for reproducible builds. Keeping tag= is intentional.
| **Source**: `git = "https://github.com/pydantic/monty.git", tag = "v0.0.11"` | ||
| **Pinned at**: `v0.0.11` (2026-04-10) |
There was a problem hiding this comment.
The doc says "Pinned at v0.0.11" but the dependency is referenced by a git tag (which can be retargeted). To make the pin unambiguous and reproducible for future audits, consider also recording the exact commit SHA from Cargo.lock alongside the tag (or change wording from "Pinned" to "Tagged").
There was a problem hiding this comment.
The tag name is more useful than a bare SHA for humans reading this doc. The exact commit is always in Cargo.lock. No change needed.
There was a problem hiding this comment.
Code Review
This pull request updates the monty dependency to version 0.0.11, which introduces significant JSON performance improvements, filesystem mounting, and a Rust-side async API. The review feedback suggests pinning the dependency to a specific commit hash (rev) rather than a tag in Cargo.toml to ensure reproducible builds, and recommends updating the documentation in MONTY.md to reflect this pinning strategy consistently across the file.
| ironclaw_skills = { path = "../ironclaw_skills", version = "0.1.0", default-features = false } | ||
| chrono = { version = "0.4", features = ["serde"] } | ||
| monty = { git = "https://github.com/pydantic/monty.git", rev = "7a0d4b75b72e6ddacafaf36e26486186cdb6eb68" } | ||
| monty = { git = "https://github.com/pydantic/monty.git", tag = "v0.0.11" } |
There was a problem hiding this comment.
The project's general rules require git dependencies to be pinned to a specific commit hash (rev) to ensure reproducible builds. While tags are more stable than branches, they can still be modified. Please use the full commit hash corresponding to the v0.0.11 tag.
| monty = { git = "https://github.com/pydantic/monty.git", tag = "v0.0.11" } | |
| monty = { git = "https://github.com/pydantic/monty.git", rev = "2e9df4b508e8a9ac80f3a6a26ed680242d1f460d" } |
References
- Pin git dependencies to a specific commit hash (rev) for reproducible builds.
There was a problem hiding this comment.
Same rationale — tag= is standard Cargo, Cargo.lock has the SHA. No change.
| **Source**: `git = "https://github.com/pydantic/monty.git", tag = "v0.0.11"` | ||
| **Pinned at**: `v0.0.11` (2026-04-10) |
There was a problem hiding this comment.
The documentation should be updated to reflect the use of a commit hash for pinning, consistent with the Cargo.toml file and the project's coding standards.
| **Source**: `git = "https://github.com/pydantic/monty.git", tag = "v0.0.11"` | |
| **Pinned at**: `v0.0.11` (2026-04-10) | |
| **Source**: git = "https://github.com/pydantic/monty.git", rev = "2e9df4b508e8a9ac80f3a6a26ed680242d1f460d" | |
| **Pinned at**: 2e9df4b (2026-04-10, "v0.0.11") |
References
- Pin git dependencies to a specific commit hash (rev) for reproducible builds.
There was a problem hiding this comment.
Keeping version tag as primary reference in docs for readability. No change.
| 6. **Watch traces**: After deploying, check traces for new `NotImplementedError` patterns (self-improvement mission catches these) | ||
|
|
||
| ## Current Limitations (as of pin `7a0d4b7`) | ||
| ## Current Limitations (as of pin `v0.0.11`) |
There was a problem hiding this comment.
Using version tag for readability. No change.
|
|
||
| | Date | Pin | Notable changes | | ||
| |------|-----|-----------------| | ||
| | 2026-04-10 | `v0.0.11` | JSON perf improvements (~2x loads, ~1.6x dumps), filesystem mounting, Rust-side async API, mount edge case fixes. | |
There was a problem hiding this comment.
The changelog should use the short commit hash as the primary reference for the pin, following the pattern of previous entries.
| | 2026-04-10 | `v0.0.11` | JSON perf improvements (~2x loads, ~1.6x dumps), filesystem mounting, Rust-side async API, mount edge case fixes. | | |
| | 2026-04-10 | 2e9df4b | JSON perf improvements (~2x loads, ~1.6x dumps), filesystem mounting, Rust-side async API, mount edge case fixes. | |
There was a problem hiding this comment.
Using version tag in changelog going forward — more meaningful than a short hash. No change.
`await` and `asyncio.gather()` work for tool calls and llm_query() via Monty's ExternalFuture/ResolveFutures mechanism. Only `async def` (defining custom coroutines) is unsupported. The previous wording incorrectly said async/await was not available at all. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
crates/ironclaw_engine/MONTY.md:46
- This file now references
asyncio.gather()as a supported workaround, but the “Available built-in modules” list below doesn’t includeasyncio(while the CodeAct preamble does list it). Consider addingasyncioto the module list here to keep the documentation internally consistent.
| `async def` | Cannot define your own coroutines; `await` and `asyncio.gather()` work for tool calls and `llm_query()` via Monty's ExternalFuture mechanism |
| Type aliases (`type X = ...`) | Omit type annotations |
| Template strings (t-strings) | Use f-strings |
| Complex number literals | Use floats |
| Exception groups (`try*/except*`) | Use regular try/except |
### Limited standard library
`import csv`, `import os`, `import io`, etc. still fail.
Available built-in modules:
- `datetime` — date and time handling
- `json` — JSON encoding/decoding
- `math` — standard math functions
- `re` — regex (basic)
- `sys` — system info (limited)
- `os.path` — path manipulation (limited)
- `typing` — type hints (limited, for annotation only)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -27,7 +27,7 @@ These are documented in `prompts/codeact_preamble.md` so the LLM avoids them: | |||
| | `del` statement | Reassign to None | | |||
| | `yield` / `yield from` | Use lists and list comprehensions | | |||
| | `*expr` (starred expressions) | Unpack explicitly | | |||
| | `async` / `await` | Not available; tool calls suspend the VM automatically | | |||
| | `async def` | Cannot define your own coroutines; `await` and `asyncio.gather()` work for tool calls and `llm_query()` via Monty's ExternalFuture mechanism | | |||
There was a problem hiding this comment.
The doc claims these limitations are documented in prompts/codeact_preamble.md, but the preamble currently doesn’t mention that async def is unsupported (and it also describes llm_query() as returning a string rather than an awaitable). This can cause the LLM to generate async def helpers or call llm_query() without await, which won’t match the actual ExternalFuture behavior. Please update crates/ironclaw_engine/prompts/codeact_preamble.md accordingly (or adjust this section to avoid asserting it’s documented there).
Remove features that actually work in Monty v0.0.11 from the "not supported" lists: - async def / await / asyncio.gather() — fully supported - *expr star unpacking in assignments — fully supported - generator expressions — work (yield statements still don't) Clarify: - class: host-provided dataclasses work, user-defined classes don't - yield: generator expressions work, yield statements don't - os module: available (os.getenv, os.path), not just os.path - asyncio module: available (asyncio.gather) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
import os succeeds in Monty but the executor blocks all OsFunction calls (os.getenv, Path.*, os.environ) with OSError. Document this explicitly and remove os from the available modules list. Agents must use injected tools (shell, read_file, etc.) for OS operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
henrypark133
left a comment
There was a problem hiding this comment.
Review: Monty v0.0.11 bump + doc corrections (Risk: Low)
Clean dependency bump with accurate documentation updates. All CI green.
Positives:
- Moves from pinned git rev to tagged release — cleaner dependency management
- MONTY.md and CodeAct preamble corrections accurately reflect v0.0.11 capabilities (async/await,
*expr,osmodule behavior) [skip-regression-check]label appropriate for docs + dependency change
No issues found. LGTM.
* chore(engine): update monty to v0.0.11 Bump the embedded Python interpreter (pydantic/monty) from rev 7a0d4b7 to the v0.0.11 release. Notable upstream changes: ~2x faster JSON loads/~1.6x faster dumps, filesystem mounting, Rust-side async API additions, and mount edge case fixes. No Python-level syntax changes, so the CodeAct preamble is unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(engine): correct async/await limitation in MONTY.md `await` and `asyncio.gather()` work for tool calls and llm_query() via Monty's ExternalFuture/ResolveFutures mechanism. Only `async def` (defining custom coroutines) is unsupported. The previous wording incorrectly said async/await was not available at all. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(engine): correct stale limitations in MONTY.md and CodeAct preamble Remove features that actually work in Monty v0.0.11 from the "not supported" lists: - async def / await / asyncio.gather() — fully supported - *expr star unpacking in assignments — fully supported - generator expressions — work (yield statements still don't) Clarify: - class: host-provided dataclasses work, user-defined classes don't - yield: generator expressions work, yield statements don't - os module: available (os.getenv, os.path), not just os.path - asyncio module: available (asyncio.gather) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(engine): clarify os module is blocked, not available import os succeeds in Monty but the executor blocks all OsFunction calls (os.getenv, Path.*, os.environ) with OSError. Document this explicitly and remove os from the available modules list. Agents must use injected tools (shell, read_file, etc.) for OS operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: retrigger with regression check skip [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
7a0d4b7to tagged releasev0.0.11MONTY.mdwith new pin reference and changelog entryTest plan
cargo check -p ironclaw_engine— compiles cleanlycargo test -p ironclaw_engine— 366 engine tests passNotImplementedErrorpatterns (per MONTY.md step 6)🤖 Generated with Claude Code