Files
kjh2064 70824c2afb fix: security, data-integrity, and doc-drift findings from repo audit
Consolidates duplicate KIS API client implementations (governance tests
were exercising an unused class instead of the one actually running in
production), closes a SQL injection path in the DB admin page, fixes a
migration that used MySQL-only syntax and had never actually applied
(confirmed against production), resyncs docs/db/quantengine.dbml with
all migrations, and removes a duplicate OMS·WMS·ERP frontend tree in
favor of src/frontend/. Also corrects several unverifiable/inflated
claims in the OMS planning docs and realigns CI/CD and architecture
documentation with what's actually in the repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 11:20:02 +09:00

5.2 KiB

QuantEngine Migration Status (Historical Log)

Detailed phase-by-phase migration history, extracted from CLAUDE.md (2026-07-30) to keep the main file within the character budget. CLAUDE.md keeps a short summary; this file is the full historical record.

Migration Phases Status (2026-07-11)

Phase 1: Web UI Migration 완료 (2026-07-11)

  • 새로운 표준: Razor Pages (Server-Rendered) + Cookie Authentication + Tabler UI
  • 폐기 대상: Blazor Interactive WebAssembly, MudBlazor, SmartAdmin
  • 완료 기준 — Phase 1 Success Criteria:
    • Cookie 인증 구현 (AuthService + IpLockoutService + BCrypt)
    • Razor Pages 렌더링 (Admin 레이아웃 + 3개 이상 기본 페이지)
    • 공용 UI 컴포넌트 (4개 이상 shared partials)
    • 보안: 백도어 제거, 무솔트 해시 마이그레이션, IP 잠금
    • 빌드 성공: 0 errors, 0 warnings
    • CLAUDE.md 업데이트 (UI 기준 + 인증 정책)
    • 모든 기준 충족됨 (2026-07-11)
  • 구현 완료:
    • Cookie 기반 인증 (AuthService + IpLockoutService)
    • Razor Pages CRUD 레이아웃 (_AdminLayout.cshtml, shared partials)
    • Admin 페이지: Dashboard, Collection, Users (기본 구조)
    • 공용 UI 컴포넌트: _ValidationSummary, _Pagination, _StatusBadge, _EmptyState
    • 보안 개선: BCrypt 해싱, IP 잠금, 하드코딩된 백도어 제거
    • 빌드: 0 errors, 0 warnings (Newtonsoft.Json 보안 경고 제외)
    • CLAUDE.md 완전 업데이트 (UI 기준, 인증, 상태 정의)
  • 구현 미완료 (향후 작업):
    • 🔄 Users 페이지: Create/Edit 폼 완성
    • 🔄 Collection 페이지: 스냅샷/에러 조회 상세화
    • 🔄 E2E 테스트: Playwright 스펙 업데이트

Phase 2: KIS Data Collection Pipeline 95% COMPLETE

  • KIS API Client: Full implementation complete
    • IKisApiClient interface (5 quotation methods)
    • KisApiClient with real HTTP implementation + token caching
    • All governance rules enforced (no trading APIs)
    • Windows env var + registry fallback for credentials
    • Build: 0 errors, 0 warnings
  • PostgreSQL Infrastructure: Complete
    • PostgresTokenCache (token management, 10-min skew)
    • CollectionRepository (full CRUD + dashboard aggregations)
    • Auto-creates kis_tokens, kis_collection_runs, kis_collection_snapshots, kis_collection_errors
    • Dapper ORM + parameterized SQL (injection-proof)
  • Web API Endpoints: Complete
    • CollectionEndpoints (6 endpoints: state, runs, snapshots, errors, latest, start)
    • ApiClient for Blazor consumption
  • Blazor UI: Complete
    • Collection.razor dashboard with real-time monitoring
    • Summary cards, recent errors table, runs history
    • Start/refresh functionality
    • FluentSkeleton loading states
  • 🔄 Pipeline Orchestration: Pending
    • Python kis_data_collection_v1.py → .NET (data fetching + validation)
    • Real KIS API data collection workflow integration
    • E2E test: API → DB → UI validation

Phase 3: Node.js→.NET CLI Tools 📋 PLANNED

  • Makefile created (npm → make mappings)
  • np operations documented

Phase 4: CI/CD Pipeline Hardening 80% COMPLETE (2026-07-11)

  • deploy-prod.yml (4-stage pipeline, 223 lines)
    • Build → Pre-Deployment Check → Deploy → Post-Deployment Reporting
    • SSH-based remote deployment (scp + ssh commands)
    • Comprehensive health checks (10-retry with 3s intervals)
    • Artifact management (.tar.gz)
  • Workflow consolidation (2 active files)
    • ci.yml: PR validation only (maintains 29 validators)
    • deploy-prod.yml: Production deployment
    • Deleted: merge-to-main.yml (non-functional), fast-validation.yml (redundant), archived/ directory
  • SSH credentials: SSH_KEY registered in Gitea Secrets
  • ⚠️ Gitea Actions limitation: Act runner ↔ Gitea network connectivity issues
    • Workflow trigger (on:push) works ✓
    • Job execution fails (network: dial tcp 172.18.0.2:3000 refused)
    • Workaround: Manual SSH-based deployment (see "Production Deployment" below)
  • 📚 Gitea API documentation: docs/GITEA_ACTIONS_API_GUIDE.md

Phase 5: Admin UI & Deployment Optimization COMPLETE (2026-07-11)

  • Admin UI redesign (Tabler framework)
    • Dashboard: stat cards, quick actions, system info
    • Responsive sidebar navigation
    • Professional layout (dark sidebar #2c3e50, white content)
  • Build output: 0 errors, 0 warnings
  • E2E tests: 8/8 passing (Playwright)
  • Production deployment: Active since 2026-07-11 21:00:55 KST
    • Commit: 30fb702
    • HTTP 200 health check
    • Service: active (running)

Status Summary:

  • Python codebase: Operational (1,140 files)
  • .NET 9 coverage: Core (), Infrastructure (), API (), Web UI ()
  • Database: PostgreSQL fully migrated
  • CI/CD: Manual SSH deployment (fully operational), Gitea Actions (limited by infrastructure)
  • Release gates: Python gates remain authority until Phase 2 integration testing complete

Note (2026-07-30): Phase 4/5 above still describe the deploy-prod.yml pipeline as it existed 2026-07-11. It has since evolved into the release-based two-workflow system (prepare-release.yml

  • deploy-prod.yml with 6-point health checks including DB auth). See DEPLOYMENT_RUNBOOK.md for the current procedure.