Skip to content

fix: prevent silent flag failures and separate auth exit code#7

Merged
minsoo-web merged 2 commits into
mainfrom
fix/silent-failure-and-exit-code
Mar 13, 2026
Merged

fix: prevent silent flag failures and separate auth exit code#7
minsoo-web merged 2 commits into
mainfrom
fix/silent-failure-and-exit-code

Conversation

@minsoo-web

Copy link
Copy Markdown
Member

Summary

  • --period--offset 플래그에 conflicts_with_all을 추가하여, --recent/--username/--drafts 모드에서 사용 시 에러 없이 무시되던 조용한 실패를 방지
  • AuthError exit code를 2→1로 변경하여 인증 에러(런타임)와 clap 사용법 에러를 구분 가능하게 함 (POSIX 관례 준수)

Test plan

  • cargo test — 150 tests passed (120 unit + 30 integration)
  • cargo clippy -- -D warnings — 0 warnings
  • velog post list --recent --period day → exit 2, 에러 메시지 (기존: 조용한 실패)
  • velog post list --username test --period day → exit 2, 에러 메시지
  • velog post list --recent --offset 10 → exit 2, 에러 메시지
  • velog post list --trending --period day → 정상 동작 유지
  • velog post list --period day (단독) → requires 에러 유지

Context

CLI UX E2E 테스트(.ux-test-results/report.md)에서 발견된 2개 Critical + 1개 Fail 이슈 수정:

  • [CRITICAL] --period--recent/--username과 함께 사용 시 에러 없이 무시됨
  • [CRITICAL] --offset이 trending 외 모드에서 에러 없이 무시됨
  • [FAIL] 인증 에러와 clap 에러가 동일한 exit code 2를 사용하여 스크립트에서 구분 불가

🤖 Generated with Claude Code

minsoo-web and others added 2 commits March 13, 2026 11:32
Add conflicts_with_all to --period and --offset flags in post list
command to prevent silent failures when used with incompatible modes
(--recent, --username, --drafts). Change AuthError exit code from 2
to 1 to distinguish runtime auth errors from clap usage errors per
POSIX conventions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update doc comments that still referenced exit code 2 for AuthError
to reflect the corrected exit code 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@minsoo-web minsoo-web merged commit f482599 into main Mar 13, 2026
12 checks passed
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.

1 participant