From 4941c14d16e19fd176221f81ae343da1df328839 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Fri, 6 Nov 2026 03:22:40 +0000 Subject: [PATCH 1/3] fix(python): stop shared-graph repr/compare outliving the time limit Monty 1.4 amortized time checks keyed on each loop's own index, so recursive walks over 2-item lists (x = [x, x] x30) never checked and repr/print/==/>, + /// bashkit fork: one counter for every amortized `*_every` check, so many + /// short Rust loops still add up to a full check every + /// `LOOP_CHECK_INTERVAL` steps (see [`check_time_every`](Self::check_time_every)). + #[serde(skip)] + tick: Cell, } impl Default for ResourceTracker { @@ -375,6 +380,7 @@ impl ResourceTracker { turn_execution_time: Cell::new(Duration::ZERO), running_since: Cell::new(None), recursion_limit_override: Cell::new(None), + tick: Cell::new(0), } } @@ -569,22 +575,39 @@ impl ResourceTracker { /// increasing counter. Fires at the *end* of each block (`i % N == N-1`) /// so loops shorter than the interval pay no clock read at all — the VM /// dispatch checkpoint covers cadence between short calls. + /// + /// bashkit fork: `i` is ignored; the cadence comes from one tracker-wide + /// counter (`tick`). Keyed on a loop index, a recursion made of short + /// loops never reached a check: `x == y` or `repr(x)` over a shared graph + /// of two-item lists (`x = [x, x]` thirty times) ran for minutes past the + /// limit, synchronously, so the host could not interrupt it either. #[inline] - pub fn check_time_every(&self, i: usize) -> Result<(), ResourceError> { - if i % Self::LOOP_CHECK_INTERVAL == Self::LOOP_CHECK_INTERVAL - 1 { + pub fn check_time_every(&self, _i: usize) -> Result<(), ResourceError> { + if self.next_tick_is_check() { self.check_time() } else { Ok(()) } } + /// bashkit fork: advances the shared amortization counter and reports + /// whether this step is due a full check. + #[inline] + fn next_tick_is_check(&self) -> bool { + let i = self.tick.get().wrapping_add(1); + self.tick.set(i); + i % Self::LOOP_CHECK_INTERVAL == 0 + } + /// Amortized per-item memory + time check; the memory-probing sibling of /// [`check_time_every`](Self::check_time_every), for loops that allocate /// per item. Between full checks the allocator's hard limit still bounds /// runaway growth. + /// + /// bashkit fork: `i` is ignored, as in [`check_time_every`](Self::check_time_every). #[inline] - pub fn check_memory_time_every(&self, i: usize) -> Result<(), ResourceError> { - if i % Self::LOOP_CHECK_INTERVAL == Self::LOOP_CHECK_INTERVAL - 1 { + pub fn check_memory_time_every(&self, _i: usize) -> Result<(), ResourceError> { + if self.next_tick_is_check() { self.check_memory_time() } else { Ok(()) diff --git a/crates/bashkit-monty/src/types/dict.rs b/crates/bashkit-monty/src/types/dict.rs index 653da5191..76b92f166 100644 --- a/crates/bashkit-monty/src/types/dict.rs +++ b/crates/bashkit-monty/src/types/dict.rs @@ -1167,7 +1167,7 @@ impl<'h> HeapRead<'h, Dict> { defer_drop!(pair, vm); let (key, value) = pair; if printed > 0 { - if repr_check_time(printed, vm) { + if repr_check_time(printed, vm)? { f.write_str(", ...[timeout]")?; break; } @@ -1207,7 +1207,7 @@ impl<'h> HeapRead<'h, Dict> { f.write_char('{')?; for (n, &i) in order.iter().enumerate() { if n > 0 { - if repr_check_time(n, vm) { + if repr_check_time(n, vm)? { f.write_str(", ...[timeout]")?; break; } diff --git a/crates/bashkit-monty/src/types/generic_alias.rs b/crates/bashkit-monty/src/types/generic_alias.rs index e776f9513..525fb0fdf 100644 --- a/crates/bashkit-monty/src/types/generic_alias.rs +++ b/crates/bashkit-monty/src/types/generic_alias.rs @@ -182,7 +182,7 @@ impl<'h> PyTrait<'h> for HeapObjectRead<'h, GenericAlias> { } for index in 0..count { if index > 0 { - if repr_check_time(index, vm) { + if repr_check_time(index, vm)? { f.write_str(", ...[timeout]")?; break; } diff --git a/crates/bashkit-monty/src/types/list.rs b/crates/bashkit-monty/src/types/list.rs index 06c8ce99a..343e1f2bf 100644 --- a/crates/bashkit-monty/src/types/list.rs +++ b/crates/bashkit-monty/src/types/list.rs @@ -1,5 +1,6 @@ use std::{cmp::Ordering, fmt::Write, mem}; +use monty_types::ResourceError; use serde::{Deserialize, Serialize}; use smallvec::SmallVec; @@ -1067,7 +1068,7 @@ pub(crate) fn repr_sequence_fmt<'h>( let Some(item) = get_item(vm.heap, i) else { break }; defer_drop!(item, vm); if i > 0 { - if repr_check_time(i, vm) { + if repr_check_time(i, vm)? { f.write_str(", ...[timeout]")?; break; } @@ -1095,7 +1096,7 @@ pub(crate) fn repr_items_fmt( ) -> RunResult<()> { for (i, item) in items.iter().enumerate() { if i > 0 { - if repr_check_time(i, vm) { + if repr_check_time(i, vm)? { f.write_str(", ...[timeout]")?; break; } @@ -1109,8 +1110,23 @@ pub(crate) fn repr_items_fmt( /// Polls the time/memory soft limits every 64th item rather than every item, /// keeping per-item overhead to one branch while still truncating huge reprs /// promptly with `", ...[timeout]"` (tested in `resource_limits.rs`). -pub(crate) fn repr_check_time(i: usize, vm: &VM<'_>) -> bool { - vm.heap.tracker.check_memory_time_every(i).is_err() +/// +/// bashkit fork: two changes, both for reprs of shared graphs (`x = [x, x]` +/// thirty times is 2^30 nested two-item lists). +/// - The poll cadence is tracker-wide (see `check_time_every`), not the +/// index `i` within one container: a two-item list never reached index 63, +/// so the clock was never read and the repr ran for minutes past the limit +/// on a thread the host cannot interrupt. +/// - A time-limit hit is returned as an error instead of truncating. The +/// time budget never recovers within a run, and truncating only ends the +/// current container while every enclosing one keeps formatting its next +/// item. A memory hit still truncates, as upstream does. +pub(crate) fn repr_check_time(_i: usize, vm: &VM<'_>) -> RunResult { + match vm.heap.tracker.check_memory_time_every(0) { + Ok(()) => Ok(false), + Err(err @ ResourceError::Time { .. }) => Err(err.into()), + Err(_) => Ok(true), + } } /// Iterates over a list while observing changes to its current contents. diff --git a/crates/bashkit-monty/src/types/partial.rs b/crates/bashkit-monty/src/types/partial.rs index 2d2ca1b2f..99418f64b 100644 --- a/crates/bashkit-monty/src/types/partial.rs +++ b/crates/bashkit-monty/src/types/partial.rs @@ -371,7 +371,7 @@ impl<'h> PyTrait<'h> for HeapObjectRead<'h, Partial> { let mut item = 0; 'items: { for index in 0..self.get(vm.heap).args.len() { - if repr_check_time(item, vm) { + if repr_check_time(item, vm)? { f.write_str(", ...[timeout]")?; break 'items; } @@ -383,7 +383,7 @@ impl<'h> PyTrait<'h> for HeapObjectRead<'h, Partial> { } for index in 0..self.get(vm.heap).keywords.len() { - if repr_check_time(item, vm) { + if repr_check_time(item, vm)? { f.write_str(", ...[timeout]")?; break 'items; } diff --git a/crates/bashkit-monty/src/types/union.rs b/crates/bashkit-monty/src/types/union.rs index 0d3a858ac..1f4c3d16d 100644 --- a/crates/bashkit-monty/src/types/union.rs +++ b/crates/bashkit-monty/src/types/union.rs @@ -359,7 +359,7 @@ impl<'h> PyTrait<'h> for HeapObjectRead<'h, Union> { let count = args.get(vm.heap).as_slice().len(); for index in 0..count { if index > 0 { - if repr_check_time(index, vm) { + if repr_check_time(index, vm)? { f.write_str(" | ...[timeout]")?; break; } diff --git a/crates/bashkit/docs/threat-model.md b/crates/bashkit/docs/threat-model.md index 149d71e58..53d90f85f 100644 --- a/crates/bashkit/docs/threat-model.md +++ b/crates/bashkit/docs/threat-model.md @@ -739,6 +739,7 @@ Python `pathlib.Path` and `open()` operations are bridged to Bashkit's virtual f | Uninterruptible VM loop (TM-PY-034) | Tight loop ignores cancellation or shared budget | Forked checkpoint hook runs the request `ExecutionBudget` check inside the VM | MITIGATED | | Shared-graph expansion in host conversion (TM-PY-035) | `x = [x, x]` repeated, then returned to the host | Every converter walks Monty values with a node cap | MITIGATED | | Host-call loop outruns the time limit (TM-PY-036) | `while True:` around a cheap file write; Monty's clock pauses on host calls and the VM never yields the thread | Wall-clock deadline and an executor yield at every host call | MITIGATED | +| Shared-graph walk outlives time limit (TM-PY-037) | `x = [x, x]` repeated, then `repr` or `==` inside Python | Forked tracker counts every amortized check on one tick, so recursive walks still check time | MITIGATED | **Architecture:** diff --git a/crates/bashkit/tests/integration/python_security_tests.rs b/crates/bashkit/tests/integration/python_security_tests.rs index e99b9ca16..439df6a9b 100644 --- a/crates/bashkit/tests/integration/python_security_tests.rs +++ b/crates/bashkit/tests/integration/python_security_tests.rs @@ -288,6 +288,57 @@ mod blackbox_class_escape { mod whitebox_resource_limits { use super::*; + /// Regression: walking a shared graph (`x = [x, x]` thirty times is + /// 2^30 nested two-item lists) in repr, `==`, `<` or `in` never read the + /// clock, because the fork polled time by the index within one list. It ran for minutes past + /// a 2 s limit, synchronously, so the host's exec timeout could not stop + /// it either. Each path must now hit the time limit (exit 124) promptly. + #[tokio::test(flavor = "multi_thread")] + async fn shared_graph_walks_respect_time_limit() { + let graph = "x = [1]\nfor _ in range(30):\n x = [x, x]\n"; + for (name, tail) in [ + ("repr", "s = repr(x)"), + ("str", "s = str(x)"), + ("print", "print(x)"), + ("fstring", "s = f\"{x}\""), + ("dict", "s = repr({1: x})"), + ("tuple", "s = repr((x, x))"), + ( + "eq", + "y = [1]\nfor _ in range(30):\n y = [y, y]\nb = x == y", + ), + ( + "lt", + "y = [1]\nfor _ in range(30):\n y = [y, y]\nb = x < y", + ), + ( + "in", + "y = [1]\nfor _ in range(30):\n y = [y, y]\nb = x in [y]", + ), + ("json", "import json\ns = json.dumps(x)"), + ] { + let mut bash = bash_python_limits( + PythonLimits::default().max_duration(std::time::Duration::from_millis(500)), + ); + let script = format!("python3 -c '{graph}{tail}' >/dev/null; echo rc=$?"); + let started = std::time::Instant::now(); + // Spawned so the timer runs on another worker: a regression blocks + // the thread running the script, not the one awaiting it. + let task = tokio::spawn(async move { bash.exec(&script).await }); + let r = tokio::time::timeout(std::time::Duration::from_secs(20), task).await; + let elapsed = started.elapsed(); + let r = r + .unwrap_or_else(|_| panic!("{name}: still running after 20s")) + .unwrap() + .unwrap(); + assert!( + elapsed < std::time::Duration::from_secs(10), + "{name}: took {elapsed:?}" + ); + assert_eq!(r.stdout, "rc=124\n", "{name}: {}", r.stderr); + } + } + /// Regression: every invocation used to reserve `max_memory / 64` work /// units up front (1M at the 64 MiB default) out of the 100M budget, so /// the 96th `python3` call in one script failed even for `pass`. diff --git a/knowledge/log.md b/knowledge/log.md index f089e0631..26afa5cc8 100644 --- a/knowledge/log.md +++ b/knowledge/log.md @@ -7,6 +7,7 @@ * **Dependabot config parse fix**: #2852 set `versioning-strategy: increase` on a cargo entry, which cargo rejects, so Dependabot refused the whole `dependabot.yml` (red check on `main`). Replaced by committing the two random-fs fixture lockfiles, which also puts them in the advisory scan; a test pins cargo strategies to `auto`/`lockfile-only`. See [Dependencies](operations/dependencies.md). * **Monty fuzz target**: `python_fuzz` fuzzes the forked Monty `python3` with the metered allocator installed (file, stdin, `-c`, CLI args; 32 MiB / 500 ms limits, per-exec wall-clock assertion, leak checks). Nightly in `fuzz.yml`, build-checked in `fuzz-check`. First local run: 282k execs in 8 min, 0 crashes. See [Python Builtin](runtimes/python-builtin.md), TM-PY-032. * **rg searches as it reads**: `rg` searched every file only after reading all of them, holding ~160 B of text per file (~300 MB at 2M files) within the input budget. Searching moved into the walk (`RgSearch`): each file is searched and dropped as it is read, several roots stream one after another in path order, and `-q` stops the walk at its answer. Peak over 200k files: 34 MB to 1.3 MiB. See [Virtual Filesystem](foundations/vfs.md#remote-backends-round-trips), TM-DOS-140. +* **Python shared-graph hang**: in Monty 1.4.0, `x = [x, x]` thirty times then `repr(x)`, `print(x)`, `x == y`, `x < y` or `x in [y]` ran for minutes past a 2 s limit and blocked the thread, so the shell timeout could not stop it. Amortized time checks keyed on each loop's own index, and 2-item lists never reach 64. The fork now counts every amortized check on one tracker-wide tick, and `repr` exits 124 on a time hit instead of truncating. See [Python Builtin](runtimes/python-builtin.md), TM-PY-037. * **Dependabot jobs green again**: the weekly cargo "/" job failed since 2026-10-19 because `turso_core = "0.8.0-pre.1"` (lock at 0.8.3) made Dependabot try 0.9.0-pre.2 as an in-range lockfile update, which cargo rejects; the requirement is now the stable `0.8.3`. The example/fixture job failed since 2026-10-13 because Dependabot follows the `crates/bashkit` path dep into the root workspace and tries to bump bashkit's own (root-owned, partly optional) deps; that entry now `allow`s only each manifest's own deps and uses `versioning-strategy: increase` for the lockfile-less fixtures. Crates only the Monty forks declare are ignored in the "/" entry so they move with upstream (#2848 had bumped them and broke the build). All three are pinned by `scripts/tests/test_dependabot_coverage.py`. See [Dependencies](operations/dependencies.md). ## 2026-11-05 diff --git a/knowledge/runtimes/python-builtin.md b/knowledge/runtimes/python-builtin.md index c1b83cb18..d3f4f7a20 100644 --- a/knowledge/runtimes/python-builtin.md +++ b/knowledge/runtimes/python-builtin.md @@ -177,9 +177,18 @@ limit, a greedy tenant beside small ones, many small objects, `str.join` bomb) and the `whitebox_resource_limits` / `threat_python_pow_exhaustion` regression tests that failed on every earlier bump attempt. -Known upstream gaps in 1.4.0: `repr` of nested 2-item lists only checks time -every 64 items, and `str.join` can overshoot `max_memory` before the next -check (bounded by the meter, not by Monty). +Amortized checks (fork edit, TM-PY-037): upstream `check_time_every(i)` and +`check_memory_time_every(i)` fire when the caller's loop index hits a multiple +of 64, so a recursive walk over many short loops never checked. `x = [x, x]` +thirty times, then `repr`/`print`/f-string/`==`/`<`/`in`, ran for minutes past +a 2 s limit, synchronously, so the shell timeout could not stop it either. The +fork counts every `*_every` call on one tracker-wide tick instead, and the +`repr` walk returns a time-limit error (exit 124) where upstream truncated to +`...[timeout]`; a memory hit still truncates. Pinned by +`whitebox_resource_limits::shared_graph_walks_respect_time_limit`. + +Known upstream gap in 1.4.0: `str.join` can overshoot `max_memory` before the +next check (bounded by the meter, not by Monty). ### Python Feature Support diff --git a/knowledge/security/threat-model.md b/knowledge/security/threat-model.md index 7a1a66568..f4f34aa54 100644 --- a/knowledge/security/threat-model.md +++ b/knowledge/security/threat-model.md @@ -2012,6 +2012,7 @@ yield `OsCall` events that Bashkit intercepts and dispatches to the VFS. | TM-PY-034 | Uninterruptible VM loop ignores cancellation / shared budget | High | Forked `monty_types::set_checkpoint_hook` runs the request `ExecutionBudget` check at every VM time checkpoint; `Err` stops the run uncatchably | `python_security_tests::whitebox_resource_limits::*`, budget tests in `builtins::python`, `python_tenant_stress_tests::*` (spin, abandoned calls, budget reuse) | | TM-PY-035 | Shared object graph expands exponentially in host conversion | High | Monty 1.x `MontyObject` graphs can share children; every host converter (runtime values, scripted-tool JSON, Python binding) walks with a node cap (100k / 1M) | `runtime_value` and `tool_registry` unit tests | | TM-PY-036 | Host-call loop outruns the time limit / starves the worker thread | High | Monty 1.x pauses its clock while suspended on the host, so `max_duration` counted VM time only. The host-call loop checks the wall-clock deadline at every OS/external call and yields to the executor there | `python_tenant_stress_tests::host_call_loops_stop_at_the_wall_clock_limit`, `python_tenant_stress_tests::abandoned_calls_do_not_poison_the_worker_threads` | +| TM-PY-037 | Shared-graph walk outlives the time limit | Critical | Upstream amortized checks key on the per-loop index, so recursive `repr`/compare over `x = [x, x]` never checks time and blocks the thread past every limit. Fork counts all `*_every` calls on one tracker-wide tick; `repr` errors on a time hit | `python_security_tests::whitebox_resource_limits::shared_graph_walks_respect_time_limit` | | TM-PY-013 | Unknown CLI options smuggle behavior | Low | Unknown `python` options rejected with exit 2 | `threat_python_unknown_options` | | TM-PY-014 | Python escapes Bashkit resource limits | High | Bashkit `ExecutionLimits` apply to the `python` command like any builtin | `threat_python_respects_bash_limits` | | TM-PY-015 | Real filesystem read via pathlib | Critical | VFS bridge reads only from Bashkit VFS, not host | `threat_python_vfs_no_real_fs` | From e79c343b3035e72bdb152fc1ff758c99961d76c9 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Fri, 6 Nov 2026 04:47:34 +0000 Subject: [PATCH 2/3] fix(python): dataclass repr errors on time limit like other repr walks A shared D(d, d) dataclass graph still truncated on a time hit; with the tracker-wide cadence only one call in 64 sees the expired clock, so the walk kept formatting. Route it through repr_check_time. Test extended. --- crates/bashkit-monty/src/types/host_class.rs | 6 +++++- crates/bashkit-monty/src/types/list.rs | 7 +++++-- crates/bashkit/tests/integration/python_security_tests.rs | 6 +++++- knowledge/runtimes/python-builtin.md | 6 ++++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/crates/bashkit-monty/src/types/host_class.rs b/crates/bashkit-monty/src/types/host_class.rs index f927312c2..2858b621c 100644 --- a/crates/bashkit-monty/src/types/host_class.rs +++ b/crates/bashkit-monty/src/types/host_class.rs @@ -337,7 +337,11 @@ pub(crate) fn write_dataclass_repr<'h>( if i > 0 { // Same between-item checkpoint as sequence repr, so a wide instance // cannot outrun its time limit. - if vm.heap.tracker.check_memory_time_every(i).is_err() { + // bashkit fork: through `repr_check_time`, so a time hit errors + // instead of truncating (a shared `D(d, d)` graph otherwise kept + // formatting: with the tracker-wide cadence only one call in 64 + // sees the expired clock, so truncation never unwound the walk). + if super::list::repr_check_time(i, vm)? { f.write_str(", ...[timeout]")?; break; } diff --git a/crates/bashkit-monty/src/types/list.rs b/crates/bashkit-monty/src/types/list.rs index 343e1f2bf..f4d89755c 100644 --- a/crates/bashkit-monty/src/types/list.rs +++ b/crates/bashkit-monty/src/types/list.rs @@ -1109,7 +1109,8 @@ pub(crate) fn repr_items_fmt( /// Polls the time/memory soft limits every 64th item rather than every item, /// keeping per-item overhead to one branch while still truncating huge reprs -/// promptly with `", ...[timeout]"` (tested in `resource_limits.rs`). +/// promptly with `", ...[timeout]"`. Pinned by bashkit's +/// `python_security_tests::whitebox_resource_limits::shared_graph_walks_respect_time_limit`. /// /// bashkit fork: two changes, both for reprs of shared graphs (`x = [x, x]` /// thirty times is 2^30 nested two-item lists). @@ -1120,7 +1121,9 @@ pub(crate) fn repr_items_fmt( /// - A time-limit hit is returned as an error instead of truncating. The /// time budget never recovers within a run, and truncating only ends the /// current container while every enclosing one keeps formatting its next -/// item. A memory hit still truncates, as upstream does. +/// item, and with the tracker-wide cadence only one call in 64 sees the +/// expired clock, so the others would keep formatting. A memory hit still +/// truncates, as upstream does. Every repr checkpoint goes through here. pub(crate) fn repr_check_time(_i: usize, vm: &VM<'_>) -> RunResult { match vm.heap.tracker.check_memory_time_every(0) { Ok(()) => Ok(false), diff --git a/crates/bashkit/tests/integration/python_security_tests.rs b/crates/bashkit/tests/integration/python_security_tests.rs index 439df6a9b..6fa404740 100644 --- a/crates/bashkit/tests/integration/python_security_tests.rs +++ b/crates/bashkit/tests/integration/python_security_tests.rs @@ -289,7 +289,7 @@ mod whitebox_resource_limits { use super::*; /// Regression: walking a shared graph (`x = [x, x]` thirty times is - /// 2^30 nested two-item lists) in repr, `==`, `<` or `in` never read the + /// 2^30 nested two-item lists, or two-field dataclasses) in repr, `==`, `<` or `in` never read the /// clock, because the fork polled time by the index within one list. It ran for minutes past /// a 2 s limit, synchronously, so the host's exec timeout could not stop /// it either. Each path must now hit the time limit (exit 124) promptly. @@ -316,6 +316,10 @@ mod whitebox_resource_limits { "y = [1]\nfor _ in range(30):\n y = [y, y]\nb = x in [y]", ), ("json", "import json\ns = json.dumps(x)"), + ( + "dataclass", + "from dataclasses import dataclass\n@dataclass\nclass D:\n a: object\n b: object\nd = D(1, 1)\nfor _ in range(30):\n d = D(d, d)\ns = repr(d)", + ), ] { let mut bash = bash_python_limits( PythonLimits::default().max_duration(std::time::Duration::from_millis(500)), diff --git a/knowledge/runtimes/python-builtin.md b/knowledge/runtimes/python-builtin.md index d3f4f7a20..f1151d9d8 100644 --- a/knowledge/runtimes/python-builtin.md +++ b/knowledge/runtimes/python-builtin.md @@ -180,10 +180,12 @@ tests that failed on every earlier bump attempt. Amortized checks (fork edit, TM-PY-037): upstream `check_time_every(i)` and `check_memory_time_every(i)` fire when the caller's loop index hits a multiple of 64, so a recursive walk over many short loops never checked. `x = [x, x]` -thirty times, then `repr`/`print`/f-string/`==`/`<`/`in`, ran for minutes past +thirty times (or a two-field dataclass `D(d, d)`), then +`repr`/`print`/f-string/`==`/`<`/`in`, ran for minutes past a 2 s limit, synchronously, so the shell timeout could not stop it either. The fork counts every `*_every` call on one tracker-wide tick instead, and the -`repr` walk returns a time-limit error (exit 124) where upstream truncated to +`repr` walks (sequences, dicts, dataclasses, host classes) return a +time-limit error (exit 124) where upstream truncated to `...[timeout]`; a memory hit still truncates. Pinned by `whitebox_resource_limits::shared_graph_walks_respect_time_limit`. From b1cb8b73b7ff7c053e9547d45683501e418d4efa Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Fri, 6 Nov 2026 04:49:18 +0000 Subject: [PATCH 3/3] docs(python): host-class repr doc matches time-limit behavior --- crates/bashkit-monty/src/types/host_class.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bashkit-monty/src/types/host_class.rs b/crates/bashkit-monty/src/types/host_class.rs index 2858b621c..93bfab147 100644 --- a/crates/bashkit-monty/src/types/host_class.rs +++ b/crates/bashkit-monty/src/types/host_class.rs @@ -314,7 +314,8 @@ impl<'h> PyTrait<'h> for HeapObjectRead<'h, HostClass> { /// /// Each caller supplies its own field list via `field`, mapping an index to that /// field's name and a cloned value (dropped here). A cycle renders `...`, a -/// `None` value ``, and exhausting a time limit truncates `...[timeout]`. +/// `None` value ``, a memory limit truncates `...[timeout]`, and a time +/// limit raises (see `repr_check_time`). /// /// `field` is resolved immediately before that field is written, never all up /// front, so a `__repr__` that mutates a later field is observed — matching the