You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
migration: verify proves the store matches its own manifest, not the source, so a short source read verifies clean #1306
Found by job 045's security lens (row 5 of #868) at 8488bf13.
The migration's verify pass proves the store matches the manifest, not the source.
The manifest's rows and checksum are folded from the same batches the store receives (crates/nostream-cli/src/commands/migrate.rs:236-258), and verify_with reads only the target (migrate.rs:294-350). A store truncated after the copy fails (row count or checksum), and a store replaced beside the manifest is refused up front (held.is_empty() probe at migrate.rs:183-201).
What no check covers is a source read that ends a table early: the table is marked complete on count < batch_size (the trait's end marker, crates/nostream-storage/src/migration.rs:228), so a short page is indistinguishable from end-of-table — and the manifest records the short total as the complete one. ADR 0013 D4 says "any added, removed or altered row moves it" and calls the check a completeness proof; that is true of the target against the manifest it wrote, not of the store against the source.
Acceptance
Either the verify pass reads both sides (source and target) and compares them, or the manifest records the source's own count per table and the verification names which claim it makes.
ADR 0013 D4 states what the checksum proves and what it does not.
A case where the source ends a page early (a short read) is detected, or the gap is recorded as accepted risk with the reason.
Activity