The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix: reattach the builder's doc comment and tighten the split assertion\n\nTwo review Minors, both mine.\n\nThe `#[cfg(test)] mod tests;` I added for the checkpoint builder went between\nthe builder's doc comment and the builder, so the `///` block documented the\ntest module — and `mod tests` is compiled out of doc builds, so the rationale\nwas absent from generated docs entirely. Moved above the comment.\n\nThe split assertion compared against\n`trim_allowance.max(NO_WINDOW_ALLOWANCE.min(u64::MAX))`, where the inner\n`.min(u64::MAX)` is a no-op and the `.max` accepted any over-split below 5_120.\nIt now compares against the same effective total the function computes.\n\nReported by CodeRabbit on #6068.\n\n
sanil-239b13a87394b6
diff --git a/src/openhuman/agent/harness/session/turn_checkpoint.rs b/src/openhuman/agent/harness/session/turn_checkpoint.rsindex 96505b7a59..123cee36f0 100644--- a/src/openhuman/agent/harness/session/turn_checkpoint.rs+++ b/src/openhuman/agent/harness/session/turn_checkpoint.rs@@ -154,6 +154,10 @@ pub(super) fn truncate_chars(text: &str, max: usize) -> String {format!("{cut}… [truncated]")}+#[cfg(test)]+#[path = "turn_checkpoint_tests.rs"]+mod tests;+/// Build a deterministic checkpoint summary from this turn's tool-call/// results. Used only as a safety net when the model-written checkpoint/// call fails or returns empty, so a capped turn can never be left without@@ -168,10 +172,6 @@ pub(super) fn truncate_chars(text: &str, max: usize) -> String {/// between the turn's work and the user. The output is quoted as data, under a/// heading that says so, because none of it has been through a model on this/// path: it is raw tool output being surfaced verbatim, not an answer.-#[cfg(test)]-#[path = "turn_checkpoint_tests.rs"]-mod tests;-pub(super) fn build_deterministic_checkpoint(results: &[CheckpointToolResult],max_iterations: usize,diff --git a/src/openhuman/agent/tinyagents/middleware_tests_part_03_tests.rs b/src/openhuman/agent/tinyagents/middleware_tests_part_03_tests.rsindex cb5e376b6b..97d4abb083 100644--- a/src/openhuman/agent/tinyagents/middleware_tests_part_03_tests.rs+++ b/src/openhuman/agent/tinyagents/middleware_tests_part_03_tests.rs@@ -508,9 +508,19 @@ fn neither_share_is_ever_the_unbounded_sentinel() {restore > 0,"allowance {trim_allowance} left restoration unbounded");+ // The same effective total the function computes — not+ // `trim_allowance.max(NO_WINDOW_ALLOWANCE)`, which accepted any+ // over-split below 5_120 (and whose `.min(u64::MAX)` was a no-op).+ let total = if trim_allowance == 0 {+ NO_WINDOW_ALLOWANCE+ } else {+ trim_allowance+ };+ // `1` stays excluded: the function deliberately keeps both shares+ // positive, which costs one token at that degenerate size.if trim_allowance > 1 {assert!(- toc + restore <= trim_allowance.max(NO_WINDOW_ALLOWANCE.min(u64::MAX)),+ toc + restore <= total,"allowance {trim_allowance} split into more than it had: {toc} + {restore}");}