mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-30 18:27:00 +01:00
Fixes three gate items skylartaylor raised on PR #661. He reproduced them against 0a937ef in https://gist.github.com/skylartaylor/c1108ecf20d63c5e3183947408ddab7a. The request-signatures dialog now tags every in-flight create, status, completed, void and remind request with the context that issued it. That context is the document identity plus the account identity. A reply installs only when that context still matches the dialog's current context. This replaces the old staleness rule. That rule keyed off a global sequence counter that typing in the signer search also bumped. It dropped a late create reply and left the dialog on Sending forever. CompletedDocument now carries original_content_sha256 and signed_content_sha256 as distinct fields, per RFC-0021's evidence guarantee in storytold/craft-contrib#37. The crate's in-process test double computes both from the bytes it actually holds. It applies a fake seal that changes the signed bytes first. The two digests are never conflated. Regression tests, all in crates/ui/src/esign/review_repro.rs unless noted: 1. review_h5_reply_for_previous_document_is_installed_after_reopen 2. review_h5_reply_for_previous_account_is_installed_after_account_switch 3. review_n1_create_reply_dropped_after_a_lookup_leaves_dialog_busy 4. completed_document_keeps_original_and_signed_digests_distinct, in crates/esign/src/lib.rs