Repository navigation
Description
Problem
DedupLedger::complete validates the registered request ID and binding digest, but does not validate that the supplied identity is internally valid (its ID derives from its origin, nonce, and binding). A caller can register a valid identity, mutate only origin, and still complete the registered entry with an arbitrary outcome. This violates the identity contract and lets completion proceed with a forged/inconsistent identity.
Reproduction
In pkgs/id/crates/id-sync/src/federation/slices/b20_request_identity.rs, create and observe a RequestIdentity, clone it, change origin, then call complete with the clone. The clone has binding_is_valid() == false, but complete currently returns Ok(()). Reproduced by cargo test --test b20_completion_identity_probe from pkgs/id (1 passed; the test asserts the incorrect acceptance).
Expected behavior
Completion must reject an identity whose claimed ID does not derive from its origin, nonce, and binding, without changing the ledger entry. Preserve success for the original registered identity and existing outcome/idempotency semantics. Add regression coverage for altered origin and nonce (and verify the valid identity can still complete afterward).
Related completed slice: #10184 (B20 request identity/dedup ledger). This is a focused post-completion gap, not a request to rework B20 or B21 result dedup.
Activity
developing-today commentedon Nov 18, 2026
CODE-4377
dezren39 commentedon Nov 21, 2026
Verified on current origin/main (
cb3e9667e5): fixed by commit92a6447b04(PR #11964, merged 2026-11-18T22:57:49Z).DedupLedger::completenow returnsDedupError::InvalidIdentityfor an identity whose id does not derive from its origin, nonce and binding, leaving the entry unchanged. Re-rancargo test -p id-sync --test federation_b20 --offlineon main: 10 passed, includingcompletion_rejects_an_identity_that_does_not_derive_its_id. Closing as fixed.dezren39 commentedon Nov 21, 2026
Closed as implemented.