Skip to content

fix(cli): use English setup gh auth remediation#417

Merged
moncher-dev merged 1 commit into
mainfrom
feat/397-setup-gh-auth-remediation
Jun 24, 2026
Merged

fix(cli): use English setup gh auth remediation#417
moncher-dev merged 1 commit into
mainfrom
feat/397-setup-gh-auth-remediation

Conversation

@moncher-dev

@moncher-dev moncher-dev commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

Interactive gh-symphony setup now uses the shared English formatGhAuthRemediation path for GhAuthError failures instead of hardcoded Korean strings.

변경 지점 다이어그램

setup.ts interactive auth preflight → GhAuthErrorformatGhAuthRemediation(error, { retryCommand: "gh-symphony setup" }) → clack p.log.error output

여기부터 보세요

  • packages/cli/src/commands/setup.ts — adds the clack-specific auth remediation display helper and routes interactive setup auth failures through it.
  • packages/cli/src/commands/setup.test.ts — covers all five GhAuthError codes, including invalid_token and token_failed.
  • .changeset/english-setup-gh-auth.md — patch changeset for @gh-symphony/cli.

위험 & 롤백

Risk is low: this only changes the interactive setup auth failure presentation path. Roll back by reverting the setup helper/test changes and the changeset.

변경 파일

  • .changeset/english-setup-gh-auth.md
  • packages/cli/src/commands/setup.ts
  • packages/cli/src/commands/setup.test.ts

Evidence

  • pnpm exec vitest run packages/cli/src/commands/setup.test.ts — passed
  • rg -n '[가-힣]' packages/cli/src --glob '*.ts' --glob '!*.test.ts' — no matches
  • pnpm lint — passed
  • pnpm test — passed
  • pnpm typecheck — passed
  • pnpm build — passed
  • Docker E2E: N/A, CLI message formatting only; no orchestrator dispatch, worker lifecycle, tracker adapter, or status API behavior changed

Issues — Closed #397

Closes #397

머지 후/사람 확인

  • Confirm gh-symphony setup shows readable English remediation when gh is missing, unauthenticated, or missing scopes.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.16% 28592 / 73004
🔵 Statements 39.16% 28592 / 73004
🔵 Functions 71.64% 1400 / 1954
🔵 Branches 76.51% 5875 / 7678
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cli/src/commands/setup.ts 70.99% 59.64% 88.88% 70.99% 67-69, 71-72, 74-75, 88-106, 123-126, 132-135, 142-145, 197-198, 218-223, 231-234, 238-243, 249-254, 258-261, 272-278, 282-287, 323-333, 366-367, 380-388, 398-402, 406-411, 431-432, 481-484, 513-517
Generated in workflow #308 for commit e3252da by the Vitest Coverage Report Action

@moncher-dev moncher-dev force-pushed the feat/397-setup-gh-auth-remediation branch from ebe0206 to 0f1d60b Compare June 24, 2026 23:44
@moncher-dev moncher-dev marked this pull request as ready for review June 24, 2026 23:45
@hojinzs hojinzs requested a review from Copilot June 24, 2026 23:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the interactive gh-symphony setup command to reuse the shared English formatGhAuthRemediation output for GhAuthError, aligning setup’s onboarding UX with the existing repo start behavior. Layer classification: Integration Layer (GitHub/gh auth integration surfaced through CLI UX).

Changes:

  • Route interactive setup gh-auth preflight failures through formatGhAuthRemediation(...) instead of hardcoded Korean strings.
  • Add a clack-specific displayGhAuthError helper for consistent @clack/prompts error output.
  • Add parameterized tests covering all five GhAuthError codes and asserting no Korean output.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/cli/src/commands/setup.ts Introduces displayGhAuthError and uses shared English remediation formatting for interactive setup auth failures.
packages/cli/src/commands/setup.test.ts Adds it.each coverage for all GhAuthError codes and validates English remediation output + exit behavior.
.changeset/english-setup-gh-auth.md Patch changeset for @gh-symphony/cli documenting the user-visible remediation message change.

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

@hojinzs hojinzs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

✅ Approve — PR #417 완성도 검증 완료

