pub fn rebuild_index(library: &Library) -> Result<(), LibraryError>Expand description
Rebuild the SQLite index from the sidecars on disk.
Every {uuid}.cbor under media/ is decoded as the signed [SidecarV1] shape and upserted
as an assets row together with its user tags (one transaction per asset); stacks are then
reconstructed from the stack_membership registers.
A sidecar that does not decode as the signed shape — a torn or foreign file, or a retired unsigned pre-signed-path record — is warned about and skipped: a rebuild holds no keys and cannot admit it, and one unreadable file must not cost the whole library its index.