[ARCHIVED] Benchmark issue 467#467
Conversation
Detect the specific 403 error GitHub returns when an org
blocks classic personal access tokens ("forbids access via
a personal access token") and wrap it with actionable
remediation guidance.
Changes:
- Add ErrClassicPATForbidden sentinel to forge.go
- Add isClassicPATForbiddenError detection in github.go,
wired into APIError.Unwrap
- Add classicPATHint wrapper in admin.go that prints
token resolution order and fine-grained PAT setup steps
- Wrap all GetRepo/ListOrgRepos call sites in admin.go
and github.go with classicPATHint
- Add token resolution and fine-grained PAT permissions
docs to configuring-github.md
Closes #364
- Fix garbled multi-line output in StepWarn (github.go): use short summary string instead of full classicPATHint().Error() - Add StepFail call to runEnableRepos classic PAT early returns for consistent UX with loadRepoConfig - Wrap ListOrgRepos in disable-repos variable-sync path with classic PAT detection - Fix comment-code mismatch in isClassicPATForbiddenError: comment now matches the broader match string used in code - Add unit test for classicPATHint pass-through and wrapping Addresses review feedback on #427
|
/fs-review |
|
🤖 Finished Review · ❌ Failure · Started 10:15 AM UTC · Completed 10:25 AM UTC |
ReviewVerdict: Approve ✅ Clean, well-structured enhancement that adds actionable remediation guidance when a GitHub organization rejects classic PATs. The implementation follows established forge abstraction patterns precisely. What was reviewed
Observations (low severity, non-blocking)
Design notes
Previous runReviewVerdict: approve Clean, well-structured change that adds detection and actionable remediation guidance for GitHub organizations that block classic personal access tokens. The implementation follows the existing sentinel error pattern ( Dimensions reviewed
Test coverageAdequate. Detection logic has 6 test cases covering the key scenarios (org-name variations, false positives on other 403s, Errors-array-only matching, wrong status codes). Notes
Labels: PR modifies CLI error handling (internal/cli/) and forge error abstraction (internal/forge/), and adds user documentation Previous run (2)Review — PR #467Verdict: ✅ Approve SummaryThis PR addresses both gaps identified in #466: it detects GitHub's "classic PAT forbidden" 403 error at the forge layer, surfaces actionable remediation in the CLI, and documents token resolution order and fine-grained PAT requirements. The implementation follows existing codebase patterns precisely — sentinel error in Dimension results
Low-severity notes[coverage-gap] A few secondary forge call sites ( Labels: PR fixes error UX gap (type/bug) and includes documentation updates |
|
🤖 Finished Review · ✅ Success · Started 10:28 AM UTC · Completed 10:38 AM UTC |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 12:29 PM UTC · Completed 12:38 PM UTC |
Closes #466
LSP experiment v2: clean first-review with gopls-lsp enabled.
Code identical to PR #427 (issue #364).
Branch created from commit 4081de8.