test(mocks): add check_and_mark_beacon_event stub; refactor(multi_search): rename indexUid to index_uid
- Add MockTaskStore::check_and_mark_beacon_event stub (returns true) to acceptance tests - Rename indexUid → index_uid for consistency in multi_search.rs - Add plan-gap audit instructions to marathon coding guide Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f7043d4518
commit
44cc1c68a3
5 changed files with 38 additions and 5 deletions
|
|
@ -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: <plan §-ref> — <what's missing>" --type task --priority <0-3> \
|
||||
--description "Plan: <§-ref/line range>. Gap evidence: <absent symbol / missing or failing test>. Acceptance: <what done looks like>."
|
||||
```
|
||||
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
|
||||
|
|
|
|||
|
|
@ -379,6 +379,10 @@ impl TaskStore for MockTaskStore {
|
|||
fn delete_tasks_batch(&self, _miroir_ids: &[&str]) -> Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
fn check_and_mark_beacon_event(&self, _index_uid: &str, _event_id: &str) -> Result<bool> {
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -392,6 +392,10 @@ impl TaskStore for MockTaskStore {
|
|||
fn delete_tasks_batch(&self, _miroir_ids: &[&str]) -> Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
fn check_and_mark_beacon_event(&self, _index_uid: &str, _event_id: &str) -> Result<bool> {
|
||||
Ok(true) // Always return new for mock
|
||||
}
|
||||
}
|
||||
|
||||
/// P4.1-A1: Advisory lock ensures only one pod runs the rebalancer at a time.
|
||||
|
|
|
|||
|
|
@ -337,6 +337,10 @@ impl TaskStore for MockTaskStore {
|
|||
fn delete_tasks_batch(&self, _miroir_ids: &[&str]) -> Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
fn check_and_mark_beacon_event(&self, _index_uid: &str, _event_id: &str) -> Result<bool> {
|
||||
Ok(true) // Always return new for mock
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue