kjh2064 2ccf74c410 fix: Release build breakage + Dapper mapping bugs in VS-03/VS-04/Phase3-K
- KArtSell.Host.csproj: FrontendFiles glob was evaluated at project-load
  time, before pnpm build ran, so it copied stale/missing Vite-hashed
  filenames every Release build. Move the glob inside the target, after
  the build Exec.
- ApprovalSql/AuditSql/TradeSql: fix live-DB integration failures never
  caught by unit tests: DateOnly and inet columns can't be bound/read
  directly through Dapper without conversion; kis_response (jsonb) read
  as JsonElement threw InvalidCastException; GdprRetention.RetentionEndsAt
  was typed DateTime against a DATE column.
- TradeSql: UpdateTradeStatusAsync only ever persisted status/kis_response
  /error_message, silently dropping kis_order_id, executed_quantity,
  unit_price, total_amount, commission, net_proceeds and the execution/
  settlement timestamps on every call. Changed it to take the Trade
  aggregate so the full state transition persists.
- TradeSql: add a static ctor setting Dapper.DefaultTypeMap.
  MatchNamesWithUnderscores = true. The repo's [ModuleInitializer] in
  KArtSell.BuildingBlocks only fires once that assembly is actually
  loaded; TradeSql/Trade never reference a BuildingBlocks type, so under
  test isolation (or any host that queries a trade before touching
  BuildingBlocks) every snake_case column silently mapped to null/default.
- Test fixes: seed the FK prerequisites (model_operations.models,
  sell_decisions) that ApprovalWorkflowTests/TradeExecutionTests were
  missing, correct a SellPriorityRanker test input to match the approved
  VS-10-SLICE_SPEC age-boost threshold, and fix a GDPR redaction
  assertion that called ToString() on a Dictionary instead of inspecting
  its values.

12 DbUpMigrationTests failures remain and are unrelated to this fix: the
kartsell DB user isn't the owner of kartsell_migration_test, so DbUp's
fresh-database rehearsal can't DROP/CREATE it. Needs a DBA grant.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-07 23:21:04 +09:00

K-ArtSell Aegis v16.0

Reference implementation closure for governed advisory research. RESEARCH_CANDIDATE_NOT_PRODUCTION; automatic order/KIS/model activation OFF.

상태: IMPLEMENTATION_TEMPLATE / STATIC_VALIDATED / BUILD_DB_E2E_SHADOW_REHEARSAL_REQUIRED
운영 경계: RESEARCH_CANDIDATE_NOT_PRODUCTION · 투자자문형 우선 · 자동주문/KIS 제출 OFF · 자동 모델승격 OFF


📖 개발자를 위한 문서 가이드

→ 여기서 시작:

문서 색인: docs/INDEX.md

기술부채 추적: TECH_DEBT_REGISTER.md — Impact/Effort 매트릭스, 분기별 회수 목표


v16.0은 v10.0의 Baseline Preservation + Delta + Supersession + Traceability, RG-0108, PIT·불변 Evidence·26 Vertical Slice 기준과 v12.1v14.0 실행 패키지를 삭제하지 않고 보존한 누적 Delta다. 화면 수나 코드량을 생산준비도로 간주하지 않으며, Source/License → PIT/Revision/DQ → Evidence/Version Set → Sell/Reentry → Recommendation → Maker-Checker → Publish → Outcome → Reconciliation/DR의 완결성으로 판단한다.

v16.0 핵심 Delta

FE 표준화·교체 가능성

  • UI Adapter Contract v3.0과 14개 Capability를 제공한다.
  • 업무 Feature에서 PrimeVue/AG Grid 직접 import를 금지하고 shared/ui/adapter 경계 안에서만 허용한다.
  • Ks* Wrapper, CrudWorkspaceLayout, OperationsConsoleLayout, 표준 CRUD List/Form Page, URL Query Codec, 공통 13상태 Matrix를 제공한다.
  • Adapter 교체는 contract conformance, keyboard/focus/a11y, T01~T10 회귀, visual regression, bundle·license 검사와 release approval을 통과해야 한다.

