feat(keys,desktop): #142 slice 3 — settings completion + engineering-gotcha bundle #151
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!151
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/settings-completion"
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?
#142 slice 3 — settings completion (task 3.4 / D6) plus the engineering-gotcha bundle accumulated across this milestone's real CI runs.
Settings completion
GET /api/keys/authorize/pending— the caller's pending, unexpired pairing challenges for the Devices-page banner. Deliberately secret-free (challenge id + device metadata + timestamps): the banner alerts, approval still requires the pairing payload from the new device. Materialize-then-filter per the SQLite conventions. AuthzMatrix row. Tests: initiated challenge listed WITH metadata and WITHOUT secret fields; consumed challenge drops off; cross-user isolation.list_pending_pairingsRust command; revoke dialog now carries real consequences copy (signed out immediately, key wrap deleted → loses access to encrypted files, must sign in AND pair again) — KEY-07.Gotcha bundle
split_master_keydead seam FIXED: the frontend invokedsplit_master_keywith no args while the Rust command wassplit_master_key_commandrequiring wallet-era hex input — the recovery-setup wizard was 100% broken. New no-arg command reads the loaded master key (PR-B).SSDID-→FailSulit-Bcrypt-KDF-v1) after the KAT was written, and the crate's tests were compile-broken — so the drift was invisible. Verified cryptographically: current code reproduces2f28ba3a…exactly; the old vector predates the rename; iOS already used the new string (platforms agree, only its test vector was stale). Provenance comment in the test. Tiered KDF is dormant → clean re-publication, not a migration.src/lib/passphraseFloor.tsfor react-refresh, deps-array disable with reason).docs/engineering-gotchas.md— the durable gotchas from this milestone: jsdom form submission, store-spy assertion targets, Once-chain mock rot under CI load, gitleaks path-filter discipline, Forgejo branch-protection/runs-API/squash-stack quirks, SQLite conventions, MTP crash-class errors.Tests: server 990/0/39 (twice, for stability; coverage gate 87.15%); cargo 31/31; vitest 1300/1skip; typecheck + lint clean (0 warnings).
Settings completion (task 3.4 / D6, KEY-07): - Server: GET /api/keys/authorize/pending lists the caller's pending, unexpired pairing challenges for the Devices-page banner. Secret-free surface (challenge id + device metadata + timestamps only) - approval still requires the pairing payload from the new device. Materialize- then-filter per the SQLite conventions. 3 tests (banner lists initiated challenge with metadata and NO secret fields; consumed challenge drops off; cross-user isolation). AuthzMatrix row added. - DevicesList: pending-pairings banner ("A device is waiting for approval...") driven by a new list_pending_pairings Rust command. - Revoke dialog: real consequences copy (signed out immediately; key wrap deleted so it loses access to encrypted files; must sign in AND pair again) - KEY-07. Gotcha bundle (found + fixed in this series' real runs): - split_master_key dead seam: the frontend invoked 'split_master_key' with no args; the Rust command was 'split_master_key_command' requiring wallet-era hex input. Replaced with a no-arg command reading the loaded master key (PR-B) - the recovery-setup wizard actually works now. - bcrypt-hkdf KAT regenerated: the rename commit (c170802) changed the HKDF domain salt (SSDID- -> FailSulit-Bcrypt-KDF-v1) AFTER the KAT was written and the crate's tests were compile-broken, so the drift was invisible. Verified: current code reproduces 2f28ba3a... exactly; the old 9ac8238c vector predates the rename. iOS TieredKdfTests carried the same stale vector (impl already used the new string - platforms agree). Provenance comment added; tiered KDF is dormant so this is a clean re-publication, not a migration. - Desktop lint: 12 warnings -> 0 (typed the OtpInput mock props + store selector in Email/TotpSetup tests, unused spies removed, floor hint moved to src/lib/passphraseFloor.ts for react-refresh, LinkLogins dep disable with reason). - docs/engineering-gotchas.md: the durable gotchas from this milestone (jsdom form submission, store-spy assertion target, Once-chain mocks, gitleaks path filter, Forgejo merge/status quirks, SQLite conventions, MTP crash-class errors...). Coverage gate 87.15%; server suite 990/0/39 (x2 for stability); cargo 31/31; vitest 1300/1skip (5 new: 3 server harness + banner + floor via lib path); typecheck + lint clean (0 warnings).