Files
ngit-grasp/tests/sync.rs
T
DanConwayDev 5f84b8b55d feat(sync): recover direct-member descendant history
Repository collaboration events may reference only their immediate parent. Core Layer 3 filters follow repository root IDs, so a reply to an already discovered reply can remain absent forever when it omits repository and root tags.

Derive a stable, non-recursive frontier from locally stored direct root-thread members and rotate EOSE-closing filters through the existing historic queue, pagination, shared ledger, and request pacing. Run a complete initial pass, then rolling 24-hour passes; reconnects, daily reconciliation, and failed auxiliary batches restart completeness. Batch purpose keeps auxiliary failures out of core health state.

This deliberately provides the safe fallback baseline only: it does not retain descendant live subscriptions, recursively traverse threads, add configuration, persist cursors, or shard connections. Correctness assumes ordinary Layer 3 sync eventually stores direct root-thread members.

Validated with cargo check --lib, the descendant rotation unit test, and historic_sync_recovers_one_generation_of_parent_only_descendants. The scenario proves parent-only recovery while asserting a further recursive grandchild remains out of scope.
2026-08-08 20:46:05 +00:00

51 lines
1.5 KiB
Rust

//! Proactive Sync Integration Tests
//!
//! This test file organizes tests for ngit-grasp's proactive sync functionality.
//! Tests are grouped into submodules by sync scenario:
//!
//! - `historic_sync` - Tests for sync from pre-configured bootstrap relay (historic events)
//! - `discovery` - Tests for relay discovery from announcement events
//! - `live_sync` - Tests for real-time sync after connection established
//! - `tag_variations` - Tests for different Layer 2/3 tag types
//! - `catchup` - Tests for catchup sync after disconnect (not yet implemented)
//! - `metrics` - Tests for Prometheus metrics integration
//!
//! # Running Tests
//!
//! ```bash
//! # Run all sync tests
//! cargo test --test sync
//!
//! # Run with output
//! cargo test --test sync -- --nocapture
//!
//! # Run specific test
//! cargo test --test sync test_bootstrap_syncs -- --nocapture
//!
//! # Run ignored tests (like catchup)
//! cargo test --test sync -- --ignored
//! ```
// Include the common test utilities
mod common;
// Include sync test submodules (located in tests/sync/)
mod sync {
pub mod adaptive_pagination;
pub mod catchup;
pub mod descendant_sync;
pub mod discovery;
pub mod historic_recovery;
pub mod historic_sync;
pub mod live_sync;
pub mod maintainer_reprocessing;
pub mod metrics;
pub mod naughty_list_scheduling;
pub mod neg_concurrency;
pub mod purgatory_fetch;
pub mod reconnect_backoff;
pub mod req_concurrency;
pub mod stale_connect_result;
pub mod tag_variations;
}