feat(gas-thin-adapter): Phase 3 thin_adapter — 23개 forbidden 함수에 THIN_ADAPTER 위임 주석 삽입
GAS_THIN_ADAPTER_POLICY_V1 Phase 3 (thin_adapter) 진행: - tools/gas_thin_adapter_phase3_annotate.py: 23개 GAS forbidden 함수에 THIN_ADAPTER 주석 자동 삽입 스크립트 - src/gas_adapter_parts 7개 파일: 각 forbidden 함수 본문 첫 줄에 // THIN_ADAPTER: [<responsibility>] delegated to Python — <module>:<function> 주석 추가 (기능 코드 무변경, additive-only) - spec/39: thin_adapter phase IN_PROGRESS + thin_adapter_result 블록 추가 ⚠ GAS 파일 변경됨 — GAS deploy + 사용자 검증 필요 (runDataFeed 실행) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
function calcProfitPreservationRow_(h, df, priceRow, distributionRow) {
|
||||
// THIN_ADAPTER: [stop_loss] delegated to Python — src/quant_engine/inject_computed_harness.py:trailing_stop_v2
|
||||
var close = df.close || h.close || 0;
|
||||
var avgCost = h.avgCost || 0;
|
||||
var profitPct = close > 0 && avgCost > 0 ? (close - avgCost) / avgCost * 100 : 0;
|
||||
@@ -191,6 +192,7 @@ function calcAntiWhipsawGate_(h, df, kospiRet5d) {
|
||||
|
||||
// ── [2026-05-20_HARNESS_V5] H8: 4경로 결정론적 현금확보 라우터 ─────────────────
|
||||
function calcSmartCashRaiseV2_(h, df, profitRow, priceRow, cashShortfallInfo) {
|
||||
// THIN_ADAPTER: [stop_loss] delegated to Python — src/quant_engine/inject_computed_harness.py:cash_recovery
|
||||
var posClass = String(h.positionClass || df.positionClass || '').toUpperCase();
|
||||
var rsi14 = typeof df.rsi14 === 'number' ? df.rsi14 : 50;
|
||||
var profitStage = priceRow && priceRow.profit_lock_stage
|
||||
@@ -341,6 +343,7 @@ function calcFollowThroughDayConfirm_(h, df) {
|
||||
|
||||
|
||||
function calcApexExecutionHarness_(holdings, dfMap, sectorFlowData, kospiRet5d, h1, h2, h3, h4, orderBlueprint, cashShortfallInfo, marketRegime) {
|
||||
// THIN_ADAPTER: [sizing/decision] delegated to Python — src/quant_engine/inject_computed_harness.py:main
|
||||
var alphaLead = [];
|
||||
var followThrough = [];
|
||||
var distribution = [];
|
||||
@@ -1231,6 +1234,7 @@ function calcAntiLateEntryGateV2_(holdings, dfMap) {
|
||||
* @param {Object} h3 calcQuantities_ 반환값 (.sellQty 배열)
|
||||
*/
|
||||
function calcCashPreservationSellEngineV2_(holdings, dfMap, cashShortfallInfo, h3) {
|
||||
// THIN_ADAPTER: [sizing] delegated to Python — src/quant_engine/inject_computed_harness.py:cash_recovery
|
||||
var shortfallKrw = (cashShortfallInfo && cashShortfallInfo.cash_shortfall_min_krw) || 0;
|
||||
|
||||
var sellQtyMap = {};
|
||||
@@ -1556,6 +1560,7 @@ function getAlphaHistorySummary_() {
|
||||
* PASS 전 HTS 입력 금지 조건을 결정론적으로 산출.
|
||||
*/
|
||||
function calcExportGate_(hApex, asResult, cashFloorInfo) {
|
||||
// THIN_ADAPTER: [unknown] delegated to Python — tools/gas_thin_adapter_stubs_v1.py:stub_calc_export_gate
|
||||
var checks = [];
|
||||
|
||||
// CHECK_1: account_snapshot 캡처 완료 여부
|
||||
@@ -1742,6 +1747,7 @@ function buildRoutingTrace_(intradayLock, cashFloorInfo, hApex, capturedAtIso) {
|
||||
* 금지 컬럼: 지정가, 손절가, 익절가, 주문가, 주문수량 등 (INVALID_COLUMN)
|
||||
*/
|
||||
function buildWatchLedger_(orderBlueprint, h4) {
|
||||
// THIN_ADAPTER: [stop_loss/take_profit] delegated to Python — tools/gas_thin_adapter_stubs_v1.py:stub_build_watch_ledger
|
||||
var priceMap = {};
|
||||
((h4 && h4.prices) || []).forEach(function(p) { priceMap[p.ticker] = p; });
|
||||
var blueprintRows = Array.isArray(orderBlueprint) ? orderBlueprint : [];
|
||||
|
||||
Reference in New Issue
Block a user