Extract the index --pack writer from main into the packed module #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Architect drift finding at the close of the packed-versioned-index-bundle cycle (commits
43b1b6f,79de4e1).The
alpha-id index --packwriter logic — completeness check, row collection in corpus order, header construction (dim/corpus_name/corpus_sha256/n_rows derivation), write — lives inline inmain(src/bin/alpha_id.rs, the Index/pack branch), not insrc/packed.rs. The spec's component table implies packing is apacked-module concern, and the inline header-construction code currently sits outside library test reach (covered only end-to-end via the pack CLI tests, not unit-tested).Proposed direction (not committal): extract a
packed::pack_from_store(...) -> Result<PackedHeader, AppError>(or similar) that the binary calls, so the header derivation is unit-testable without spawning the binary.context: low-priority tidy debt; behaviour is correct and CLI-test-covered, this is about testability + module placement.
depends on: nothing (self-contained, behaviour-preserving refactor).