Commit Graph

3 Commits

Author SHA1 Message Date
kjh2064 0b503c20af feat(collection): PostgreSQL 백킹 활성화 (CollectionRepository + TokenCache)
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 7s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 13s
Snapshot Admin Deployment / build-and-deploy (push) Failing after 1m21s
Deploy to Production / Build & Deploy to Production (push) Successful in 1m55s
- Program.cs: PlaceholderCollectionRepository/TokenCache/KisApiClient → 실제 구현체로 변경
- 데이터베이스 초기화: EnsureTablesAsync() 호출 (시작 시 테이블 자동 생성)
- kis_tokens, kis_collection_runs, kis_collection_snapshots, kis_collection_errors 테이블
- Dapper 기반 SQL 쿼리 (파라미터화, SQL 주입 방지)
- 인덱스: started_at, ticker, captured_at, run_id
- PlaceholderImplementations.cs 제거

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-29 23:32:29 +09:00
kjh2064 4ef7a54ad5 feat(collection): 데이터 수집 파이프라인 완전 마이그레이션 (Stage 2-3 완료)
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 10s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 6s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Snapshot Admin Deployment / build-and-deploy (push) Failing after 1m1s
Deploy to Production / Build & Deploy to Production (push) Successful in 1m23s
**Stage 2: KIS API 클라이언트 + PostgreSQL 인프라**
- IKisApiClient.cs + KisApiClient.cs 구현
  · 토큰 캐싱 (ITokenCache 통합)
  · 보안 강화: /trading/ 경로 및 주문 TR_ID 차단
  · Windows env var + registry fallback (자격증명)
  · Bearer 토큰 인증

- PostgreSQL 저장소:
  · CollectionRepository (CRUD + 대시보드)
  · PostgresTokenCache (토큰 생명주기)
  · 3개 테이블 자동 생성 (kis_collection_runs, snapshots, errors)
  · Dapper + 원시 SQL (PostgreSQL 호환)

- API DI 등록:
  · builder.Services.AddScoped<ICollectionRepository, CollectionRepository>()
  · builder.Services.AddScoped<ITokenCache, PostgresTokenCache>()
  · builder.Services.AddScoped<IKisApiClient, KisApiClient>()

**Stage 3: Web API 통합 + Blazor UI**
- CollectionEndpoints.cs: 6개 RESTful 엔드포인트
  · GET /api/collection/state (대시보드 요약)
  · GET /api/collection/runs (최근 실행 이력)
  · GET /api/collection/runs/{runId}/snapshots
  · GET /api/collection/runs/{runId}/errors
  · GET /api/collection/latest/{ticker}
  · POST /api/collection/run (비동기 실행 시작)

- Collection.razor: Fluent UI 기반 대시보드
  · 요약 카드 (상태, 스냅샷 수, 에러 수)
  · 최근 에러 테이블
  · 최근 실행 이력
  · Start/Refresh 컨트롤
  · FluentSkeleton 로딩 상태

- ApiClient.cs: 8개 Collection 메서드 + DTO

**보안 거버넌스 강화**
- AssertReadOnly() 차단 목록:
  · FORBIDDEN_PATH_SUBSTRINGS: { "/trading/" }
  · FORBIDDEN_TR_ID_PREFIXES: { "TTTC08", "VTTC08", "TTTC01", "VTTC01", "TTTC8434R", "VTTC8434R" }
  · 출처: governance/rules/06_no_direct_api_trading.yaml

**빌드 결과**
-  Compile: 0 errors, 6 RC warnings (acceptable)
-  Runtime: 성공
-  서버: http://localhost:5265

**마이그레이션 상태 (CLAUDE.md 업데이트)**
- Phase 1 (Web UI):  COMPLETE
- Phase 2 (KIS API + 데이터 수집):  COMPLETE (통합 테스트 대기)
- Phase 3 (CLI Tools): 📋 PLANNED

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-29 23:26:58 +09:00
kjh2064 2ba8def9bb feat(dotnet): migrate core formulas, deploy tools, and blazor admin web app to .NET 10
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
2026-06-25 15:52:10 +09:00