Skip to content

Commit 1c727fa

Browse files
committed
Clarify fresh cohort scope and coordinated request timeouts
1 parent 1f71d21 commit 1c727fa

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎crates/common/ARCHITECTURE.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ Target gating is used extensively:
160160
enforced. Cold network loops catch up, analyze their applied data and
161161
establish readiness; the cohort does not run an additional `ANALYZE`.
162162
Import/manifest failures and unsupported coordination fall back to per-network
163-
provisioning; stale-target refresh retains its existing behavior. Remote waits
164-
are bounded to two minutes per request and scheduler stop cancels
163+
provisioning; stale-target refresh retains its existing behavior. Coordinated
164+
manifest and seed requests are bounded to two minutes each; per-network runner
165+
requests keep their existing behavior. Scheduler stop cancels
165166
coordination/import cleanup.
166167
- `LocalDbState` encapsulates the local DB handle, scheduler, `SyncReadiness`
167168
(tracks which chains have completed a sync cycle), and the set of configured

‎crates/common/src/raindex_client/local_db/pipeline/runner/bootstrap.rs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ pub(super) async fn has_persisted_targets<DB: LocalDbQueryExecutor + ?Sized>(
3333
Ok(!rows.is_empty())
3434
}
3535

36-
/// The caller holds cross-tab bootstrap ownership through preflight and commit.
37-
/// Existing targets, including stale-target refresh, retain their runner policy.
36+
/// The caller starts with an empty target_watermarks table and holds cross-tab
37+
/// bootstrap ownership through preflight and commit. Per-target watermark
38+
/// checks defensively skip targets committed after that global preflight.
3839
pub(super) async fn provision_missing_targets<DB, F>(
3940
db: &DB,
4041
settings: &ParsedRunnerSettings,
@@ -363,7 +364,7 @@ local-db-sync:
363364
}
364365

365366
#[wasm_bindgen_test]
366-
async fn warm_targets_are_not_downloaded_or_imported() {
367+
async fn defensive_preflight_skips_persisted_targets() {
367368
let (settings, _) = settings_and_manifest();
368369
let manifests: ManifestFetcher =
369370
Arc::new(|_| panic!("warm targets must not fetch manifests"));
@@ -380,7 +381,7 @@ local-db-sync:
380381
}
381382

382383
#[wasm_bindgen_test]
383-
async fn adding_a_missing_network_keeps_existing_target_data() {
384+
async fn defensive_preflight_filters_already_persisted_target() {
384385
let (settings, manifests) = settings_and_manifest();
385386
let manifests: ManifestFetcher = Arc::new(move |raindexes| {
386387
assert_eq!(raindexes.len(), 1);

0 commit comments

Comments
 (0)