BE·데이터·스케줄러 실행완결성

  • Endpoint → Application → Domain Policy → Dapper/Npgsql → Outbox/Inbox를 한 Vertical Slice로 완결한다.
  • 스케줄 실행은 scheduledFor anchor, catch-up 정책, BusinessHold, dispatch revision, correlation, version set을 보존한다.
  • 평가창은 달력 일이 아니라 MarketCalendar의 1/5/20/63/126/252 거래세션으로 성숙도를 판정한다.
  • prediction_evaluation_window, metric_cohort_definition, ui_contract_release와 append-only 보호를 Migration 0020에 추가했다.
  • J39 FeedbackCycleIntegrityAudit와 J40 EvaluationWindowIntegrityAudit는 기본 disabled다.

알고리즘·지속 모델운영

  • 매도 우선순위는 HARD_IMPAIRMENT → PORTFOLIO_SURVIVAL → DYNAMIC_PROFIT_FLOOR → CONCENTRATION/LIQUIDITY → OPPORTUNITY_COST → REENTRY_OPTION으로 고정한다.
  • 비가치훼손 매도는 ReentryWatch, 새 CycleId/Lot, 단계간격·만료·중복방지를 동반한다.
  • 모델 루프는 Freeze → Mature → Score → Diagnose → Hypothesis → Challenger → Validate → Review → Manual Activation으로 제한한다.
  • 자동 재학습·자동 승격·자동 주문을 하지 않으며 모든 활성화는 ModelCard, OOS/PBO/DSR, maker-checker, effective_at, rollback evidence를 요구한다.

실행 자료 규모

  • 상세 WBS: 576건(기존 480 + v15 Delta 96)
  • 기술부채: 124건
  • Decision Log: 80건
  • Traceability Matrix: 101건
  • FE Component Catalogue: 43건
  • Job Catalogue: 26건

먼저 읽을 문서

  1. docs/v15_0/K-ArtSell_Aegis_v15_0_실행완결성_표준UI_지속모델운영_통합고도화_제안서.docx
  2. docs/v15_0/00_EXECUTIVE_CRITICAL_PROPOSAL.md
  3. docs/v15_0/01_ROLE_BASED_BRUTAL_AUDIT.md
  4. docs/v15_0/02_FRONTEND_STANDARD_AND_ADAPTER_V3.md
  5. docs/v15_0/03_SCHEDULER_AND_CONTINUOUS_FEEDBACK.md
  6. docs/v15_0/08_DETAILED_WBS_MASTER.csv
  7. docs/v15_0/TECH_DEBT_REGISTER.csv

주요 구현 경로

  • FE Adapter/Wrapper: frontend/src/shared/ui/adapter/, frontend/src/shared/ui/components/
  • 표준 CRUD/Layout: frontend/src/shared/crud/, frontend/src/shared/ui/layouts/
  • UI 계약: contracts/ui/ui-adapter.v3.json, crud-page.v1.json, layout-regions.v1.json
  • 스케줄 계약: contracts/schedules/model-operations.v3.json
  • 모델운영 도메인: src/KArtSell.Modules.ModelOperations/Domain/
  • DB Delta: db/migrations/0020_v15_execution_and_ui_contract_hardening.sql
  • 화면/Slice 생성기: tools/scaffold_ui_screen.py, tools/scaffold_vertical_slice.py
  • 원본 첨부: attachments/current_session/, attachments/source_archives/

현재 검증 진실성

확인 완료:

  • v15 정적 패키지 검증: PASS=1 / WARN=2 / FAIL=0
  • Python 정책 Golden: 4 tests PASS
  • Scaffold 검증: 3 tests PASS
  • DOCX: 18페이지 전부 렌더·육안 확인, 접근성 감사 high=0 / medium=0 / low=0

아직 통과로 주장하지 않는 Gate:

  • .NET 10 restore/build/test
  • pnpm frozen install/typecheck/Vitest/build/Playwright
  • PostgreSQL DbUp fresh/upgrade/re-run/failure-recovery
  • Outbox/Inbox crash/replay, DR·대사 리허설
  • 최소 252거래일 Shadow, 복수 국면 OOS, PBO/DSR

위 Gate가 충족되기 전에는 생산 배포, 투자일임형, 자동주문 또는 자동 모델승격으로 해석하지 않는다.

S
Description
KArtSell.Aegis
Readme 130 MiB
Languages
JavaScript 76.1%
C# 11.9%
Vue 4.7%
TypeScript 2.5%
PowerShell 2.1%
Other 2.7%