Skip to content

fix(auth): explain headless refresh stage failures - #364

Merged
jacob-bd merged 1 commit into
jacob-bd:mainfrom
insane66613:fix/headless-auth-stage-diagnostics
Oct 6, 2026
Merged

jacob-bd merged 1 commit into
jacob-bd:mainfrom
insane66613:fix/headless-auth-stage-diagnostics

Conversation

@insane66613

Copy link
Copy Markdown
Contributor

Problem / root cause

PR #363 preserves actionable browser infrastructure failures during explicit auth refresh, but several non-infrastructure headless failure stages still collapse to None. In particular, a saved managed browser profile that exists but is signed out produces only the generic "did not yield fresh credentials" result, which obscures the actual recovery step required.

Solution

When raise_on_error=True, surface safe AuthenticationError diagnostics for these headless refresh stages:

  • missing managed browser profile
  • NotebookLM page creation / DevTools websocket failure
  • saved profile not signed in to NotebookLM
  • NotebookLM page load timeout
  • required NotebookLM cookies missing
  • extracted credentials rejected by live NotebookLM validation

Automatic background recovery keeps the existing best-effort None behavior.

Verification

  • 21 affected auth tests passed
  • Ruff check passed
  • Ruff format check passed
  • git diff --check passed
  • Added regressions for signed-out saved profiles, best-effort compatibility, and candidate rejection

Compatibility / risk

Low. The new errors are opt-in through the existing raise_on_error=True diagnostic mode. Normal automatic recovery behavior is unchanged.

@jacob-bd
jacob-bd merged commit 43c0662 into jacob-bd:main Oct 6, 2026
4 checks passed
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.

2 participants