Behaviour-preserving refactor (tracker issue #5, no spec): move the inline
pack logic from main into packed::pack_from_store, returning a
PackOutcome {Packed(PackedHeader), Incomplete{cached,total}} so the header
construction is unit-testable without spawning the binary. main's pack branch
shrinks to load-entries + call + match (same stderr messages + exit 2). The
four existing pack CLI tests are the behaviour-parity guard; two new unit tests
cover the complete/incomplete outcomes directly.
refs #5
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bite-sized TDD plan for iteration 2 of the packed-versioned-bundle cycle:
the enforcement + observability layer on the format iteration 1 delivered.
Task 1 adds Display for IndexStatus and the semantic corpus_sha256/embed_model
comparison inside load_packed_or_store (hermetic unit tests). Task 2 adds the
load-time mismatch warning, the index= token on the human diagnostics line,
and the observable-degrade tests (a Hybrid suggest under mismatch degrades —
hermetically, before any IONOS post — carrying index_status=Mismatch, with the
existing transient-degrade test extended as the index_status=Ok foil).
refs #4
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bite-sized TDD plan for iteration 1 of the packed-versioned-bundle cycle:
the on-disk packed format (src/packed.rs), the IndexStatus enum + packed-first
Pipeline::load path with per-file-store fallback, and the `index --pack`
subcommand. Structural validation only (magic/version/n_rows/payload length);
the semantic corpus+model mismatch enforcement, load warning, and index=
diagnostics token are deferred to iteration 2 (#4), as documented in the
plan's iteration-boundary note.
refs #3
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Records the ratified naming decisions (Lexical/Hybrid, c/a kept as
input aliases, diagnostics string free to change — no downstream
consumer) and the bite-sized rename task list for the implement step.
refs #2
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>