Repository navigation
Hosts reach onboarding through runtime.account_setup() (#2782 PR 2) - #3270
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 45 minutes. View limit details
No actionable comments were generated in the recent review. WalkthroughThe PR exposes onboarding operations through ChangesOnboarding API
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Merge Risk:
|
After PR 1, hosts still called onboarding through twenty one-line forwards on AccountManager, so the manager kept a hand-written layer of setup methods. AccountSetup becomes public and MarmotAppRuntime::account_setup() returns it, pairing the runtime's SetupState with its AccountManager. The forwards are deleted; AccountManager keeps its account_setup() only for unit tests. marmot-uniffi and the tests call the same methods through the new accessor. The UniFFI and C bindings do not change. Part of #2782 Co-Authored-By: Claude Opus 5.5 <[email protected]>
9c4fb21 to
7a84049
Compare
Problem
After #3266, Rust hosts still start and drive onboarding through
runtime.accounts(), andAccountManagercarries twenty one-line forwards into account setup only to serve them. That keeps a hand-written layer on the type that should own only the account workers.Fix
AccountSetupbecomes public, andMarmotAppRuntime::account_setup()returns it, pairing the runtime's setup state with its account manager. The twenty forwards are deleted and their methods keep their signatures and docs onAccountSetup.AccountManagerexposes no onboarding method in normal builds; its ownaccount_setup()is test-only.marmot-uniffi's onboarding commands and the tests change only the path, from
runtime.accounts().begin_onboarding(..)toruntime.account_setup().begin_onboarding(..). marmot-c goes through marmot-uniffi and has no source change. Runtime-level setup methods such asloginandcreate_identitystay onMarmotAppRuntime. Nothing changes behaviour.Verification
cargo fmt --all;cargo clippy --workspace --all-targets --all-featuresandcargo clippy -p marmot-app -p marmot-uniffi --all-targets,-D warningscargo nextest run -p marmot-app --features test-policy-overridesover the onboarding suite, the relay_runtime onboarding tests, generated setup, setup readiness and sign-out: 146 passed; marmot-uniffi onboarding: 4 passedjust c-headerleavesmarmot.hunchangedjust binding-docs-gate(only source-link line anchors in the uniffi API reference move),just c-parity-gate,just naming-gate,just tracing-audit, and the land-change smoke (simulator andwn/wnd)The
marmot-appchangelog lists the twenty moved methods. Tests change only the path to these methods, plus four bindings that keep a borrowedAccountSetupalive across a held future.Part of #2782
🤖 Generated with Claude Code