diff --git a/.marathon/instruction.md b/.marathon/instruction.md index 7fe69ef..c0a4fa3 100644 --- a/.marathon/instruction.md +++ b/.marathon/instruction.md @@ -40,6 +40,27 @@ phase epics depend on their leaf tasks and close LAST — work leaves first. If a bead was attempted before (check `git log` for its ID), continue from the prior work rather than starting over. +#### If the ready queue is empty — audit the plan, don't go idle + +If `br ready --limit 5` returns **nothing eligible** (empty queue, or only beads you cannot +progress — e.g. ones needing human/ADB access), do NOT exit idle. The seeded beads are not +the whole job — **the plan is**. Run a plan-vs-artifacts gap audit and refill the queue: + +1. Walk `docs/plan/plan.md` section by section (the 13 phase epics, §13.x deliverables). +2. For each planned item — crate, module, config field, CLI subcommand, phase deliverable + (§-ref), invariant, acceptance criterion — verify it actually exists *and works* in the + tree: grep for the symbol under `crates/`, read the module, run its test. +3. For every planned-but-missing, stubbed, or incomplete item that is **not already an open + bead** (check `br list --status open | grep`), create one: + ```bash + br create --title "plan-gap: " --type task --priority <0-3> \ + --description "Plan: <§-ref/line range>. Gap evidence: . Acceptance: ." + ``` + Use `br batch` `dep_add_blocker` to wire dependencies if the gap blocks/depends on existing beads. +4. `br sync --flush-only`, then re-run `br ready --limit 5` and pick the highest-impact new bead. + +The work is truly done only when a **full** plan audit finds zero gaps — then say so and exit. + ### 2. Claim ```bash diff --git a/crates/miroir-core/src/mode_c_worker/acceptance_tests.rs b/crates/miroir-core/src/mode_c_worker/acceptance_tests.rs index 3ef78a5..977dc11 100644 --- a/crates/miroir-core/src/mode_c_worker/acceptance_tests.rs +++ b/crates/miroir-core/src/mode_c_worker/acceptance_tests.rs @@ -379,6 +379,10 @@ impl TaskStore for MockTaskStore { fn delete_tasks_batch(&self, _miroir_ids: &[&str]) -> Result { Ok(0) } + + fn check_and_mark_beacon_event(&self, _index_uid: &str, _event_id: &str) -> Result { + Ok(true) // Always return new for mock + } } /// P6.5-A1: 1 GB dump splits into 4× 256 MiB chunks; 3 pods claim 3 of 4 chunks in parallel. diff --git a/crates/miroir-core/src/rebalancer_worker/acceptance_tests.rs b/crates/miroir-core/src/rebalancer_worker/acceptance_tests.rs index 6a6618a..999488e 100644 --- a/crates/miroir-core/src/rebalancer_worker/acceptance_tests.rs +++ b/crates/miroir-core/src/rebalancer_worker/acceptance_tests.rs @@ -392,6 +392,10 @@ impl TaskStore for MockTaskStore { fn delete_tasks_batch(&self, _miroir_ids: &[&str]) -> Result { Ok(0) } + + fn check_and_mark_beacon_event(&self, _index_uid: &str, _event_id: &str) -> Result { + Ok(true) // Always return new for mock + } } /// P4.1-A1: Advisory lock ensures only one pod runs the rebalancer at a time. diff --git a/crates/miroir-core/src/rebalancer_worker/settings_broadcast_acceptance_tests.rs b/crates/miroir-core/src/rebalancer_worker/settings_broadcast_acceptance_tests.rs index 4080231..ff8eb06 100644 --- a/crates/miroir-core/src/rebalancer_worker/settings_broadcast_acceptance_tests.rs +++ b/crates/miroir-core/src/rebalancer_worker/settings_broadcast_acceptance_tests.rs @@ -337,6 +337,10 @@ impl TaskStore for MockTaskStore { fn delete_tasks_batch(&self, _miroir_ids: &[&str]) -> Result { Ok(0) } + + fn check_and_mark_beacon_event(&self, _index_uid: &str, _event_id: &str) -> Result { + Ok(true) // Always return new for mock + } } // --------------------------------------------------------------------------- diff --git a/crates/miroir-proxy/src/routes/multi_search.rs b/crates/miroir-proxy/src/routes/multi_search.rs index c7d432d..3b4272b 100644 --- a/crates/miroir-proxy/src/routes/multi_search.rs +++ b/crates/miroir-proxy/src/routes/multi_search.rs @@ -252,7 +252,7 @@ where .into_iter() .map(|(q, filter_str, _resolved_targets)| { miroir_core::multi_search::SearchQuery { - indexUid: q.index_uid, + index_uid: q.index_uid, q: q.q, filter: filter_str, limit: q.limit, @@ -319,7 +319,7 @@ where // Use query planner to narrow target shards (plan §13.4) let filter_str = query.filter.as_ref().filter(|s| !s.is_empty()).cloned(); let query_plan = query_planner - .plan(&query.indexUid, &filter_str, config.shards) + .plan(&query.index_uid, &filter_str, config.shards) .await; // Record query planner metrics @@ -361,7 +361,7 @@ where SearchRequest::detect_vector_mode(&serde_json::json!(query.other)); let search_req = SearchRequest { - index_uid: query.indexUid.clone(), + index_uid: query.index_uid.clone(), query: query.q.clone(), offset: query.offset.unwrap_or(0), limit: query.limit.unwrap_or(20), @@ -422,7 +422,7 @@ where }; debug!( - index = %query.indexUid, + index = %query.index_uid, duration_ms = start.elapsed().as_millis(), hits = search_response.hits.len(), "multi-search query completed" @@ -434,7 +434,7 @@ where } Err(e) => { debug!( - index = %query.indexUid, + index = %query.index_uid, error = %e, "multi-search query failed" );