원본 이슈 #397의 요구 사항과 수용 조건이 빠짐없이 반영되었으며, 스모크 테스트와 코드 품질 검사를 통과하여 승인합니다.

1. 이슈 요구사항 충족 (#397)

  • setup.ts runInteractive의 한국어 전용 에러 문자열(3건) 제거 → 공유 영문 formatGhAuthRemediation 경로로 통합
  • formatGhAuthRemediation(error, { retryCommand: "gh-symphony setup" }) 라우팅 — repo start와 동일한 메시지 재사용
  • @clack/promptsp.log.errortitle/message/hint를 매핑 (start.ts의 stderr 방식 그대로 복사하지 않음)
  • 보너스 커버리지 갭 해소 — 기존 핸들러는 5개 코드 중 3개만 분기(invalid_token/token_failed는 raw error.message로 누락)했으나, 이제 5개 코드 전부 일관된 영문 remediation으로 처리
  • 이미 존재하던 import 라인에 formatGhAuthRemediation만 추가 — 신규 모듈 배선 없음
  • .changeset/english-setup-gh-auth.md patch 체인지셋 포함

2. Smoke Test (로컬 검증)

Preview 환경이 없어 로컬에서 빌드 후 실제 CLI 바이너리로 검증:

  • node packages/cli/dist/index.js setup (gh 미설치 환경) → 영문 remediation 정상 출력, 한국어 없음, exit code 1 확인
    x  GitHub authentication is not available: gh CLI is not installed. ...
    x  Install gh CLI from https://cli.github.com or set GITHUB_GRAPHQL_TOKEN.
    
  • vitest run packages/cli/src/commands/setup.test.ts13 passed (신규 5개 파라미터화 테스트 포함, 5개 코드 전부 커버 + 한국어 부재 + process.exitCode === 1 + listUserProjects 미호출 검증)
  • pnpm --filter @gh-symphony/cli lint → pass
  • tsc --noEmit (cli) → pass
  • CI: Test ✅ / Container Smoke ✅ (green)

3. Code Review

  • 변경 범위가 좁고 책임이 명확하며(메시지 표현 경로 한정), 런타임 상태/디스패치/워커/트래커 동작에 영향 없음
  • 테스트 품질 우수 — it.each로 5개 코드를 전수 검증
  • 인라인 코멘트 1건: not_installed 케이스의 메시지/힌트 중복 출력 (공유 헬퍼의 기존 동작이며 repo start와 동일, 본 PR 범위 밖의 선택적 후속 개선 사항)

리스크 낮음, 회귀 없음. Approve.


Generated by Claude Code

});

p.log.error(`${remediation.title}: ${remediation.message}`);
p.log.error(remediation.hint);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nit (non-blocking, no change requested for this PR): in the not_installed case, smoke-testing shows the install instruction prints twice — remediation.message is the GhAuthError message ("gh CLI is not installed. Install it from https://cli.github.com or set GITHUB_GRAPHQL_TOKEN.") and remediation.hint repeats nearly the same ("Install gh CLI from https://cli.github.com or set GITHUB_GRAPHQL_TOKEN."). This is pre-existing behavior of the shared formatGhAuthRemediation helper and is identical to what gh-symphony repo start already produces, so it's out of scope here — flagging only as a future cleanup opportunity in the shared helper, not a blocker for this change.


Generated by Claude Code

@moncher-dev moncher-dev force-pushed the feat/397-setup-gh-auth-remediation branch from 0f1d60b to 9525476 Compare June 24, 2026 23:54
@moncher-dev moncher-dev reopened this Jun 24, 2026
@moncher-dev moncher-dev force-pushed the feat/397-setup-gh-auth-remediation branch from fffec5c to e3252da Compare June 24, 2026 23:57
@moncher-dev moncher-dev merged commit 2e23d6d into main Jun 24, 2026
2 checks passed
@moncher-dev moncher-dev deleted the feat/397-setup-gh-auth-remediation branch June 24, 2026 23:59
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.

Use English gh-auth remediation in interactive gh-symphony setup (currently Korean-only)

3 participants