Skip to content

T8: Wizard join phase (runWizardJoin) wrapping the login lane#372

Merged
philcunliffe merged 1 commit into
integration/install-experience-overhaulfrom
task/install-experience-overhaul/T8
Jul 22, 2026
Merged

T8: Wizard join phase (runWizardJoin) wrapping the login lane#372
philcunliffe merged 1 commit into
integration/install-experience-overhaulfrom
task/install-experience-overhaul/T8

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Implements task T8 of install-experience-overhaul.

Adds src/core/cli/wizard/join.js with runWizardJoin(opts), a thin narration wrapper around the existing runRemoteLogin login lane (never a second enrollment mechanism, @ref LLP 0134#login-lane). It runs the login, waits (bounded) for the daemon to converge on the org config, and computes lockedSources as the picker source ids the central layer owns. On a timeout or the no-org-config 404 steady state it narrates and returns an empty lock set rather than blocking (@ref LLP 0129#join-before-picker).

  • Exports waitForCentralConverge from remote_commands.js, reusing the bounded reconcile-wait runRemoteLogin already performs internally (waitForClientAttach), not a second poll loop.
  • Adds classifyLoginFailure, mapping the login lane's D7 taxonomy (no_membership / org_not_permitted vs transient) to 'failed' | 'abandoned'.
  • Tests cover converge/timeout/failure branches, the locked-source computation against a fixture layered config, the D7 split, and the converge verdict.

Checks: npm run typecheck clean; new tests green. The 7 pre-existing leave-command test failures are unrelated to this change (they fail identically on the base integration branch).

Task-Id: T8

Add `src/core/cli/wizard/join.js` with `runWizardJoin(opts)`, a thin
narration wrapper around the existing `runRemoteLogin` (@ref LLP 0134
#login-lane) - never a second enrollment mechanism. It runs the login
lane, waits (bounded) for the daemon to converge on the org config, and
computes `lockedSources` as the picker source ids the central layer owns
(T2's `pickerDescriptors`, T3's `classifyClientProvenance`). On timeout
or the no-org-config 404 steady state it narrates and returns an empty
lock set rather than blocking (@ref LLP 0129#join-before-picker).

- Export `waitForCentralConverge` from `remote_commands.js`, reusing the
  bounded reconcile-wait (`waitForClientAttach`) `runRemoteLogin` already
  performs internally instead of a second poll loop.
- Add `classifyLoginFailure`, mapping the login lane's D7 taxonomy
  (`no_membership` / `org_not_permitted` -> definitive, vs transient) to
  `'failed' | 'abandoned'`; the two definitive D7 phrases are lifted to
  exported constants so the classifier reuses the taxonomy rather than
  re-encoding it.
- Tests cover the converge, timeout, and login-failure branches, the
  locked-source computation against a fixture layered config, the D7
  classification split, and `waitForCentralConverge`'s ok/timeout verdict.

Task-Id: T8
@philcunliffe
philcunliffe merged commit ab2627d into integration/install-experience-overhaul Jul 22, 2026
8 checks passed
@philcunliffe
philcunliffe deleted the task/install-experience-overhaul/T8 branch July 22, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant