You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spec): a user's refusal and a structural refusal are distinct outcomes
SPEC.md's wire table gave SPEND_DENIED -33053 to a declined ceremony and
SPEND_NOT_AUTHORIZED -33052 to PolicyDenied, while the decline path already
returned PolicyDenied -- so the normative mapping named two codes for one
value and no conforming host could exist. The table now keys every row on a
distinct AccountError variant, and states that it MUST be a function of the
outcome alone.
Co-Authored-By: Claude <noreply@anthropic.com>
"a structural refusal must map to SPEND_NOT_AUTHORIZED -33052: {structural}"
1892
+
);
1893
+
assert!(
1894
+
matches!(human,AccountError::UserDeclined(_)),
1895
+
"a user's refusal must map to SPEND_DENIED -33053: {human}"
1896
+
);
1897
+
assert_ne!(
1898
+
std::mem::discriminant(&structural),
1899
+
std::mem::discriminant(&human),
1900
+
"the wire mapping is a function only if these are different values; collapsing them leaves a host unable to tell 'you said no' from 'the rules say no'"
0 commit comments