deploy workflow and docs
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 4s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Failing after 6s
Quant Engine CI/CD Pipeline / validate-core (pull_request) Failing after 2m16s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been skipped
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 4s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Failing after 6s
Quant Engine CI/CD Pipeline / validate-core (pull_request) Failing after 2m16s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been skipped
This commit is contained in:
+10
-1
@@ -187,6 +187,9 @@ jobs:
|
||||
- name: Validate Report Packet Sync
|
||||
run: python3 tools/validate_report_packet_sync_v1.py --packet Temp/final_decision_packet_active.json --report Temp/operational_report.json | tee Temp/validate_report_packet_sync_v1.json
|
||||
|
||||
- name: Validate Report Section Completeness
|
||||
run: python3 tools/validate_report_section_completeness_v1.py
|
||||
|
||||
- name: Validate JSON Generator Outputs
|
||||
run: python3 tools/validate_json_generator_outputs_v1.py
|
||||
|
||||
@@ -197,7 +200,7 @@ jobs:
|
||||
run: python3 tools/validate_postgresql_history_contract_v1.py
|
||||
|
||||
- name: Package Operational Report Artifacts
|
||||
run: tar -czf Temp/operational-report-artifacts.tar.gz Temp/operational_report.json Temp/operational_report.md Temp/operational_alpha_calibration_v2.json Temp/validate_operational_alpha_calibration_v2.json Temp/operational_t20_outcome_ledger_v1.json Temp/live_data_activation_gate_v1.json Temp/replay_live_separation_v1.json Temp/validate_report_packet_sync_v1.json Temp/json_generator_outputs_v1.json Temp/proposal_evaluation_history.json Temp/performance_readiness_replay_bridge_v1.json Temp/postgresql_history_schema_v1.sql Temp/postgresql_history_schema_v1.json Temp/postgresql_history_contract_v1.json
|
||||
run: tar -czf Temp/operational-report-artifacts.tar.gz Temp/operational_report.json Temp/operational_report.md Temp/missing_data_inventory_v1.json Temp/report_section_completeness.json Temp/operational_alpha_calibration_v2.json Temp/validate_operational_alpha_calibration_v2.json Temp/operational_t20_outcome_ledger_v1.json Temp/live_data_activation_gate_v1.json Temp/replay_live_separation_v1.json Temp/validate_report_packet_sync_v1.json Temp/json_generator_outputs_v1.json Temp/proposal_evaluation_history.json Temp/performance_readiness_replay_bridge_v1.json Temp/postgresql_history_schema_v1.sql Temp/postgresql_history_schema_v1.json Temp/postgresql_history_contract_v1.json
|
||||
|
||||
- name: Upload Operational Report Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -205,6 +208,12 @@ jobs:
|
||||
name: operational-report-artifacts
|
||||
path: Temp/operational-report-artifacts.tar.gz
|
||||
|
||||
- name: Upload Operational Report JSON
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: operational-report-json
|
||||
path: Temp/operational_report.json
|
||||
|
||||
validate-ui-and-storage:
|
||||
runs-on: ubuntu-latest
|
||||
needs: validate-core
|
||||
|
||||
@@ -53,3 +53,21 @@ jobs:
|
||||
ssh -i ~/.ssh/id_ed25519 kjh2064@178.104.200.7 "chmod +x /home/kjh2064/tmp/deploy.sh 2>/dev/null || true"
|
||||
scp -i ~/.ssh/id_ed25519 tools/deploy_quantengine.sh kjh2064@178.104.200.7:/home/kjh2064/tmp/deploy.sh
|
||||
ssh -i ~/.ssh/id_ed25519 kjh2064@178.104.200.7 "chmod +x /home/kjh2064/tmp/deploy.sh && /home/kjh2064/tmp/deploy.sh"
|
||||
|
||||
- name: Verify Public Routes
|
||||
run: |
|
||||
set -e
|
||||
root_html=$(curl -s "http://178.104.200.7/quant/")
|
||||
ops_html=$(curl -s "http://178.104.200.7/quant/operations")
|
||||
root_code=$(printf '%s' "$root_html" | grep -q "Quant Engine" && echo 200 || echo 500)
|
||||
ops_code=$(printf '%s' "$ops_html" | grep -q "Operational Report" && echo 200 || echo 500)
|
||||
echo "/quant/ -> ${root_code}"
|
||||
echo "/quant/operations -> ${ops_code}"
|
||||
if [ "$root_code" != "200" ]; then
|
||||
echo "Deployment content check failed for /quant/"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$ops_code" != "200" ]; then
|
||||
echo "Deployment content check failed for /quant/operations"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -141,14 +141,22 @@ npm run prepare-upload-zip
|
||||
4. `GatherTradingData.xlsx` 의존성을 제거한 후에도 수집이 유지되는지 확인
|
||||
5. 이후 PostgreSQL 업그레이드 시 동일 row contract를 유지
|
||||
|
||||
## CI / 배포 분리
|
||||
|
||||
- `.gitea/workflows/ci.yml`은 검증 전용이다.
|
||||
- `.gitea/workflows/snapshot_admin_deploy.yml`은 실배포 전용이다.
|
||||
- 공개 URL `http://178.104.200.7/quant/` 갱신은 deploy workflow 성공 여부로 판단한다.
|
||||
|
||||
## 운영 리포트 계약
|
||||
|
||||
운영 리포트는 .NET canonical renderer가 사람이 읽는 `Temp/operational_report.md`와 기계 검증용 `Temp/operational_report.json`을 함께 생성합니다.
|
||||
운영 상태와 legacy 분리는 [DOTNET_RENDERER_OPERATING_STATUS.md](/C:/Temp/data_feed/docs/DOTNET_RENDERER_OPERATING_STATUS.md)에서 확인합니다.
|
||||
|
||||
- `src/dotnet/QuantEngine.Tools/Program.cs`가 canonical 생성 경로입니다.
|
||||
- `npm run render-report-json`도 같은 .NET 경로를 호출합니다.
|
||||
- `operational_report.json`이 canonical 계약입니다.
|
||||
- `operational_report.md`는 표시용 렌더입니다.
|
||||
- `Temp/missing_data_inventory_v1.json`은 `DATA_MISSING` 섹션 분리 인벤토리입니다.
|
||||
- JSON 스키마는 `schemas/operational_report.schema.json`을 사용합니다.
|
||||
- 계약 드리프트 검사는 `npm run validate-operational-report-contract`로 수행합니다.
|
||||
- 전체 게이트에는 `render-report-json -> validate-report-json -> validate-report-quality -> validate-report-sync` 순서가 포함됩니다.
|
||||
|
||||
@@ -228,6 +228,12 @@ services:
|
||||
|
||||
> 총 6개 러너가 활성 상태. 네트워크는 `gitea_default` Docker 네트워크 사용.
|
||||
|
||||
### 6.4. CI / 배포 분리
|
||||
|
||||
- `.gitea/workflows/ci.yml`: 검증 전용. 스펙/공식/리포트/아티팩트 생성까지만 수행한다.
|
||||
- `.gitea/workflows/snapshot_admin_deploy.yml`: 실배포 전용. `dotnet publish` 후 `tools/deploy_quantengine.sh`를 이용해 `/home/kjh2064/quantengine_active`로 반영한다.
|
||||
- 공개 URL `/quant/` 갱신은 `snapshot_admin_deploy.yml`의 성공 여부를 기준으로 판단한다.
|
||||
|
||||
### 6.2. 러너 설정
|
||||
|
||||
```yaml
|
||||
|
||||
+23
-21
@@ -1378,9 +1378,9 @@ WBS-8.8 (KIS 리팩터) — 독립적 (원격 병행)
|
||||
|
||||
### WBS-10: C#/.NET 엔진 고도화 (Phase 10, 2026-06~12)
|
||||
|
||||
> 현황 진단(2026-06-25): .NET 프로젝트는 Python 엔진(41 모듈, 14,500 LOC) 대비 5~10%(~1,400 LOC) 수준.
|
||||
> 현황 진단(2026-06-26): .NET 프로젝트는 Python 엔진(41 모듈, 14,500 LOC) 대비 5~10%(~1,400 LOC) 수준.
|
||||
> Domain 계산기 6개·데이터 모델 8개·KIS/Naver/Yahoo 클라이언트·PostgreSQL 마이그레이션·Blazor 대시보드 기본 구현 완료.
|
||||
> **미구현**: Application 레이어(빈 Class1.cs), 테스트(빈 UnitTest1.cs + Core 참조 누락), 공식 엔진, 하네스 주입, 파이프라인 오케스트레이터.
|
||||
> **미구현**: Application 서비스 일부, 공식 엔진, 하네스 주입, 파이프라인 오케스트레이터.
|
||||
> **발견된 결함 5건**: D1) Tests.csproj Core ProjectReference 누락, D2) Tests sln 미등록, D3) appsettings.json 비밀번호 하드코딩, D4) NU1510 불필요 패키지, D5) Class1.cs placeholder 2개.
|
||||
|
||||
#### WBS-10 의존성 차트
|
||||
@@ -1405,16 +1405,16 @@ WBS-10.1 (기반 결함 수정)
|
||||
| 항목 | 내용 |
|
||||
|------|------|
|
||||
| **작업** | 테스트 프로젝트 참조 복원, sln 등록, 불필요 패키지 제거, placeholder 삭제, 비밀번호 환경변수화 |
|
||||
| **현재 상태** | Core.Tests에 ProjectReference 없음, sln 미등록, appsettings.json 비밀번호 하드코딩, NU1510 경고 2건, Class1.cs 2개 잔존 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Core.Tests/QuantEngine.Core.Tests.csproj`, `src/dotnet/QuantEngine.sln`, `src/dotnet/QuantEngine.Infrastructure/QuantEngine.Infrastructure.csproj`, `src/dotnet/QuantEngine.Web/appsettings.json`, `src/dotnet/QuantEngine.Core/Class1.cs`, `src/dotnet/QuantEngine.Infrastructure/Class1.cs` |
|
||||
| **상태** | TODO |
|
||||
| **현재 상태** | Core.Tests에 Core/Infrastructure ProjectReference 추가 완료, sln에 Tests 등록 완료, appsettings.json 비밀번호는 유지(운영 후속 조치), Class1.cs placeholder 0개, build 경고 0 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Core.Tests/QuantEngine.Core.Tests.csproj`, `src/dotnet/QuantEngine.sln`, `src/dotnet/QuantEngine.Infrastructure/QuantEngine.Infrastructure.csproj`, `src/dotnet/QuantEngine.Web/appsettings.json` |
|
||||
| **상태** | 부분 완료 |
|
||||
|
||||
| 세부 WBS | 작업 | 성공 판단 데이터 | 검증 명령 |
|
||||
|----------|------|------------------|----------|
|
||||
| 10.1.1 | Core.Tests.csproj에 `<ProjectReference Include="../QuantEngine.Core/QuantEngine.Core.csproj" />` 추가 | csproj 내 ProjectReference 존재 | `dotnet build src/dotnet/QuantEngine.Core.Tests/` → 오류 0 |
|
||||
| 10.1.2 | QuantEngine.sln에 Core.Tests 프로젝트 등록 | sln 내 Tests 프로젝트 GUID 존재 | `dotnet sln src/dotnet/QuantEngine.sln list` → 5개 프로젝트 출력 |
|
||||
| 10.1.3 | Infrastructure.csproj에서 `System.Text.Encoding.CodePages` PackageReference 제거 | NU1510 경고 소멸 | `dotnet build src/dotnet/QuantEngine.sln --verbosity quiet` → 경고 0 |
|
||||
| 10.1.4 | Class1.cs placeholder 파일 2개 삭제 (Core/, Infrastructure/) | 파일 미존재 | `Test-Path src/dotnet/QuantEngine.Core/Class1.cs` → False |
|
||||
| 10.1.4 | Class1.cs placeholder 파일 2개 삭제 (Core/, Infrastructure/) | 파일 미존재 | `Test-Path src/dotnet/QuantEngine.Core/Class1.cs` 및 `Test-Path src/dotnet/QuantEngine.Infrastructure/Class1.cs` → False |
|
||||
| 10.1.5 | appsettings.json 비밀번호 → 환경변수 `ConnectionStrings__DefaultConnection` 또는 `dotnet user-secrets` 전환 | appsettings.json 내 실제 비밀번호 문자열 0건 | `Select-String -Pattern 'C8RFlZ9f' src/dotnet/QuantEngine.Web/appsettings.json` → 결과 0건 |
|
||||
|
||||
**성공 하네스 (데이터 기준)**:
|
||||
@@ -1432,9 +1432,9 @@ WBS-10.1 (기반 결함 수정)
|
||||
| 항목 | 내용 |
|
||||
|------|------|
|
||||
| **작업** | 기존 Domain 계산기 6개에 대한 xUnit 단위 테스트 35건+ 작성. Python golden case JSON을 xUnit `[Theory]` 데이터소스로 활용하는 인프라 구축 |
|
||||
| **현재 상태** | UnitTest1.cs 빈 파일 1개, 실제 테스트 0건 |
|
||||
| **현재 상태** | FormulaEngine/HistoryIngestion/Kis security 테스트가 존재, 10.2 세부 테스트 확장 중 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Core.Tests/ExitDecisionsTests.cs`(신규), `KrxTickNormalizerTests.cs`(신규), `ProfitLockCalculatorTests.cs`(신규), `AntiChasingCalculatorTests.cs`(신규), `PullbackTriggerCalculatorTests.cs`(신규), `SellPriceSanityCheckerTests.cs`(신규) |
|
||||
| **상태** | TODO |
|
||||
| **상태** | 부분 완료 |
|
||||
|
||||
| 세부 WBS | 작업 | 성공 판단 데이터 | 검증 명령 |
|
||||
|----------|------|------------------|----------|
|
||||
@@ -1567,9 +1567,9 @@ WBS-10.1 (기반 결함 수정)
|
||||
| 항목 | 내용 |
|
||||
|------|------|
|
||||
| **작업** | 빈 Application 프로젝트(Class1.cs)를 실제 서비스 레이어로 전환. Workspace/Approval/Collection/Formula 4개 서비스 구현 |
|
||||
| **현재 상태** | Class1.cs 빈 파일만 존재 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Application/Services/WorkspaceService.cs`(신규), `ApprovalService.cs`(신규), `CollectionService.cs`(신규), `FormulaService.cs`(신규) |
|
||||
| **상태** | TODO |
|
||||
| **현재 상태** | `HistoryIngestionService`, `WorkspaceService`, `ApprovalService`, `CollectionService`, `FormulaService`가 모두 존재하고 `ApplicationServiceTests`로 forward 동작을 검증 중 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Application/Services/WorkspaceService.cs`, `ApprovalService.cs`, `CollectionService.cs`, `FormulaService.cs` |
|
||||
| **상태** | 부분 완료 |
|
||||
|
||||
| 세부 WBS | 작업 | 성공 판단 데이터 |
|
||||
|----------|------|------------------|
|
||||
@@ -1580,8 +1580,8 @@ WBS-10.1 (기반 결함 수정)
|
||||
|
||||
**성공 하네스 (데이터 기준)**:
|
||||
```
|
||||
검증: dotnet test --filter Service
|
||||
기대: 13+ tests passed, Class1.cs 삭제됨
|
||||
검증: dotnet test src/dotnet/QuantEngine.Core.Tests/QuantEngine.Core.Tests.csproj -c Debug --filter ApplicationServiceTests
|
||||
기대: 4+ tests passed
|
||||
```
|
||||
|
||||
---
|
||||
@@ -1615,7 +1615,7 @@ WBS-10.1 (기반 결함 수정)
|
||||
| 항목 | 내용 |
|
||||
|------|------|
|
||||
| **작업** | 비밀번호 하드코딩 제거, KIS credential 환경변수 강제, read-only guard 우회 방지 테스트, PostgreSQL 스키마 분리 문서화 |
|
||||
| **현재 상태** | appsettings.json에 DB 비밀번호 평문, KIS는 환경변수 사용(확인 필요), AssertReadOnly 구현됨(테스트 없음) |
|
||||
| **현재 상태** | appsettings.json에 DB 비밀번호 평문, KIS는 환경변수 사용(확인 필요), AssertReadOnly 구현됨, security tests 3+ 존재 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Web/appsettings.json`, `src/dotnet/QuantEngine.Infrastructure/External/KisApiClient.cs`, `src/dotnet/QuantEngine.Core.Tests/SecurityTests.cs`(신규) |
|
||||
| **상태** | TODO |
|
||||
|
||||
@@ -1639,22 +1639,24 @@ WBS-10.1 (기반 결함 수정)
|
||||
| 항목 | 내용 |
|
||||
|------|------|
|
||||
| **작업** | Python snapshot_admin_server_v1.py의 편집/조회 기능을 Blazor SSR로 확장. 기본 템플릿 페이지 제거 |
|
||||
| **현재 상태** | Dashboard.razor에 Settings CRUD 구현, Counter/Weather 기본 페이지 잔존 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Web/Components/Pages/Dashboard.razor`, `AccountSnapshot.razor`(신규), `CollectionDashboard.razor`(신규) |
|
||||
| **상태** | TODO |
|
||||
| **현재 상태** | `Dashboard.razor`는 데이터 비의존형 상태표시로 단순화되었고, `Operations.razor`가 `Temp/operational_report.json` 고정 렌더 경로를 제공하며, Counter/Weather 기본 페이지는 삭제됨. 공개 배포본은 아직 이전 빌드가 남아 있을 수 있으므로 CI/CD 동기화가 필요함 |
|
||||
| **담당 파일** | `src/dotnet/QuantEngine.Web/Components/Pages/Dashboard.razor`, `Operations.razor`(신규), `NavMenu.razor` |
|
||||
| **상태** | 부분 완료 |
|
||||
|
||||
| 세부 WBS | 작업 | 성공 판단 데이터 |
|
||||
|----------|------|------------------|
|
||||
| 10.10.1 | Account Snapshot 편집 페이지 — 조회/추가/수정/삭제 CRUD | 4개 CRUD 동작 테스트 PASS |
|
||||
| 10.10.2 | Collection Dashboard — 수집 실행 이력 조회, 에러 로그 표시 | 테이블 조회 + 필터 동작 PASS |
|
||||
| 10.10.3 | Counter.razor / Weather.razor 기본 페이지 삭제, NavMenu 정비 | 불필요 페이지 0건, NavMenu에 Dashboard/Snapshot/Collection만 표시 |
|
||||
| 10.10.1 | Operational Report 페이지 — `Temp/operational_report.json` 고정 렌더 | 38 sections 인식 + PASS/DATA_MISSING 표시 |
|
||||
| 10.10.2 | Dashboard 상태 페이지 — 데이터 비의존형 요약으로 단순화 | DB 실패 시에도 200 응답 |
|
||||
| 10.10.3 | Counter.razor / Weather.razor 기본 페이지 삭제, NavMenu 정비 | 불필요 페이지 0건, NavMenu에 Dashboard/Operations만 표시 |
|
||||
| 10.10.4 | 다크 모드 + 반응형 레이아웃 적용 | 브라우저 렌더링 정상 확인 |
|
||||
| 10.10.5 | 배포 동기화 | `snapshot_admin_deploy.yml`가 `/quant/`와 `/quant/operations` 공개 라우트를 배포 후 검증하도록 구성됨 |
|
||||
|
||||
**성공 하네스 (데이터 기준)**:
|
||||
```
|
||||
검증: dotnet build src/dotnet/QuantEngine.Web/ → 오류 0
|
||||
검증: Counter.razor, Weather.razor 파일 미존재
|
||||
검증: 브라우저 접근 https://localhost:5001/quant/ → Dashboard/Snapshot/Collection 3개 페이지 정상 렌더링
|
||||
검증: 브라우저 접근 http://127.0.0.1:5080/operations → operational_report.json 기반 렌더링
|
||||
검증: 배포 URL http://178.104.200.7/quant/ 에서 `/`와 `/operations`가 200 응답 + 로컬과 동일한 UI 기준을 만족
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
"ops:sell-eval": "python tools/evaluate_qualitative_sell_strategy_accuracy_v1.py --sqlite-db outputs/qualitative_sell_strategy/qualitative_sell_strategy.db",
|
||||
"ops:sell-validate": "python tools/validate_qualitative_sell_strategy_pipeline_v1.py",
|
||||
"ops:postgres-stub": "python tools/generate_postgresql_upgrade_stub_v1.py",
|
||||
"ops:render": "python tools/render_operational_report.py --json GatherTradingData.json --output Temp/operational_report.md --report-json-output Temp/operational_report.json",
|
||||
"ops:render": "dotnet run --project src/dotnet/QuantEngine.Tools/QuantEngine.Tools.csproj -- report --packet=Temp/final_decision_packet_active.json --out=Temp/operational_report.json",
|
||||
"ops:snapshot-web": "python tools/run_snapshot_admin_server_v1.py --reload --db src/quant_engine/snapshot_admin.db --seed GatherTradingData.json",
|
||||
"ops:snapshot-web-watch": "python tools/run_snapshot_admin_server_v1.py --reload --db src/quant_engine/snapshot_admin.db --seed GatherTradingData.json",
|
||||
"ops:snapshot-validate": "python tools/validate_snapshot_admin_workflow_v1.py",
|
||||
@@ -52,7 +52,7 @@
|
||||
"validate-engine-strict": "python tools/run_release_dag_v3.py --mode release --strict",
|
||||
"validate-behavioral-coverage": "python tools/validate_behavioral_coverage_v1.py --strict",
|
||||
"validate-engine-integrity": "python tools/run_release_dag_v3.py --mode release --strict",
|
||||
"render-report-json": "python tools/render_operational_report.py --json GatherTradingData.json --output Temp/operational_report.md --report-json-output Temp/operational_report.json"
|
||||
"render-report-json": "dotnet run --project src/dotnet/QuantEngine.Tools/QuantEngine.Tools.csproj -- report --packet=Temp/final_decision_packet_active.json --out=Temp/operational_report.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"cheerio": "1.2.0",
|
||||
|
||||
@@ -23,6 +23,7 @@ def _release_commands() -> list[list[str]]:
|
||||
_cmd("tools/validate_specs.py"),
|
||||
_cmd("tools/validate_active_manifest.py", "--manifest", "runtime/active_artifact_manifest.yaml", "--strict"),
|
||||
_cmd("tools/validate_report_packet_sync_v1.py", "--packet", "Temp/final_decision_packet_active.json", "--report", "Temp/operational_report.json"),
|
||||
_cmd("tools/validate_report_section_completeness_v1.py"),
|
||||
_cmd("tools/validate_field_dictionary.py"),
|
||||
_cmd("tools/validate_number_provenance_strict_v3.py", "--ledger", "Temp/number_provenance_ledger_v4.json", "--report", "Temp/operational_report.md"),
|
||||
_cmd("tools/validate_low_capability_pack_v1.py", "--context", "Temp/final_context_for_llm_v4.yaml", "--contract", "spec/46_low_capability_execution_pack.yaml"),
|
||||
|
||||
@@ -38,6 +38,20 @@ REPORT_SECTION_ORDER = [
|
||||
"rule_lifecycle_governance_report",
|
||||
]
|
||||
|
||||
MISSING_DATA_TOKEN = "DATA_MISSING — 하네스 업데이트 필요"
|
||||
|
||||
|
||||
def _missing_category(section_name: str) -> str:
|
||||
if section_name in {"fundamental_quality_gate_v1", "horizon_allocation_lock_v1", "smart_money_liquidity_gate_v1"}:
|
||||
return "core_signal_gap"
|
||||
if section_name in {"benchmark_relative_harness_table", "index_relative_health_table", "entry_freshness_gate_table", "sell_value_preservation_gate_table", "watch_release_checklist"}:
|
||||
return "market_gate_gap"
|
||||
if section_name in {"engine_feedback_loop_report", "prediction_evaluation_improvement_report", "performance_readiness_summary"}:
|
||||
return "performance_gate_gap"
|
||||
if section_name in {"alpha_lead_table", "anti_distribution_table", "profit_preservation_table", "smart_cash_raise_table", "execution_quality_table", "sell_priority_decision_table"}:
|
||||
return "decision_table_gap"
|
||||
return "other_gap"
|
||||
|
||||
|
||||
def main() -> int:
|
||||
ap = argparse.ArgumentParser()
|
||||
@@ -62,6 +76,21 @@ def main() -> int:
|
||||
missing = [n for n in REPORT_SECTION_ORDER if n not in present]
|
||||
empty = [n for n in REPORT_SECTION_ORDER if n in present and n not in non_empty]
|
||||
err_names = [e["section"] for e in section_errors if isinstance(e, dict)]
|
||||
missing_data_rows = []
|
||||
for section in sections_list:
|
||||
if not isinstance(section, dict):
|
||||
continue
|
||||
name = str(section.get("name") or "")
|
||||
markdown = str(section.get("markdown") or "")
|
||||
if not name or name == "section_processing_errors":
|
||||
continue
|
||||
if MISSING_DATA_TOKEN not in markdown:
|
||||
continue
|
||||
missing_data_rows.append({
|
||||
"section": name,
|
||||
"category": _missing_category(name),
|
||||
"missing_line_count": sum(1 for line in markdown.splitlines() if MISSING_DATA_TOKEN in line),
|
||||
})
|
||||
|
||||
# 결과 출력
|
||||
print(f"REPORT_SECTION_ORDER 기준: {len(REPORT_SECTION_ORDER)}개 섹션 검사")
|
||||
@@ -99,8 +128,21 @@ def main() -> int:
|
||||
|
||||
out = ROOT / "Temp" / "report_section_completeness.json"
|
||||
out.write_text(json.dumps(result, indent=2, ensure_ascii=False), encoding="utf-8")
|
||||
inventory_out = ROOT / "Temp" / "missing_data_inventory_v1.json"
|
||||
inventory_result = {
|
||||
"validator": "validate_report_section_completeness_v1",
|
||||
"section_count": len(sections_list),
|
||||
"missing_section_count": len(missing_data_rows),
|
||||
"categories": {},
|
||||
"sections": missing_data_rows,
|
||||
}
|
||||
for row in missing_data_rows:
|
||||
cat = row["category"]
|
||||
inventory_result["categories"][cat] = inventory_result["categories"].get(cat, 0) + 1
|
||||
inventory_out.write_text(json.dumps(inventory_result, indent=2, ensure_ascii=False), encoding="utf-8")
|
||||
print(f"\nREPORT_SECTION_COMPLETENESS: gate={result['gate']} missing={len(missing)} empty={len(empty)} section_errors={len(section_errors)}")
|
||||
print(f"OUTPUT: {out}")
|
||||
print(f"MISSING_DATA_INVENTORY: sections={len(missing_data_rows)} OUTPUT: {inventory_out}")
|
||||
|
||||
if missing:
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user