mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-02 02:42:04 +00:00
Nine of the gate's findings were not assertions at all in spirit — they were two function signatures narrower than their callers, paid for at every call site. `recomputeIndex0Stats` took a bare `Dict` while all five of its callers hold a real `Index0`, so each one laundered it through `as unknown as Dict`. It reads exactly three fields, so it now says so: a Pick over events, checkpoints and heads. Any Index0 satisfies it, a partial one still does, and the five casts are gone. `exportBackup` took `Record<string, unknown>` and is genuinely called two ways: with a live VaultIndex from three places in the CLI and API, and with a round-tripped backup payload from the tests. It treats either as an opaque JSON document to canonicalize and encrypt, so the signature now names both shapes instead of making the majority caller pretend to be the minority one. No type surgery and no behaviour change: the same values reach the same code, they just no longer have to lie about what they are on the way in. 44 -> 35. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Vtx94nXDmNgXEeThUZP4QN