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
test(store): drop card-id parameter from mark_ingested
Steven Enamakel2b43bd06f860
diff --git a/crates/openhuman-core/src/integrations/task_sources/pipeline_tests.rs b/crates/openhuman-core/src/integrations/task_sources/pipeline_tests.rsindex 99e7cbb00f..be4893ef79 100644--- a/crates/openhuman-core/src/integrations/task_sources/pipeline_tests.rs+++ b/crates/openhuman-core/src/integrations/task_sources/pipeline_tests.rs@@ -68,9 +68,6 @@ async fn fetch_surfaces_error_for_every_toolkit() {assert_eq!(outcome.skipped_dupe, 0);assert_eq!(outcome.pruned, 0);- let cards = route::board_cards(&config).await.unwrap();- assert!(cards.is_empty(), "a refused fetch must route nothing");-let ingested = store::list_ingested(&config, &source.id, 10).unwrap();assert!(ingested.is_empty(), "a refused fetch must ingest nothing");}@@ -119,10 +116,9 @@ async fn full_page_fetch_skips_prune_then_resumes_below_cap() {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();+ // 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!(diff --git a/crates/openhuman-core/src/integrations/task_sources/store_tests.rs b/crates/openhuman-core/src/integrations/task_sources/store_tests.rsindex 750f7a411b..18a9ad0b61 100644--- a/crates/openhuman-core/src/integrations/task_sources/store_tests.rs+++ b/crates/openhuman-core/src/integrations/task_sources/store_tests.rs@@ -163,12 +163,7 @@ fn remove_deletes_and_cascades_ingested() {25,).unwrap();- mark_ingested(- &config,- &src.id,- &sample_task("1", "A", "2025-01-01"),- "task-abc",- )+ mark_ingested(&config, &src.id, &sample_task("1", "A", "2025-01-01")).unwrap();remove_source(&config, &src.id).unwrap();@@ -200,7 +195,7 @@ fn dedup_detects_seen_and_edited_tasks() {// Not ingested yet.assert!(!is_ingested(&config, &src.id, "42", &hash).unwrap());- mark_ingested(&config, &src.id, &task, "task-v1").unwrap();+ mark_ingested(&config, &src.id, &task).unwrap();// Same content hash → already ingested.assert!(is_ingested(&config, &src.id, "42", &hash).unwrap());@@ -211,16 +206,15 @@ fn dedup_detects_seen_and_edited_tasks() {assert!(!is_ingested(&config, &src.id, "42", &edited_hash).unwrap());// Re-ingesting the edit upserts (still one row).- mark_ingested(&config, &src.id, &edited, "task-v2").unwrap();+ mark_ingested(&config, &src.id, &edited).unwrap();let listed = list_ingested(&config, &src.id, 10).unwrap();assert_eq!(listed.len(), 1);assert_eq!(listed[0].external_id, "42");}#[tokio::test]-async fn ops_remove_prunes_routed_cards_for_source() {- use crate::agent::todos::ops::{add as todo_add, BoardLocation, CardPatch};- use crate::integrations::task_sources::{ops, route};+async fn ops_remove_prunes_the_ledger_for_source() {+ use crate::integrations::task_sources::ops;let tmp = TempDir::new().unwrap();let config = test_config(&tmp);@@ -235,26 +229,11 @@ async fn ops_remove_prunes_routed_cards_for_source() {25,).unwrap();- let location = BoardLocation::Thread {- workspace_dir: config.workspace_dir.clone(),- thread_id: route::TASK_SOURCES_THREAD_ID.to_string(),- };- let snapshot = todo_add(&location, "[GitHub] A", CardPatch::default())- .await- .unwrap();- let card_id = snapshot.cards.last().unwrap().id.clone();- mark_ingested(- &config,- &src.id,- &sample_task("1", "A", "2025-01-01"),- &card_id,- )- .unwrap();+ mark_ingested(&config, &src.id, &sample_task("1", "A", "2025-01-01")).unwrap();let out = ops::remove(&config, &src.id).await.expect("remove source");assert_eq!(out.value["removed"], true);assert_eq!(out.value["pruned"], 1);- assert!(route::board_cards(&config).await.unwrap().is_empty());assert!(list_ingested(&config, &src.id, 10).unwrap().is_empty());}@@ -289,19 +268,9 @@ fn list_ingested_orders_newest_first() {).unwrap();- mark_ingested(- &config,- &src.id,- &sample_task("1", "first", "2025-01-01"),- "task-1",- )+ mark_ingested(&config, &src.id, &sample_task("1", "first", "2025-01-01")).unwrap();- mark_ingested(- &config,- &src.id,- &sample_task("2", "second", "2025-01-02"),- "task-2",- )+ mark_ingested(&config, &src.id, &sample_task("2", "second", "2025-01-02")).unwrap();let listed = list_ingested(&config, &src.id, 10).unwrap();assert_eq!(listed.len(), 2);