Files
craft-libs/crates
William Dunn 81bdd0dbe8 craft-esign: context-keyed replies, context-based staleness, two completion digests
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
2026-11-17 21:03:40 -05:00
..
…
2026-11-14 17:49:47 +01:00
2026-11-13 01:31:26 -05:00
2026-11-15 11:38:06 +00:00
…
…