Skip to content

DX: Improve auth error messages, sparse checkout token consistency, and error deduplication#478

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/improve-auth-error-messages
Draft

DX: Improve auth error messages, sparse checkout token consistency, and error deduplication#478
Copilot wants to merge 5 commits intomainfrom
copilot/improve-auth-error-messages

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

Description

Three DX improvements identified during RCA for #425 — not root-cause bugs, but they made auth failures harder to diagnose.

1. Misleading "transitive dep" error for direct dependencies

download_callback now checks direct_dep_keys to select the right label:

  • Direct: Failed to download dependency org/repo: <error>
  • Transitive: Failed to resolve transitive dep org/repo (via root > mid): <error>

2. Sparse checkout ignoring per-org tokens

_try_sparse_checkout used self.github_token (global) instead of resolve_for_dep() (per-org). Extracted shared _resolve_dep_token() helper used by both _try_sparse_checkout and _clone_with_fallback.

3. Duplicate error count on clone failure

A dep failing in the BFS resolution callback was re-attempted in the main install loop, producing two diagnostic entries ("2 packages failed" for one failure). Added callback_failures set; main loop skips already-failed deps with verbose logging.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

4 new tests: direct vs transitive error message selection, deduplication (single error entry), sparse checkout per-org token resolution. Full suite (3112 tests) passes.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Improve auth error messages and token consistency DX: Improve auth error messages, sparse checkout token consistency, and error deduplication Mar 27, 2026
Copilot AI requested a review from danielmeppiel March 27, 2026 12:12
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.

DX: Improve auth error messages and sparse checkout token consistency

2 participants