Expand description
Filesystem/directory provisioning for the pre-launch OAuth flow.
Split out of identity_handlers.rs (module-organization pass, see
docs/specs/PLAN_LOGIN_SINGLE_PATH_CONSOLIDATION_2026_07_20.md) —
owns compute_and_ensure_bundle_dir (vestigial, bundle mode was
retired in Phase 4c of SPEC_PRESET_TO_BUNDLE_REFACTOR_2026_07_02.md,
kept only so the wire shape and its one call site in
identity_handlers::register_identity_handlers don’t need touching)
and compute_and_ensure_account_dir (the live direct-account path).
Functions§
- caller_
auth_ dir - The account directory a caller already chose, as
auth_envnames it under the provider’sauth_config_dir_env_var: the key that keeps a login the caller persists itself (notdirect_account) to one live session per directory.Nonefor a provider without one, or when it isn’t set. - compute_
and_ ensure_ account_ dir - Returns
(account_id, dir)—account_idis always populated (even on a dir-resolution failure, so the caller can still log/track it);dirisNoneon the same gate/registry/fs failurescompute_and_ensure_bundle_dirtreats as soft failures — never abortauth.startover a config-dir issue. - compute_
and_ ensure_ bundle_ dir - Compute the per-bundle OAuth config dir + ensure it exists +
override the provider’s
auth_config_dir_env_varentry inauth_env.