- Add V1 API endpoints: assets, ledger, user-info - Implement Fernet-based credential payload encryption (req-010) - Extend health response schema with runtime info (req-004) - Add service token runtime ID issuance (req-005) - Implement database schema migration for V1 API (req-009) - Add comprehensive test coverage for V1 endpoints - Update SRS with 10 new requirements (REQ-004 through REQ-011) - Create batch planning, design, and verification for BAT-001 - Integrate review-discovery StagePilot skill - Update documentation indices and baseline specs
96 lines
3.4 KiB
Markdown
96 lines
3.4 KiB
Markdown
# req-004: GET /health 응답 스키마 확장
|
|
|
|
- Status: Approved
|
|
- Type: Interface
|
|
- Priority: High
|
|
- Owner: repository-maintainers
|
|
|
|
## Intent
|
|
- trex-basic Consumer-Driven Contract는 GET /health가 status, service, version, checked_at을 반환할 것을 요구한다.
|
|
- 현재 구현은 `{"status": "ok"}`만 반환하므로 계약 스키마를 충족하도록 응답을 확장한다.
|
|
|
|
## Requirement
|
|
- GET /health 엔드포인트는 status, service(고정값 "portfolio-hub"), version(앱 버전), checked_at(ISO 8601 KST) 필드를 포함한 JSON을 반환해야 한다.
|
|
- status 허용값은 ok, degraded, failed이며 정상 응답은 ok를 반환해야 한다.
|
|
|
|
## Acceptance Criteria
|
|
1. Given 서비스가 정상 동작 중일 때, When GET /health를 요청하면, Then 응답 JSON에 status, service, version, checked_at 필드가 모두 존재해야 한다.
|
|
2. Given GET /health 응답을 받을 때, When status 값을 확인하면, Then "ok", "degraded", "failed" 중 하나여야 한다.
|
|
3. Given GET /health 응답을 받을 때, When checked_at 형식을 검증하면, Then ISO 8601 형식을 만족해야 한다.
|
|
4. Given GET /health 응답을 받을 때, When service 필드를 확인하면, Then 고정값 "portfolio-hub"여야 한다.
|
|
5. Given 인증 없이 GET /health를 요청해도, Then 200 응답이 반환되어야 한다(비인증 엔드포인트).
|
|
|
|
## Impacted Area
|
|
- Docs: docs/interface-contract.md (REQ-011에서 갱신 예정), docs/runtime-flows.md
|
|
- Modules: app/api/health.py, app/schemas/ (HealthResponse 스키마 추가)
|
|
- Tests: tests/test_health.py (신규) 또는 tests/test_app.py 확장
|
|
|
|
## Notes
|
|
- degraded 상태를 반환하는 트리거 조건은 이번 반복에서 정의하지 않는다(OQ-2 Answered). 스키마에 허용값으로만 포함한다.
|
|
- 앱 버전은 pyproject.toml의 version 필드 또는 settings에서 읽어 반환한다. 설계 단계에서 구체적 방법을 확정한다.
|
|
- Source Discovery: dcy-002 (FR-1)
|
|
|
|
## Change Log
|
|
|
|
### CHG-20260502-02
|
|
- Date: 2026-05-02
|
|
- Author: repository-maintainers
|
|
|
|
#### Change Summary
|
|
- REQ-004 confirm-req 승인 전환 (Status: Proposed → Approved)
|
|
|
|
#### Intent
|
|
- 필수 필드(Status, Type, Priority, Owner, Intent, Requirement, Acceptance Criteria 5개, Impacted Area, Change Log) 모두 충족 확인 후 승인
|
|
|
|
#### Acceptance Criteria Delta
|
|
- No change
|
|
|
|
#### Impacted Area Delta
|
|
- No change
|
|
|
|
#### Delivery Trace Delta
|
|
- Batches:
|
|
- none
|
|
- Releases:
|
|
- none
|
|
|
|
#### Revalidation Impact
|
|
- Reverification Needed: no
|
|
- Existing Implementation Invalidated: no
|
|
- Status Recommendation: keep-current
|
|
- Follow-up Action: suggest-batch-reqs → draft-batch
|
|
|
|
### CHG-20260502-01
|
|
- Date: 2026-05-02
|
|
- Author: repository-maintainers
|
|
|
|
#### Change Summary
|
|
- REQ-004 최초 생성 (source Discovery: dcy-002 FR-1)
|
|
|
|
#### Intent
|
|
- trex-basic Consumer-Driven Contract의 GET /health 응답 스키마 요구사항을 REQ backlog로 정규화
|
|
|
|
#### Acceptance Criteria Delta
|
|
- Added:
|
|
- 전체 Acceptance Criteria 신규 작성
|
|
|
|
#### Impacted Area Delta
|
|
- Docs:
|
|
- docs/interface-contract.md (REQ-011 에서 갱신 예정)
|
|
- Modules:
|
|
- app/api/health.py
|
|
- Tests:
|
|
- tests/test_health.py 신규
|
|
|
|
#### Delivery Trace Delta
|
|
- Batches:
|
|
- none (batch 미생성 상태)
|
|
- Releases:
|
|
- none
|
|
|
|
#### Revalidation Impact
|
|
- Reverification Needed: no
|
|
- Existing Implementation Invalidated: no
|
|
- Status Recommendation: keep-current
|
|
- Follow-up Action: confirm-req 후 batch 배정
|