chore(deps): move monty to crates.io 0.0.19#2201
Merged
Merged
Conversation
Monty published 0.0.19 to crates.io, so the embedded Python interpreter is no longer a git dependency. The `python` feature now works from a registry install, and the publish workflow stops stripping monty, the `python` feature, and the python examples out of every workspace manifest before `cargo publish` (verified with `cargo publish -p bashkit --dry-run`). Two upstream API changes come with the bump: - `ResourceLimits::max_allocations` is gone (pydantic/monty#611). The knob moves out of the shared `RuntimeLimits` onto `TypeScriptLimits`, which is the only runtime that still enforces one — keeping it on `PythonLimits` would hand callers a security knob that silently does nothing. Python allocation bombs are now contained by `max_memory` / `max_duration`. - `PrintWriter::CollectString` takes a byte cap (pydantic/monty#558), since a print loop grows the host buffer without touching the VM heap. Wired to `max_memory` so one number bounds both heap and collected output. Specs, threat model, and rustdoc guides updated to match; deny.toml drops the monty/ruff git allowances (jiter's patch pin stays — monty 0.0.19 still requires jiter ^0.15.0, whose published release is pyo3 0.28-only). Claude-Session: https://claude.ai/code/session_01CA9FHReY9cMTzeTLrkeU4Q
`[policy.monty] audit-as-crates-io = false` only applied while monty was a git dependency. Now that it resolves from the registry, cargo-vet requires the crates themselves: drop the stale policy and exempt monty, monty-macros, and monty-types at 0.0.19, matching how monty's own ruff_* deps are already handled. `cargo vet --locked` passes. Claude-Session: https://claude.ai/code/session_01CA9FHReY9cMTzeTLrkeU4Q
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 9054a5c | Commit Preview URL Branch Preview URL |
Jul 25 2026, 04:44 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Monty published
0.0.19to crates.io, so the embedded Python interpreter stops being a git dependency.pythonworks from a registry install.cargo add bashkit --features pythonandcargo install bashkit-cli(wherepythonis a default feature) now ship the Python builtin. Previously the publish pipeline deleted the monty dep, thepythonfeature, and the python examples from every workspace manifest beforecargo publish, so no released crate could run Python.sed-based "strip git-only dependencies" steps and both--allow-dirtyflags are gone.PythonLimits::max_allocationsis removed. Monty droppedmax_allocationsfrom its resource limits (Removemax_allocationsfrom resource limits pydantic/monty#611). The knob moves off the sharedRuntimeLimitsontoTypeScriptLimits, the only runtime that still enforces one — leaving it onPythonLimitswould hand callers a security knob that silently does nothing. Python allocation bombs are contained bymax_memory/max_duration.printoutput is now bounded.PrintWriter::CollectStringgained a byte cap upstream (Cap CollectString/CollectStreams so print loops can't OOM the host pydantic/monty#558) because a print loop grows the host buffer without touching the VM heap. Bashkit wires it tomax_memory, so one number bounds both heap and captured output.deny.tomldrops the monty/ruff git allowances; cargo-vet's stale[policy.monty] audit-as-crates-io = falseis replaced with exemptions formonty/monty-macros/monty-typesat 0.0.19.The
[patch.crates-io]pin on jiter stays: monty 0.0.19 still requiresjiter ^0.15.0, and published 0.15.0 is pyo3-0.28-only (0.16.0 moved to pyo3 0.29 but is outside monty's range). Removing the patch reproduces thelinks = "python"resolver conflict, so pyo3 0.29 inbashkit-pythonstill depends on it.Why
Monty being git-only was the single reason the
pythonfeature could not ship to crates.io, and the reason the release pipeline carried a fragile manifest-rewriting step (itssedforpython = ["dep:monty"]had already drifted out of date against the realpython = ["dep:monty", "dep:monty-types"]line, so it silently no longer matched).Before / After
Registry consumers,
cargo publish -p bashkit --dry-run:Print flood against a 256 KB budget — previously the host buffer grew unbounded while
max_memorystayed satisfied, now it is capped:Behavior is otherwise unchanged — CLI smoke test:
Risk
PythonLimits::max_allocationsandRuntimeLimits::max_allocationsare gone; TypeScript callers readlimits.max_allocationsinstead oflimits.common.max_allocations. The monty bump itself is a pre-1.0 interpreter upgrade (beta.6 → 0.0.19) that also brings upstream user-defined classes, closure capture, and iterator changes.max_memoryofprintoutput now errors instead.monty*as standalone PRs, since 0.0.x bumps keep breaking the embedding API.Checklist
print_output_capped_by_memory_limit/print_output_under_cap_succeeds; the allocation-cap tests were retuned to measured memory thresholds (one 10k list fits in 256 KB, three do not) rather than left as no-op assertionsVerified:
cargo fmt --check,cargo clippy --all-targets -- -D warnings(plus apython,typescript,jq,http_client,sqlite,git,scripted_tool,bot-authslice),cargo test --features http_client, failpoint suite, integration suite withpython,typescript(1327 passed), doctests,cargo vet --locked, both python examples, and the CLI smoke test above.Generated by Claude Code