hub: maity-hub rekey pages its scan and reseal instead of holding every row
tsk-5vh7k71e1gfw Proposed
From review A3156 (finding 4) of PR 2381, deferred by the lead for 0.1.3. rekey.run scans every sealed kind first and keeps each row, its stored value and its plaintext until the run ends; only the writes are batched. Peak memory grows with the whole credential inventory, which can matter for a large hub in a memory-limited pod. Page both passes per kind (keyset pagination on the keys of each kind), and keep the refusal before the first write: a value that opens with neither key must still stop the run with nothing written. Tests: a run over more rows than one page, a refusal found on a later page writes nothing, a rerun reseals nothing. The decision note is in hub/context/secrets.md.