- Add docs/srs/Interface/req-014_portfolio-create-user-required.md with acceptance criteria - Create docs/batches/bat-004_20260502_portfolio-create-user-required/ delivery batch - Enhance app/cli/commands/portfolio.py: validate user_id parameter before portfolio creation - Add comprehensive CLI tests in tests/test_cli.py for portfolio create validation flows - Update docs/batches/index.md and docs/srs/index.md with new requirement/batch references - Update README.md documentation
1.4 KiB
1.4 KiB
BAT-004 Index
- Status: release-candidate
- Batch: BAT-004
- Profile: batch-lite
- Created: 2026-05-02
Included REQ
| REQ | 제목 | Type | Priority |
|---|---|---|---|
| REQ-014 | CLI portfolio create --user 필수화 및 소유자 설정 |
Interface | Medium |
Source Discovery
- minor-change fast path (Discovery 없음)
Scope Summary
- CLI
pfhub portfolio create명령에--user <username>필수 옵션 추가 _with_service_and_repo헬퍼(REQ-013 도입) 재사용,repository.get_user_by_username(user)호출PortfolioService.create_portfolio(owner_user_id=owner.id, ...)실제 UUID 전달--user미입력 시 exit code 1, 미존재 username 시 exit code 1- README 예제 갱신
- DB 스키마 변경 없음, HTTP API 변경 없음
Impacted Area
- Docs:
README.md—pfhub portfolio create예제 라인--user <username>추가
- Modules:
app/cli/commands/portfolio.py—create_portfolio명령 수정
- Tests:
tests/test_cli.py— 기존test_cli_create_buy_and_delete_flow수정 + AC 1~4 커버 케이스 추가
Stage Documents
| Stage | File | Status |
|---|---|---|
| Planning | planning.md | confirmed |
| Implementation | implementation.md | completed |
| Verification | verification.md | verified |