auth login: origin-mismatch UI does not fire for env-only (MADTEA_URL) forge config #379

Closed
opened 2026-08-16 21:41:57 +00:00 by hexajon · 0 comments
Owner

The origin-aware interactive auth login (branch fix/auth-login-origin-aware) compares the configured forge against the repo origin and warns on a mismatch. The configured forge comes from config.DetectURL, which reads the merged madtea.url git config and the origin remote, but NOT the MADTEA_URL environment variable.

So a forge configured purely via MADTEA_URL yields configuredForge="", and planLogin forces mismatch=false. A genuine env-forge-vs-origin mismatch is silently not surfaced.

Not a regression (the prior flow had no mismatch detection at all). Fix: have the mismatch detection also treat MADTEA_URL as a configured-forge source (resolve the configured forge through the same precedence the resolver uses), so env-configured users get the mismatch warning too.

The origin-aware interactive `auth login` (branch `fix/auth-login-origin-aware`) compares the configured forge against the repo origin and warns on a mismatch. The configured forge comes from `config.DetectURL`, which reads the merged `madtea.url` git config and the origin remote, but NOT the `MADTEA_URL` environment variable. So a forge configured purely via `MADTEA_URL` yields `configuredForge=""`, and `planLogin` forces `mismatch=false`. A genuine env-forge-vs-origin mismatch is silently not surfaced. Not a regression (the prior flow had no mismatch detection at all). Fix: have the mismatch detection also treat `MADTEA_URL` as a configured-forge source (resolve the configured forge through the same precedence the resolver uses), so env-configured users get the mismatch warning too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#379
No description provided.