Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(agent): expose background completion collection helpers outside tests

Steven Enamakel9524413df703
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
index cc1555eb66..807f470189 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
@@ -623,7 +623,6 @@ pub(crate) fn pending_for_ctx(
/// background completion is not independently delivered as a second, duplicate
/// answer. The router withdraws an already-recorded completion and drops one
/// that arrives later. Returns whether a pending completion was withdrawn.
-#[cfg(test)]
pub(crate) fn mark_collected(workspace_dir: &Path, task_id: &str) -> bool {
let entry = entry_for(workspace_dir);
mark_collected_in_entry(entry, task_id)
@@ -633,7 +632,6 @@ pub(crate) fn mark_collected_ctx(ctx: &DispatchCtx, workspace_dir: &Path, task_i
mark_collected_in_entry(entry_for_ctx(ctx, workspace_dir), task_id)
}
-#[cfg(test)]
fn mark_collected_in_entry(entry: Arc<Entry>, task_id: &str) -> bool {
let router = &entry.router;
let completion = router.tombstone(task_id);