rouse-context/docs
Jason Monk e7ab0f9a99
Fix #389: Provision certs during onboarding so fresh installs work (#390)
* Fix #389: Provision certs during onboarding so fresh installs land in a usable state

Extend OnboardingFlow to chain CertProvisioningFlow.execute after subdomain
registration succeeds so a fresh install ends with all three PEMs (ACME
server cert, relay-CA client cert, relay CA) persisted on disk instead of
just the subdomain file. Without this hop the device appeared functional
(dashboard rendered, pending integrations visible) but every incoming AI
TLS handshake EOF'd and every WS reconnect 401'd because the store had no
certs to present — the root cause of #386 and #387.

OnboardingViewModel now routes cert-provisioning outcomes into retryable
OnboardingState.Failed / RateLimited surfaces with a "Try again" entry
point, and the UI holds on the onboarding screen during the several-second
ACME hop instead of silently dropping the user on Home with a half-
configured install. The subdomain is preserved across cert failures (#163)
so retry re-runs only the cert issuance step.

Idempotency via CertProvisioningFlow.AlreadyProvisioned means the existing
IntegrationSetupViewModel path is unchanged: enabling an integration on a
device that already has certs short-circuits as before.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

* Fix #389 (follow-up): Keep integration harness OnboardingFlow without chained cert provisioning

The initial commit wired CertProvisioningFlow into the integration harness's
OnboardingFlow override to mirror production. That broke every integration
scenario that drives both flows explicitly (HarnessSmokeTest +
OnboardingHappyPathTest pattern) because the second explicit cert call
returns AlreadyProvisioned instead of Success, tripping the asserts, and
also inflated the per-test /register/certs counter assertions.

Flip the override back to an OnboardingFlow without the chained cert step
so ProvisioningExtensions.provisionDevice keeps its "call both flows
explicitly" contract. Production still chains — the change in appModule
and the OnboardingFlow surface are untouched.

OnboardingInterruptedResumableTest can go back to using the Koin-supplied
flow now that the harness override is no-cert-chain again.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-04-23 20:00:15 -04:00
..
auth-pages Regenerate auth page gallery with correct icon 2026-04-08 08:53:44 -04:00
design Fix #170: align /renew request/response shapes between client and relay 2026-04-15 19:41:25 -04:00
internal Fix #379: Scrub sensitive data from production logs + add regression gate (#380) 2026-04-23 12:07:54 -04:00
notifications Fix #347: Client-subject notification copy + deep-link taps + Manage action (#362) 2026-04-22 03:11:08 -04:00
screenshots Regenerate screenshots after design language refactor 2026-04-07 12:25:12 -04:00
user Set baseurl to empty for custom domain on GitHub Pages 2026-04-16 17:47:49 -04:00
audit.md Fix #138: Add documentation audit — inventory, classify, punch list 2026-04-14 19:24:15 -04:00
device-test-report.md Fix #323: Remove personal machine identifiers from public repo (#326) 2026-04-20 12:24:01 -04:00
e2e-status.md Fix #389: Provision certs during onboarding so fresh installs work (#390) 2026-04-23 20:00:15 -04:00
overnight-plan-2.md Fix #323: Remove personal machine identifiers from public repo (#326) 2026-04-20 12:24:01 -04:00
screenshot_audit_tab.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
screenshot_connected.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
screenshot_dashboard.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
screenshot_settings_tab.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
security-audit-2026-04-07.md Add security audit report: 23 findings across 4 severity levels 2026-04-07 08:49:14 -04:00
security-decisions.md Add security decisions log for evaluated-and-accepted risks 2026-04-07 09:07:31 -04:00
security.md Add comprehensive security overview document 2026-04-10 09:39:55 -04:00
self-hosting.md Fix #322: Add startup CAA verification for ACME provider (#329) 2026-04-20 22:33:27 -04:00
test-coverage-audit.md Fix #79: Remove stale NotificationModel references from docs 2026-04-12 13:02:21 -04:00
workflow.md Add T-11 security monitoring task, renumber subsequent tasks 2026-04-04 19:48:46 -04:00