Skip to content

chore(engine): update monty to v0.0.11 - #2364

Merged
ilblackdragon merged 6 commits into
stagingfrom
chore/update-monty-v0.0.11
Apr 13, 2026
Merged

ilblackdragon merged 6 commits into
stagingfrom
chore/update-monty-v0.0.11

Conversation

@ilblackdragon

Copy link
Copy Markdown
Member

Summary

  • Bump embedded Python interpreter (pydantic/monty) from pinned rev 7a0d4b7 to tagged release v0.0.11
  • Upstream changes: ~2x faster JSON loads, ~1.6x faster dumps, filesystem mounting, Rust-side async API, mount edge case fixes
  • No Python-level syntax changes — CodeAct preamble unchanged
  • Updated MONTY.md with new pin reference and changelog entry

Test plan

  • cargo check -p ironclaw_engine — compiles cleanly
  • cargo test -p ironclaw_engine — 366 engine tests pass
  • Full workspace tests — 4702 passed, 0 failed
  • Post-deploy: monitor traces for new NotImplementedError patterns (per MONTY.md step 6)

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings April 12, 2026 06:57
@github-actions github-actions Bot added scope: docs Documentation scope: dependencies Dependency updates size: XS < 10 changed lines (excluding docs) risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Apr 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 monty git dependency from a pinned commit to tag = "v0.0.11".
  • Update Cargo.lock to reflect Monty 0.0.11 and the new git source reference.
  • Update crates/ironclaw_engine/MONTY.md to 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" }

Copilot AI Apr 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +5 to +6
**Source**: `git = "https://github.com/pydantic/monty.git", tag = "v0.0.11"`
**Pinned at**: `v0.0.11` (2026-04-10)

Copilot AI Apr 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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").

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
monty = { git = "https://github.com/pydantic/monty.git", tag = "v0.0.11" }
monty = { git = "https://github.com/pydantic/monty.git", rev = "2e9df4b508e8a9ac80f3a6a26ed680242d1f460d" }
References
  1. Pin git dependencies to a specific commit hash (rev) for reproducible builds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same rationale — tag= is standard Cargo, Cargo.lock has the SHA. No change.

Comment on lines +5 to +6
**Source**: `git = "https://github.com/pydantic/monty.git", tag = "v0.0.11"`
**Pinned at**: `v0.0.11` (2026-04-10)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
**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
  1. Pin git dependencies to a specific commit hash (rev) for reproducible builds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the short commit hash in the limitations header to stay consistent with the pinning strategy.

Suggested change
## Current Limitations (as of pin `v0.0.11`)
## Current Limitations (as of pin 2e9df4b)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The changelog should use the short commit hash as the primary reference for the pin, following the pattern of previous entries.

Suggested change
| 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. |

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using version tag in changelog going forward — more meaningful than a short hash. No change.

@ilblackdragon
ilblackdragon enabled auto-merge (squash) April 12, 2026 13:07
ilblackdragon and others added 2 commits April 12, 2026 22:09
`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>
Copilot AI review requested due to automatic review settings April 12, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 include asyncio (while the CodeAct preamble does list it). Consider adding asyncio to 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.

Comment thread crates/ironclaw_engine/MONTY.md Outdated
Comment on lines +17 to +30
@@ -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 |

Copilot AI Apr 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
ilblackdragon and others added 2 commits April 12, 2026 22:16
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>
@ilblackdragon ilblackdragon added the skip-regression-check Bypass regression test CI gate (tests exist but not in tests/ dir) label Apr 12, 2026
[skip-regression-check]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@henrypark133 henrypark133 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, os module behavior)
  • [skip-regression-check] label appropriate for docs + dependency change

No issues found. LGTM.

This was referenced Apr 16, 2026
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules scope: dependencies Dependency updates scope: docs Documentation size: XS < 10 changed lines (excluding docs) skip-regression-check Bypass regression test CI gate (tests exist but not in tests/ dir)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants