docs: draft v2 updater API design (RFC)#338
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
From a claude session this morning: One piece of real-world input for the track design (open question #2): We hit a customer this week (on 2.0.5, mixed staging + stable users) where ~0.2%/min of their sessions were firing a post-update assertion: The current v2 sketch keeps Suggestion: move track off the call sites entirely and onto the updater instance. Constructor-only is the strongest form — Happy to prototype the Dart shape if useful. |
Design doc + illustrative Dart sketch for a result-typed, progress/cancel-aware, agent-friendly v2 of package:shorebird_code_push. Not wired up; not exported; RFC only. Refs shorebirdtech/shorebird#3684
|
I'm going to close this for now and pick it up from the PRD later. |
RFC / draft — not for merge. Requesting feedback on the shape.
What's here
docs/v2_api_design.md— motivation, goals/non-goals, proposed API, Rust C API changes, version-skew strategy, migration plan, open questions.shorebird_code_push/lib/src/v2/shorebird_updater_v2.dart— illustrative Dart sketch (not wired up, not exported).Key shape
checkAndInstall()returning anUpdateOperationhandle with.done,.progress,.cancel().UpdateOutcomeresult type:UpToDate | Installed | Deferred | Unavailable | Failed. No exceptions on the happy path or the "expected-but-didn't-happen" path.Failedwithcategory, stablecodestring (metrics key), andretryablebool.Unavailableis a result, not a separateisAvailablequery.What I'd most like feedback on
Refs shorebirdtech/shorebird#3684