fix: resolve SRS conflicts from batch verification analysis (CONFLICT-1~4)
Conflict Resolutions: - CONFLICT-1 (High): Fix REQ-006 ownership scope — implement owner_user_id filtering * Change app/api/v1_assets.py: owner_user_id=None → owner_user_id=auth.user_id * Update docs/runtime-flows.md to reflect service-token owner-scoped portfolio filtering * Add regression test in tests/test_v1.py for ownership boundary - CONFLICT-2 (Medium): Transition REQ-001/002/003 to Implemented * REQ-001: local-db-validation-scenarios (via confirm-req-implemented bat-007) * REQ-002: alembic-runtime-schema-ownership (via confirm-req-implemented bat-007) * REQ-003: local-db-operations-runbook-and-baseline-updates (via confirm-req-implemented bat-007) * Update docs/srs/index.md with status transitions - CONFLICT-3 (Low): Document REQ-012 rotate lifecycle * Add rotate lifecycle notes to REQ-012 (change-req req-012) * Clarify runtime_id change behavior and trex-basic reconnection requirements - CONFLICT-4 (Low): Clarify REQ-005 AC-2 endpoint path * Change REQ-005 AC-2: 'POST /auth/tokens or equivalent' → 'POST /auth/service-tokens' * Update docs/srs/index.md change log with change-req entries Documentation Updates: - Update BAT-001 verification status with conflict resolution evidence - Update release rel-001 with verified status confirmation - Add change log entries for all conflict resolutions with dates and references Testing: - Add ownership boundary test to test_v1.py - Verify filter works with auth.user_id context
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
- Status: re-verified
|
||||
- Batch: BAT-001
|
||||
- Last Updated (KST): 2026-05-03
|
||||
- Re-verification Trigger: CHG-20260503-01 (REQ-006 strategy_type 필드 추가)
|
||||
- Last Updated (KST): 2026-05-11
|
||||
- Re-verification Trigger: CHG-20260503-01 (REQ-006 strategy_type 필드 추가), CHG-20260511-02 (REQ-006 owner scope 회귀 수정)
|
||||
|
||||
## Acceptance Mapping
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
| # | Acceptance Criterion | Evidence | Result |
|
||||
|---|---|---|---|
|
||||
| AC1 | service-token 인증 → 200 + portfolio 목록 | `tests/test_v1.py::test_v1_assets_returns_asset_list` PASS | PASS |
|
||||
| AC1 | service-token 인증 → 200 + 해당 사용자 소유 portfolio 목록만 반환 | `tests/test_v1.py::test_v1_assets_returns_asset_list` — 200 응답 PASS, `mock_repo.list_portfolios_with_strategies.assert_called_once_with(owner_user_id="user-1", include_disabled=False)`로 owner scope 전달 검증 PASS | PASS |
|
||||
| AC2 | ?status=active 쿼리 파라미터 필터 | `tests/test_v1.py::test_v1_assets_status_filter` — ?status=active 필터 동작 확인 PASS | PASS |
|
||||
| AC3 | 응답 필드: asset_id, symbol, market, status, cash, quantity, broker_type, strategy_id, strategy_type, strategy_params, updated_at | `test_v1_assets_returns_asset_list` — 필드명 assert PASS. `test_v1_assets_strategy_params` — strategy_type=="strategy" PASS. `test_v1_assets_returns_asset_list` — strategy_type is None PASS | PASS |
|
||||
| AC4 | strategy_params → StrategySet.config 파생 JSON | `tests/test_v1.py::test_v1_assets_strategy_params` — config JSON 파싱 결과 반환 PASS | PASS |
|
||||
@@ -49,7 +49,7 @@
|
||||
| AC8 | active_strategy_id → strategy_type = StrategySet.name | `tests/test_v1.py::test_v1_assets_strategy_params` — `strategy_type == "strategy"` assert PASS | PASS |
|
||||
| AC9 | active_strategy_id 없거나 조회 실패 → strategy_type = null | `tests/test_v1.py::test_v1_assets_returns_asset_list` — `strategy_type is None` PASS. `test_v1_assets_strategy_params_fallback_on_error` — `strategy_type is None` PASS | PASS |
|
||||
|
||||
**REQ-006 판정: PASS** (CHG-20260503-01 strategy_type 추가 재검증 완료)
|
||||
**REQ-006 판정: PASS** (CHG-20260503-01 strategy_type 추가, CHG-20260511-02 owner scope 회귀 수정 재검증 완료)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,6 +126,8 @@
|
||||
|
||||
### Automated Tests (pytest)
|
||||
|
||||
- `tests/test_v1.py -k 'v1_assets'` — 6 passed, 13 deselected (2026-05-11 targeted rerun)
|
||||
- `test_v1_assets_returns_asset_list`에 owner scope 전달 assert 추가
|
||||
- `tests/test_v1.py` — 19개 전부 PASS
|
||||
- `test_health_returns_full_response`, `test_auth_issue_service_token_returns_runtime_id`
|
||||
- `test_v1_assets_requires_service_token`, `test_v1_assets_rejects_env_token`, `test_v1_assets_returns_asset_list`
|
||||
@@ -171,6 +173,10 @@
|
||||
- **Ready for Release: true**
|
||||
|
||||
|
||||
## Historical Snapshot (2026-05-02 Initial Verification)
|
||||
|
||||
- 아래 섹션은 BAT-001의 초기 검증 기록이다. 현재 유효한 판정은 위 `Acceptance Mapping`, `Evidence`, `Result` 섹션을 따른다.
|
||||
|
||||
## Acceptance Mapping
|
||||
|
||||
### REQ-004: GET /health 응답 스키마 확장
|
||||
|
||||
Reference in New Issue
Block a user