1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Reindex orchestration shared by `index`, `reindex`, `add`, `convert`, and
//! the doctor auto-repair path.
//!
//! Why: driving a daemon-side reindex involves several distinct pieces — the
//! progress UI ([`crate::commands::reindex_ui::ReindexUi`]), the options and
//! outcome record types, the SSE event loop, the post-reindex health check, and
//! the companion file-level helpers (`index_single_file`, `add_path`,
//! `register_index_with_daemon{,_filtered}`, `fetch_chunk_count`). Keeping them
//! inline in `main.rs` pushed it past 2.7k lines; co-locating them here drops
//! `main.rs` to a thin dispatcher. This module was itself split into focused
//! submodules (issue #571) once it crossed the 500-line cap.
//!
//! What: a thin re-export facade. The public surface mirrors the previous
//! single-file module so existing callers in `commands/*` keep their `use`
//! paths unchanged. Submodules:
//!
//! - [`file_ops`] — `index_single_file`, `add_path`
//! - [`options`] — `ReindexOptions`, `ReindexOutcome`
//! - [`driver`] — `run_reindex{,_opts,_force_opts}`, `run_reindex_with`
//! - [`events`] / [`event_handlers`] — SSE event dispatch (internal)
//! - [`ticker`] — wall-clock stats-line ticker (internal)
//! - [`phase_map`] / [`progress_state`] — ticker/event-loop shared state (internal)
//! - [`verify`] — post-`--force` health check (internal)
//! - [`registration`] — `RegisterFilters`, `register_index_with_daemon{,_filtered}`,
//! `fetch_chunk_count`
//!
//! Test: `cargo test -p trusty-search` — every reindex-driven integration test
//! continues to pass; the refactor is purely structural.
// Why: this facade deliberately re-publishes the full public surface of the
// pre-split `reindex_engine.rs` so existing `super::reindex_engine::*` call
// sites keep resolving unchanged. Several items (e.g. `run_reindex_with`,
// `index_single_file`, the option/outcome records, `fetch_chunk_count`) are
// part of that surface but not currently referenced by other binary modules;
// `allow(unused_imports)` preserves the API without a churny per-item audit.
pub use ;
pub use ;
pub use ;
pub use ;