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(tinyagents): say so when the artifact index cannot be read\n\n`unwrap_or_default()` turned a failed index read into an empty key set, which\nthe middleware treats as "nothing was offloaded" and returns. A read failure\nand an empty index therefore produced the same contents list — none — while\nmeaning opposite things: the second is the ordinary case, the first means every\npersisted result is unreachable for that call.\n\nDegrading is still right; a contents list is not worth failing a turn over.\nBut the store returns poisoned-lock errors without logging either, so the\ndifference had nowhere to show up. It now warns and returns explicitly.\n\nReported by CodeRabbit on #6068.\n\n
sanil-23ed7869454b17
diff --git a/src/openhuman/agent/tinyagents/middleware_part_06.rs b/src/openhuman/agent/tinyagents/middleware_part_06.rsindex f414baf000..77dc4bd91f 100644--- a/src/openhuman/agent/tinyagents/middleware_part_06.rs+++ b/src/openhuman/agent/tinyagents/middleware_part_06.rs@@ -400,10 +400,23 @@ impl Middleware<()> for ArtifactIndexTocMiddleware {else {return Ok(());};- let keys = store- .list(ARTIFACT_INDEX_NAMESPACE)- .await- .unwrap_or_default();+ // A read failure and an empty index produce the same contents list —+ // none — but they are not the same event: the second is the ordinary+ // case, the first means every persisted result is unreachable for this+ // call with nothing said about it. Degrading is still right (a contents+ // list is not worth failing a turn over), so the difference has to show+ // up in the log or it shows up nowhere (CodeRabbit on #6068).+ let keys = match store.list(ARTIFACT_INDEX_NAMESPACE).await {+ Ok(keys) => keys,+ Err(err) => {+ tracing::warn!(+ error = %err,+ "[tinyagents::mw] could not read the persisted-artifact index; this call gets \+ no contents list and cannot see what was offloaded"+ );+ return Ok(());+ }+ };if keys.is_empty() {// No result has been offloaded, so there is nothing to point at and// no reason to spend context saying so.