Skip to content

Really fix WSL/SSH detection for AuthWorkflow#1374

Merged
synfinatic merged 1 commit into
mainfrom
fix-pkce-default
May 22, 2026
Merged

Really fix WSL/SSH detection for AuthWorkflow#1374
synfinatic merged 1 commit into
mainfrom
fix-pkce-default

Conversation

@synfinatic
Copy link
Copy Markdown
Owner

Yeah, I goofed. 2.2.3 didn't fix it.

Copilot AI review requested due to automatic review settings May 21, 2026 23:59
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.55%. Comparing base (5d574a8) to head (db30d56).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1374      +/-   ##
==========================================
+ Coverage   88.54%   88.55%   +0.01%     
==========================================
  Files          54       54              
  Lines        3655     3657       +2     
==========================================
+ Hits         3236     3238       +2     
  Misses        289      289              
  Partials      130      130              
Flag Coverage Δ
unittests 88.55% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/prompt/remote_host.go 100.00% <100.00%> (ø)
internal/sso/auth/awssso_auth.go 89.25% <100.00%> (ø)
internal/sso/settings.go 79.60% <100.00%> (+0.43%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d574a8...db30d56. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the logic that detects “remote host” environments (SSH/WSL) so the default OIDC AuthWorkflow selection behaves as documented, and bumps the release to v2.2.4 after the v2.2.3 fix proved insufficient.

Changes:

  • Treat WSL and SSH as a single “remote host” signal (prompt.IsRemoteHost) and remove the separate WSL check at call sites.
  • Default AuthWorkflow to device_code during settings load when running in a remote host environment and the setting is not configured.
  • Bump version to 2.2.4 and document the fix in the changelog.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Makefile Bumps PROJECT_VERSION to 2.2.4.
internal/sso/settings.go Applies remote-host-aware defaulting for AuthWorkflow during settings load.
internal/sso/settings_test.go Attempts to make settings tests independent of SSH/WSL env vars.
internal/sso/auth/awssso_auth.go Simplifies workflow selection to rely on IsRemoteHost() only.
internal/prompt/remote_host.go Consolidates SSH + WSL detection into IsRemoteHost() and removes IsWSL().
internal/prompt/remote_host_test.go Updates tests to validate consolidated remote host detection.
cmd/aws-sso/setup_wizard_cmd.go Updates wizard logic to use consolidated IsRemoteHost() check.
CHANGELOG.md Adds v2.2.4 entry and updates “Unreleased” compare link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/sso/settings.go Outdated
Comment thread internal/sso/settings_test.go
Comment thread internal/prompt/remote_host_test.go
Comment thread CHANGELOG.md Outdated
Comment thread internal/sso/auth/awssso_auth.go Outdated
Yeah, I goofed.  2.2.3 didn't fix it.
@synfinatic synfinatic merged commit 3e0f0da into main May 22, 2026
8 of 9 checks passed
@synfinatic synfinatic deleted the fix-pkce-default branch May 22, 2026 00:38
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