refactor(mobile): enforce result model invariants#1932
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cf2f0af to
8a7e288
Compare
8a7e288 to
314eabe
Compare
314eabe to
b562c18
Compare
Add KDoc comments for all five properties in MobileWalletPresentationRequestContext to satisfy Dokka's failOnWarning requirement. Documentation explains each property's role in the OpenID4VP invalid-request flow, clarifying when values are present or nullable.
…ters Add parameter documentation for PresentationRequestContext init to satisfy Swift-DocC's coverage requirements. Each parameter now explains its role in the OpenID4VP invalid-request context, matching the Kotlin documentation.
cfd40c5 to
79251dc
Compare
|



Summary
Tightens the Kotlin and Swift mobile wallet output models so callers cannot construct contradictory or incomplete result states.
This builds on the presentation-result hierarchy merged in walt-id/waltid-identity#1892 and keeps its ready and invalid preview states correctly separated.
What Changed
Event Results
Presentation Preview Results
client_idandnoncerequired, non-blank fields of a successfully prepared presentation preview.client_idand an optionalnonce, whose absence may itself be the validation error.Architecture Notes
MobileWalletPresentationRequestInfo/PresentationRequestInfovalues with required client IDs and nonces. Invalid previews exposeMobileWalletPresentationRequestContext/PresentationRequestContext, which retain the required client ID while allowing the nonce to be absent.Caveats and Follow-Ups
Breaking Changes
MobileWalletEventand SwiftWalletEventare now closed enums. Callers constructing event fixtures must select a declared event case; Swift callers that parse a stable name can use the failableWalletEvent(name:)initializer.MobileWalletPresentationRequestInfo.clientId/ SwiftPresentationRequestInfo.clientIDandnonceare now non-optional and must be non-blank.Invalid preview results now expose the separate partial
MobileWalletPresentationRequestContext/PresentationRequestContexttype. Its client ID is required and non-blank, while its nonce remains optional so missing-nonce validation errors can be represented.Constructing internally inconsistent presentation output fixtures now fails immediately.