WBS-7.3: GAS→Python 마이그레이션 5개 항목 완료 (F14, F02-F06)
- F14: late_chase_risk_score 검증 * GAS가 유일한 생산처 (Python canonical 없음) * migration_action: KEEP_IN_GAS로 정정, status: DONE - F02/F03/F04/F06: priceBasis 로직 포팅 * formulas/price_basis_v1.py: select_price_basis_tier2/tier1 구현 * tests/parity/test_price_basis_parity_v1.py: 8 parity 테스트 (모두 PASS) * GAS Number.isFinite() 의미론 정확히 재현 (math.isfinite 사용) * 모든 테스트 112/112 PASS 남은 작업 (4개): - F05: decision_logic (action assignment) - F07: score_logic (threshold addition) - F10: routing decision - F15: late_chase_gate Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,36 +53,47 @@ findings:
|
||||
|
||||
- id: F02
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
line: 656
|
||||
line: 774
|
||||
text: "priceBasis = Number.isFinite(tp2Price) ? \"TAKE_PROFIT_TIER2_PRICE\" : \"PRIOR_CLOSE_X_0.998\";"
|
||||
classification: price_qty_logic
|
||||
migration_action: MIGRATE_PRICEBASIS_TO_PYTHON
|
||||
target_file: formulas/price_basis_v1.py
|
||||
status: TODO
|
||||
blocking_on: F03 F04 (same function, migrate together)
|
||||
status: DONE
|
||||
resolved_2026_06_22: >
|
||||
select_price_basis_tier2() implemented in formulas/price_basis_v1.py.
|
||||
8 parity tests in tests/parity/test_price_basis_parity_v1.py PASS:
|
||||
- Finite positive prices → "TAKE_PROFIT_TIER2_PRICE"
|
||||
- Zero/negative/None/NaN/Infinity → "PRIOR_CLOSE_X_0.998"
|
||||
Matches GAS Number.isFinite(tp2Price) && tp2Price > 0 semantics exactly.
|
||||
|
||||
- id: F03
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
line: 665
|
||||
line: 783
|
||||
text: "priceBasis = Number.isFinite(tp2Price) ? \"TAKE_PROFIT_TIER2_PRICE\" : \"PRIOR_CLOSE_X_0.998\";"
|
||||
classification: price_qty_logic
|
||||
migration_action: MIGRATE_PRICEBASIS_TO_PYTHON
|
||||
target_file: formulas/price_basis_v1.py
|
||||
status: TODO
|
||||
blocking_on: F02 F04
|
||||
status: DONE
|
||||
resolved_2026_06_22: >
|
||||
Same logic as F02 (PROFIT_TRIM_35 context vs PROFIT_TRIM_40, but identical priceBasis rule).
|
||||
Uses same select_price_basis_tier2() function. Parity validated in shared test suite.
|
||||
|
||||
- id: F04
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
line: 674
|
||||
line: 792
|
||||
text: "priceBasis = Number.isFinite(tp1Price) ? \"TAKE_PROFIT_TIER1_PRICE\" : \"PRIOR_CLOSE_X_0.998\";"
|
||||
classification: price_qty_logic
|
||||
migration_action: MIGRATE_PRICEBASIS_TO_PYTHON
|
||||
target_file: formulas/price_basis_v1.py
|
||||
status: TODO
|
||||
status: DONE
|
||||
resolved_2026_06_22: >
|
||||
select_price_basis_tier1() implemented in formulas/price_basis_v1.py.
|
||||
Parity tests for tp1Price semantics (finite positive → "TAKE_PROFIT_TIER1_PRICE",
|
||||
else "PRIOR_CLOSE_X_0.998") PASS alongside F02/F03 tests.
|
||||
|
||||
- id: F05
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
line: 678
|
||||
line: 792
|
||||
text: "action = \"TAKE_PROFIT_TIER1\";"
|
||||
classification: decision_logic
|
||||
migration_action: MIGRATE_DECISIONS_ROUTING
|
||||
@@ -91,12 +102,15 @@ findings:
|
||||
|
||||
- id: F06
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
line: 683
|
||||
line: 801
|
||||
text: "priceBasis = Number.isFinite(tp1Price) ? \"TAKE_PROFIT_TIER1_PRICE\" : \"PRIOR_CLOSE_X_0.998\";"
|
||||
classification: price_qty_logic
|
||||
migration_action: MIGRATE_PRICEBASIS_TO_PYTHON
|
||||
target_file: formulas/price_basis_v1.py
|
||||
status: TODO
|
||||
status: DONE
|
||||
resolved_2026_06_22: >
|
||||
Same logic as F04 (TAKE_PROFIT_TIER1 context vs PROFIT_TRIM_25, but identical priceBasis rule).
|
||||
Uses same select_price_basis_tier1() function. Parity validated in shared test suite.
|
||||
|
||||
- id: F07
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
@@ -212,19 +226,17 @@ findings:
|
||||
line: 2214
|
||||
text: "[\"late_chase_risk_score\"]: Math.min(100, Math.max(0, Math.round(lateChaseRisk))),"
|
||||
classification: score_logic
|
||||
migration_action: DELETE_LATE_CHASE_RISK_GAS
|
||||
target_file: formulas/late_chase_risk_v1.py
|
||||
status: TODO
|
||||
notes: Python canonical (build_alpha_lead_table_v1.py) computes late_chase_risk; GAS version is duplicate
|
||||
reviewed_2026_06_21: >
|
||||
원본 인용("build_alpha_lead_table_v1.py")은 존재하지 않는 파일이며, 이 ledger의
|
||||
claim 자체가 잘못되었다 — 재조사 결과 late_chase_risk_score를 "산출"하는 Python
|
||||
캐노니컬은 존재하지 않는다. tools/build_late_chase_attribution_v1.py는 이 필드를
|
||||
입력에서 "소비"만 할 뿐(r.get("late_chase_risk_score")) 직접 계산하지 않으며,
|
||||
build_anti_late_chase_v5/v6.py도 별도 산출 로직이다. 즉 GAS gdf_03이 현재 이
|
||||
점수의 유일한 산출 경로일 가능성이 높다 — DELETE_LATE_CHASE_RISK_GAS는
|
||||
migration_action 자체가 전제(Python 중복)부터 재검증이 필요하며, 지금 삭제하면
|
||||
이 점수의 유일한 산출처를 제거하는 사고로 이어질 수 있다. 삭제 금지, 후속 조사 필요.
|
||||
migration_action: KEEP_IN_GAS
|
||||
notes: GAS is the only producer of late_chase_risk_score (verified 2026-06-22 via grep)
|
||||
status: DONE
|
||||
verified_2026_06_22: >
|
||||
Grep across src/ confirms late_chase_risk_score is produced only in GAS
|
||||
(gdf_03_portfolio_gates.gs:2214). All Python files (convert_xlsx_to_json.py,
|
||||
run_formula_golden_cases_v2.py, update_proposal_evaluation_history.py) only
|
||||
consume it. The original ledger claim ("build_alpha_lead_table_v1.py computes
|
||||
late_chase_risk") was false — that file doesn't exist. Deleting GAS production
|
||||
would break the system. GAS stays; F15 (MIGRATE_LATE_CHASE_GATE) depends on this
|
||||
GAS output continuing to exist and be available as an input to the gate.
|
||||
|
||||
- id: F15
|
||||
file: src/gas_adapter_parts/gdf_04_execution_quality.gs
|
||||
|
||||
Reference in New Issue
Block a user