Commit e6fac59
refactor(pipeline): PR#7 slice 9 -- extract identity_migration.rs (issue #67 hotspot split, final slice)
Move-only extraction of the D4 CallSite-identity migration from
pipeline.rs into the new pipeline/identity_migration.rs:
needs_call_site_identity_baseline, record_call_site_identity_migration_status,
rebuild_call_site_identity_baseline.
Visibility: same sibling-module pattern as slice 8. driver.rs (a sibling
of identity_migration.rs, not an ancestor) calls
needs_call_site_identity_baseline/rebuild_call_site_identity_baseline from
reindex_changed_cancellable/reindex_paths, so both are pub(super) here;
pipeline.rs pulls them back in via a plain `use identity_migration::{...}`
that driver.rs's existing `use super::{...}` block already reaches
unchanged, same ancestor-reexport-cascade confirmed working in slice 8 --
no driver.rs edit needed. record_call_site_identity_migration_status stays
plain private (its only caller moved with it). Verified via callers()
before the move: real callers of the two pub(super) functions are exactly
driver.rs::reindex_changed_cancellable/reindex_paths (2 sites each).
Reverse dependency: rebuild_call_site_identity_baseline calls
run_indexing_pipeline_cancellable (driver.rs, pub since slice 7) --
identity_migration.rs pulls it in via `use super::driver::
run_indexing_pipeline_cancellable`, along with PipelineOutcome/
ReindexOutcome (also pub in driver.rs). ReindexSummary/GraphMode/now_secs
stay in pipeline.rs (not moved), pulled in via `super::` as usual.
This completes PR#7's pipeline.rs split (issue #67): the file now holds
only shared struct/type/const definitions, the 9 mod + import/re-export
blocks, now_secs/signature_returns_option_or_result, and the untouched
#[cfg(test)] mod tests block (never split out across all 9 slices).
pipeline.rs itself: 6032 lines (post-slice-6) -> 5462 (post-slice-7) ->
now well under half its original size across cache.rs/identity_migration.rs
plus the 7 prior slices' modules.
Also fixes two now-genuinely-unused top-level imports this slice's removal
exposed: `use rusqlite::Connection;` (only the #[cfg(test)] mod tests block
still needs it via `use super::*;` now that every non-test Connection use
has moved out -- narrowed to #[cfg(test)]) and `use std::path::Path;`
(zero remaining real, non-string-literal uses after this move -- removed
outright).
Verified: cargo build -p calm-core clean (both lib and --tests profiles),
cargo clippy -p calm-core --all-targets 100% clean, cargo test -p calm-core
1247 passed/0 failed/12 ignored including both
golden_equivalence_{continued,incremental}_vs_fresh_across_mutation_rounds,
cargo fmt clean.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent ba9df67 commit e6fac59
2 files changed
Lines changed: 227 additions & 170 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
575 | 423 | | |
576 | 424 | | |
577 | 425 | | |
| |||
0 commit comments