ee3e799de1
주요 변경: - tools/build_rebalance_engine_v1.py: REBALANCE_ENGINE_V1 신규 * account_snapshot 직접 합산(_build_snap_position_map) → 소수주 분리 행 병합 * 레짐 소스 macro.REGIME_PRELIM 최우선 (GAS 와 동일) - src/gas_adapter_parts/gdf_06_rebalance.gs: runRebalanceSheet_() 신규 * Logger.log / getSpreadsheet_() 로 run_all 연동 수정 - src/gas_adapter_parts/gdc_01_fetch_fundamentals.gs * _mergePositionRecord_(): 소수주 중복 행 합산 신규 * parseInt → parseFloat (qty, availQty) - src/gas_adapter_parts/gdf_01_price_metrics.gs * 미보유 종목 SELL_READY → WATCH_EXIT_SIGNAL - spec/41_release_dag.yaml: build_rebalance_sheet 노드 추가 (step_count 63) - spec/51_formula_lifecycle_registry.yaml: REBALANCE_ENGINE_V1 등록 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
41 lines
1.8 KiB
YAML
41 lines
1.8 KiB
YAML
formula_id: ROUTING_SERVING_DECISION_TRACE_V2
|
|
name: 라우팅 및 서빙 결정 추적 (Routing & Serving Decision Trace)
|
|
description: 라우팅부터 서빙, 결정, 수량/가격 산출까지 전체 파이프라인의 이력을 단일 Trace ID로 기록하여 LLM의 자유도를 0%로 통제합니다.
|
|
rules:
|
|
- id: TR001
|
|
condition: "trace_id IS NULL OR step_completed == FALSE"
|
|
action: "ABORT_PIPELINE"
|
|
reason: "라우팅 파이프라인 추적 누락 또는 비정상 종료"
|
|
- id: TR002
|
|
condition: "llm_override_detected == TRUE"
|
|
action: "INVALID_LLM_OVERRIDE"
|
|
reason: "LLM이 하네스 결정값을 임의로 번복 또는 재생성 시도"
|
|
output:
|
|
schema: routing_serving_trace_v3_json
|
|
fields:
|
|
- trace_id: STRING
|
|
- route: STRING
|
|
- prompt_entry: STRING
|
|
- gate_path: ARRAY of STRING
|
|
- final_block_reason: STRING OR NULL
|
|
- llm_serving_budget: NUMBER (Must be 0)
|
|
|
|
# ── 단계12: RELEASE_GATE_TRUTH (TASK-001 연동) ──────────────────────────────
|
|
routing_steps:
|
|
step_12:
|
|
id: 12
|
|
name: RELEASE_GATE_TRUTH
|
|
formula_id: RELEASE_GATE_TRUTH_V1
|
|
description: "honest_proof_score >= 70 이어야만 HTS 주문 생성 허용"
|
|
inputs:
|
|
- algorithm_guidance_proof_v1.json.honest_proof_score
|
|
- algorithm_guidance_proof_v1.json.honest_gate
|
|
- pass_100_criteria_v3.json.effective_release_gate
|
|
output_key: effective_release_gate
|
|
on_blocked: "이후 HTS 주문 생성 0건 — THEORETICAL_ONLY 렌더"
|
|
acceptance:
|
|
- "routing_execution_log 행수 == 12"
|
|
- "단계12 status가 effective_release_gate와 일치"
|
|
gs_coverage: "gas_apex_runtime_core.gs:buildRoutingExecutionLogV2_()"
|
|
python_tool: "tools/build_routing_execution_log_v1.py"
|
|
validator: "tools/validate_routing_trace_replay_v1.py" |