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
chore(pipeline): add doc comments and fix reconciliation test assertion\n\nAdded doc comments to `run_inner` and `reconcile_if_complete` to clarify their purpose. Updated the test `full_page_fetch_skips_prune_then_resumes_below_cap` to seed a stale ingested task and verify that a below-cap fetch correctly prunes it during reconciliation, changing the expected return value from 0 to 1 and adding an assertion that the ingested refs list is empty afterward.\n\nAuto-committed-on: dragonfly\n
Steven Enamakel00284996f718
diff --git a/src/openhuman/integrations/task_sources/pipeline.rs b/src/openhuman/integrations/task_sources/pipeline.rsindex b0ac6c661c..471e43e84f 100644--- a/src/openhuman/integrations/task_sources/pipeline.rs+++ b/src/openhuman/integrations/task_sources/pipeline.rs@@ -122,6 +122,7 @@ fn fetch_tasks_unavailable())}+/// Fetch, process, and reconcile one source pass.async fn run_inner(config: &Config,source: &TaskSource,@@ -234,6 +235,7 @@ async fn run_inner(Ok(())}+/// Reconcile only when the fetched page is known not to be capped.async fn reconcile_if_complete(config: &Config,source: &TaskSource,diff --git a/src/openhuman/integrations/task_sources/pipeline_tests.rs b/src/openhuman/integrations/task_sources/pipeline_tests.rsindex 84feae5cdf..ce8cb6ac08 100644--- a/src/openhuman/integrations/task_sources/pipeline_tests.rs+++ b/src/openhuman/integrations/task_sources/pipeline_tests.rs@@ -1,7 +1,9 @@use super::*;use crate::openhuman::config::Config;use crate::openhuman::integrations::task_sources::store;-use crate::openhuman::integrations::task_sources::types::{FilterSpec, ProviderSlug, SourceTarget};+use crate::openhuman::integrations::task_sources::types::{+ FilterSpec, NormalizedTask, ProviderSlug, SourceTarget,+};use serde_json::json;use tempfile::TempDir;@@ -111,6 +113,17 @@ async fn full_page_fetch_skips_prune_then_resumes_below_cap() {let tmp = TempDir::new().unwrap();let config = test_config(&tmp);let source = add_github_source(&config);+ let stale = NormalizedTask {+ external_id: "stale-task".into(),+ source_id: source.id.clone(),+ provider: "github".into(),+ title: "Stale task".into(),+ ..Default::default()+ };+ // An empty card id keeps this focused on reconciliation: the store row is+ // the stale ingestion that a complete fetch must retain and a later+ // below-cap fetch must remove.+ store::mark_ingested(&config, &source.id, &stale, "").unwrap();let current_external_ids = std::collections::HashSet::new();assert_eq!(@@ -124,9 +137,10 @@ async fn full_page_fetch_skips_prune_then_resumes_below_cap() {reconcile_if_complete(&config, &source, ¤t_external_ids, 1, 2).await.unwrap(),- 0,- "a below-cap fetch resumes reconciliation"+ 1,+ "a below-cap fetch resumes reconciliation and prunes the stale task");+ assert!(store::list_ingested_refs(&config, &source.id).unwrap().is_empty());}#[tokio::test]