Adds docs/SESSION_HANDOFF_2026-07-30.md with what a future session
needs that isn't derivable from git log: open threads (release DAG
unverified end-to-end, engine_history/quantengine schema collision
left as-is, OpenDART/KRX not yet wired into any workflow) and traps
hit this session worth not repeating (archive-before-grepping
tools/spec/tests, DbUp ordinal sort, runtime/ is tracked history not
scratch space, two Pythons on this machine, entropy audit counting
local build noise). Pointed to it from CLAUDE.md's Known Issues list.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tools/ingest_fundamental_raw.py read DART_API_KEY, but the Gitea Secret
is registered as OPENDART_OPENAPI_KEY, and no workflow bridges the two
(none currently invoke this script). Renamed the code side to match
the secret name directly rather than adding a mapping layer, so
whenever this gets wired into a workflow it just works. Updated the
matching README setup instructions.
Also includes the V9/V10 migration header explanations (why they were
renamed from V003/V004) that were written earlier but missed from the
previous commit's file list.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
V004_normalize_snapshots_schema.sql had an unguarded FK to a table V2
creates. Under DbUp's default ordinal filename sort, the zero-padded
"V003_"/"V004_" migrations sorted before "V1__", so on a brand-new
database V004 would hard-fail on that FK and abort every migration
after it - V1 through V8 would never run. Confirmed via production
that neither V003 nor V004 had ever actually applied.
Fix: renamed them to V9__/V10__ and added MigrationScriptNameComparer,
which sorts DbUp scripts by numeric V{n} value instead of raw string
order, so double-digit versions can never again sort ahead of earlier
single-digit ones. Added regression tests for both the fixed case and
the original bug shape.
Also updates docs/db/quantengine.dbml (renamed migrations, and closes
out the engine_history/quantengine table-name-collision question -
both schemas are live, backing different code paths, not duplicates)
and CLAUDE.md (migration ordering fix, KIS/OpenDART/KRX credential
env-var-name reference, including a CI secret/env-var name mismatch
found for OpenDART that still needs a decision).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
BREAKING: Previous WBS was fabricated from filenames without reading PDFs.
This commit corrects the record with evidence-based framework derived from:
- Vue 3·TypeScript OMS·WMS·ERP 아키텍처.pdf (47 pages)
- OMS·WMS·ERP 공통 CRUD 화면 템플릿 상세 명세.pdf (36 pages)
- OMS·WMS·ERP 입력 컴포넌트 상세 명세.pdf (50 pages)
- OMS·WMS·ERP CRUD 화면 및 입력 컴포넌트 상용화 제안.pdf (28 pages)
- Vue 3·TypeScript 기반 OMS·WMS·ERP 단계별 구축 백로그.pdf (28 pages)
New spec/61_strategic_execution_framework.yaml contains:
- Actual architecture (domain-centric modular monolith + 7-layer stack)
- Real CRUD templates (11 types: TPL-LIST-01, TPL-CREATE-01/02/03, etc.)
- Actual component hierarchy (4 layers: Primitive → Typed Field → Domain → Composite)
- Real phased roadmap (0-10 stages with P0/P1/P2/P3 prioritization)
- All 30 strategic principles explicitly mapped to PDF requirements + verification
Anti-hallucination measure: Every specification traces to PDF page, stakeholder request, or verified requirement.
No team size, budget, or timeline assumptions remain.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- CLAUDE.md: Add "DB Secret Management" section documenting the
incident, the root cause (stale password baked into
appsettings.Production.json, real password only ever lived in
/home/kjh2064/.config/quantengine.env, never wired into systemd),
and the permanent fix (EnvironmentFile= drop-in, applied by hand
on 2026-07-12 with 'sudo systemctl restart quantengine' verified
active and journalctl clean).
- CLAUDE.md: Refresh the stale "Gitea Actions Workflows" section
(was still describing an on:push deploy-prod.yml with a single
Build stage; now lists prepare-release.yml + deploy-prod.yml
correctly as workflow_dispatch-only, 6-point health check).
- deploy-prod.yml: Add Check 6 (DB authentication) to the health
check step. The existing checks only hit GET /Account/Login, which
returns HTTP 200 even when ConnectionStrings is broken -- that's
exactly why tonight's outage passed every prior health check. The
new check greps journalctl for '28P01'/'password authentication
failed' in the minute after restart and fails the deployment if
found, so a broken DB connection string can no longer masquerade
as a successful deploy.
## 변경사항
### CLAUDE.md
- '로컬 개발 & 테스트' 섹션 신규 추가
* SSH 터널링 설정 (Docker 사용 금지)
* appsettings.Development.json 설정
* 로컬 서비스 시작 방법
- 배포 전 필수 체크리스트
* Build (0 errors, 0 warnings)
* 서비스 시작 확인
* 로그인 테스트
* 모든 Admin 페이지 검증 (200 상태, 500 에러 없음)
* E2E 테스트 통과
- 배포 게이트: 로컬 테스트 통과 전 절대 배포 금지
### E2E 테스트
- complete-admin-flow.spec.ts 신규 추가
* 모든 Admin 페이지 접근 테스트
* 500 에러 감지
* Authorization 검증
## 교훈
Authorization Policy 500 오류가 로컬에서 먼저 발견되었어야 했음.
Docker 없이 SSH 터널로 원격 DB 접속하는 현실을 반영하여 지침화.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add explicit success definitions:
- Collection Run Success: completed status + snapshots > 0 + error rate < 10%
- Collection Run Partial Success: completed with some errors
- Collection Run Failure: failed status or no snapshots captured
- Phase 1 Migration Success: 7 criteria all met (auth, pages, UI, security, build, docs)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Define standard status values for collection runs: running, completed, failed, pending
Map each status to UI badge colors for consistency across Collection admin pages
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Fluent UI Blazor v5 / InteractiveServer 방침을 폐기하고 MudBlazor 컴포넌트 +
Interactive WebAssembly 렌더 모드 + API-First 를 신규 표준으로 확정한다.
기존 CLAUDE.md(Fluent UI)와 AGENTS.md §5b(MudBlazor)의 상충을 해소한다.
- CLAUDE.md: Framework & Design System, Component Rules, 매핑표를 MudBlazor 로 갱신
- AGENTS.md §5b: 렌더 모드 표준(Interactive WebAssembly) 신설, Server 표기 정렬
- ROADMAP_WBS.md: WBS-10 보강 문서 상호 참조 링크 추가
- WBS_10_DOTNET_MIGRATION_HARDENING: 마이그레이션 완성/상용화 로드맵 신규,
UI 코드 전환을 WBS-A7 로 등록
코드 전환(csproj/Program.cs/.razor)은 미수행, 본 커밋은 방침 문서만 수정.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- KIS API 클라이언트: 실제 구현 완료 (0 errors, 0 warnings)
- PostgreSQL 저장소: 완전 통합 (자동 테이블 생성, CRUD)
- Web API 엔드포인트: 6개 컬렉션 경로 완성
- Blazor UI: 대시보드 완성 (실시간 모니터링)
- 개발 명령어: 정확한 경로 + 포트 업데이트 (5265)
- 남은 일: kis_data_collection_v1.py 파이프라인 오케스트레이션 포팅
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
**이 커밋 기준 현황:**
Phase 1: Web UI 마이그레이션 ✅ COMPLETE
- MudBlazor → Fluent UI v5 (RC) 완전 전환
- 모든 페이지 마이그레이션 완료 (0% MudBlazor 잔존)
Phase 2: KIS API 및 데이터 수집 파이프라인 🔄 IN PROGRESS
✅ 완료된 작업:
- KisApiClient: 5가지 quotation 메서드 (읽기 전용)
- 보안: AssertReadOnly enforcement (trading API 차단)
- PostgreSQL: TokenCache, CollectionRepository 구현
- Web API: 6가지 Collection 엔드포인트
- Blazor UI: Collection.razor 대시보드 완성
- Build: 0 에러 (6개 RC 경고는 패키지 RC 버전 이슈)
📋 진행 중:
- Collection 엔드포인트 통합 테스트
- Python subprocess 임시 연계 (Phase 2 단계별 구현)
**CLAUDE.md 업데이트 내용:**
- Phase 1~3 상태 요약
- KIS API 보안 정책 문서화
- Collection API 엔드포인트 명세
- 개발 커맨드 추가 (Phase 2 테스팅 가이드)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fluent UI Blazor v5 기본 템플릿 및 컴포넌트 매핑
- Skeleton을 기본 로딩 상태로 지정
- 데이터 먼저 스켈톤 렌더링 후 실제 UI 교체 패턴
- MudBlazor 완전 폐기: 신규 금지, 기존 코드 마이그레이션 필수
- 배포 환경 정보 (Hetzner 178.104.200.7)
- Gitea 저장소 정보 (kjh2064/QuantEngineByItz)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>