Tech DebtsCLIM3 Authenticated Distribution
PR #4 Auth Login Review Findings
PR #4 Auth Login Review Findings
Initial Debt
Codex PR review found two auth-login regressions after M3 delivery:
punks auth loginusedDP_CONTROL_PLANE_URLas a fallback Better Auth base URL, even though device authorization is mounted under/api/auth/*and the control-plane URL is the typed Harness API base.- Browser auto-open failures aborted device login in headless or remote environments, even though the verification URL had already been printed for manual use.
Resolution
- Removed
DP_CONTROL_PLANE_URLfrom device-login auth URL resolution. - Kept
--auth-urlandDP_AUTH_URLas the only Better Auth device-login sources. - Made browser auto-open best-effort so polling continues after
open/xdg-openfailure. - Updated docs to separate
DP_AUTH_URLfromDP_CONTROL_PLANE_URLand to require explicitDP_API_CLI_TOKENfor local static token auth.
Validation
bun run test --filter=@punks/cli: passed 75 tests.bun run check-types --filter=@punks/cli: passed 3 tasks.bun run check: passed.git diff --check: passed.bun run build --filter=@punks/cli: passed.- Built CLI
auth login --help: passed and shows--auth-urldefaults only toDP_AUTH_URL.