Skip to content

Posit AI sign-in flow has no per-step logging under PW_DEBUG_AUTH_STEPS #18334

Closed

Description

@ronblum

System details

RStudio Edition : N/A
RStudio Version : N/A
OS Version      : N/A
R Version       : N/A

Steps to reproduce the problem

Set both providers' credentials (POSIT_EMAIL/POSIT_PASSWORD and COPILOT_USER/COPILOT_PASSWORD) in e2e/rstudio/.env.local, then run the auth setup with the step-logging flag on:

  1. Run PW_DEBUG_AUTH_STEPS=1 npx playwright test tests/auth.setup.ts.
    • The GitHub Copilot flow prints per-step lines ([gh-authorize] login page shown, 2FA prompt, user-code entry, Authorize button state) plus the agent's [copilot-agent] diagnostics.
    • The Posit AI flow prints only its [auth-setup] milestones. Its individual browser steps (open activation URL, submit email, submit password, enter user code, authorize) emit nothing on a successful run.

Describe the problem in detail

PW_DEBUG_AUTH_STEPS is meant to surface per-step detail for the sign-in flows, but only the Copilot flow has step narration wired up. Posit AI's automateLogin() uses a step() wrapper that logs only when a step throws, so on a run that succeeds (or one that misbehaves without throwing) there is nothing to see for it, even with the flag set. The switch is therefore asymmetric: it makes one provider verbose and does nothing for the other.

Describe the behavior you expected

Setting PW_DEBUG_AUTH_STEPS would ideally produce comparable step-level narration for every provider's sign-in flow. For Posit AI that means emitting a line per step from the step() wrapper, gated on the flag.

The outcome-level reporting is a separate layer and already consistent, so it needs no change: each provider writes a per-provider status file (source, outcome, reason) and its [auth-setup] milestones, both mechanism-agnostic. This request is only about the optional verbose detail. It is worth keeping that split in mind as more providers arrive -- some may authenticate with no browser at all (API keys, cloud roles), so their mechanism-specific detail would hang off the same flag while their outcome continues to flow through the existing status vocabulary.

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions