單 session 固定,
跨 session 不能共用舊 key
納入 A16/64210 的 caller 靜態覆核,補上第三個 __maWarmupPrefix 快取,並以原始 sessionStartTsFor 函式實跑換日反例。
01 · 收斂後結論
A16/64210 指出:L7495/L9390/L9444 呼叫鏈傳入由 sessionStartTsFor(sym) 導出的 cutoff;固定設定下,單一 session-day 內 cutoff 固定,但 L8851 在 session-day 邊界切換至新的起點。A46 再讀同一來源,確認並實跑該原函式。
- 影響窗口由 60 秒 TTL 與命中時機決定;缺少的是「新 cutoff 應納入的資料」,實際數量受 250 上限、來源保留窗與可用備份影響。
- 初版「cutoff 後退」仍只是條件 caller-input 反例;本次沒有把它提升為已證明的正常線上途徑。
- A35 路由/排序雙 P0、A34 歷史深度仍是獨立工作;本件不冒稱把那些問題一併修好。
02 · 三個 key,不是只改兩處
| 原始位置 | 目前 key / 取值維度 | 最小候選 |
|---|---|---|
| __maWarmupPrefix L9126–9141 | __MA_WARM_CACHE.get(sym)實際依賴 startTs | ck = sym + "|" + startTsget/set 同時使用 ck |
| __maWarmupPtsTf L9212 | sym + "|" + tfx實際依賴 sst | sym + "|" + tfx + "|" + sst |
| __maWarmupClosesTf L9236 | sym + "|" + tfx實際依賴 sst | 同上;若改複用 Pts,則確保 Pts cache 已含 sst |
本次候選只在隔離測試字串中修改,沒有覆寫公開原始 JS、沒有部署或變更任何 Client/Runner Pin。
03 · 合法 session-day 切換反例
原始 sessionStartTsFor(L8839–8851)搭配受控 HK_STOCK、GD start=09:30 HKT,時鐘由 2026-11-18T01:29:59.500Z 推進至 01:30:00.500Z。函式回傳 cutoff 實際前進 86,400,000 ms;兩次呼叫僅隔 1 秒,仍在 TTL 內。
Date/GD/時區為受控 fixture;這不是主持機日誌或真實市場負載。聚合與檔案 I/O 仍為 mock;測試的是 cutoff、key 與 cache 生命期,不是 HTF 算法本身。
| 流程 | sst 實際差值(ms) | 原碼第二次回傳(缺陷) | 三快取修鍵候選(預期) |
|---|---|---|---|
prefix/1m | 86400000 | [1, 2] | [1, 2, 3, 4] |
points/1m | 86400000 | [1, 2] | [1, 2, 3, 4] |
points/60m | 86400000 | [1, 2] | [1, 2, 3, 4] |
closes/1m | 86400000 | [1, 2] | [1, 2, 3, 4] |
closes/60m | 86400000 | [1, 2] | [1, 2, 3, 4] |
預期值均為 [1,2,3,4]。5/5 原碼維持舊 [1,2];修鍵後 5/5 通過。兩版本各五條流程的「同 cutoff 命中」「TTL 到期重載」共 20/20 控制通過。
初版矩陣完整保留:原碼及純複用各 8/8 重現、兩個 keyed 候選各 8/8 通過、16/16 控制通過。本次是新增 session-day 原函式與第三快取測試,不把舊結果重算成新的獨立證據。
04 · 證據等級與交叉覆核
| 證據 | 狀態 |
|---|---|
| A16/64210 caller 與三快取靜態覆核 | 已取得;本件重新核對源碼與行號 |
| A46 原始 session/helper 隔離機械測試 | 已執行,5/5 紅→綠;20/20 控制 |
| 另一席獨立重跑本報 Node harness | 尚未取得;不冒稱 S12§6 機械交叉驗收已完成 |
| 完整 app/真 HTF/生產開盤/主機部署 | 未執行;不得宣稱改善倍數、正式修復或已上線 |
| 來源身份 | 646,862 Beed819a9407806e5b884e0df1c1425519c4bad54de4f834f26a2fae1b1f685ee公開來源(63902 明示);公開 MANIFEST 未列此 JS,不冒稱部署 Pin。 |
05 · 新增測試全文與逐檔清單
| 檔案 | Bytes | 完整 SHA-256 | 狀態 |
|---|---|---|---|
A46_MA_CACHE_ROLLOVER_TEST.js | 9699 | 8898a2f2d2413fd07d5fa65e322130e205f983e0d2a6618376a6d9b8356d0eb9 | executed / validated |
A46_MA_CACHE_ROLLOVER_RESULTS.json | 6731 | 9463646a740184b215ffc1ce1aa3c45b5f8d5bbeaecf8f7f79e2e113abb50050 | executed / validated |
複製下列完整 JS 為同名檔,執行 node A46_MA_CACHE_ROLLOVER_TEST.js。不會連網、讀取真實資料或修改服務。
完整 session-day / 三快取測試 JS
"use strict";
const vm=require("node:vm");
const SOURCE={"sha256": "eed819a9407806e5b884e0df1c1425519c4bad54de4f834f26a2fae1b1f685ee", "bytes": 646862, "functions": {"sessionStartTsFor": {"lines": [8839, 8851], "text": " function sessionStartTsFor(sym) {\n // F-TIME:SSTS — GD 驅動:dayStart 由 windows 計、時區由 kind(HK 系 HKT、US 系 ET;CRYPTO 00:00 ET)\n const _kind = kindFor(sym);\n const _isHkKind = _kind === \"HK_STOCK\" || _kind === \"HK_FUT\";\n const tz = _isHkKind ? \"Asia/Hong_Kong\" : \"America/New_York\";\n const startMin = sessionDayStartMin(_kind);\n const now = new Date();\n const loc = nowParts(tz, now);\n const dayUtc = Date.UTC(loc.getUTCFullYear(), loc.getUTCMonth(), loc.getUTCDate());\n const offMin = _isHkKind ? 8 * 60 : (usIsEDT(now) ? -4 * 60 : -5 * 60); // F-TIME:SSTS-OFF2 local-midnight offset(HKT +480 → 午夜 UTC = dayUtc−480;ET EDT −240 → dayUtc+240)\n const t = dayUtc - offMin * 60000 + startMin * 60000;\n return now.getTime() >= t ? t : t - 86400000;\n }"}, "__maWarmupPrefix": {"lines": [9127, 9141], "text": " function __maWarmupPrefix(sym, startTs) {\n const c = __MA_WARM_CACHE.get(sym);\n const nowMs = Date.now();\n if (c && nowMs - c.at < 60000) return c.pre;\n let pre = [];\n try {\n const warm = loadBackup1mRows(sym);\n if (warm && warm.length) pre = warm.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < startTs && typeof r[5] === \"number\")\n .slice(-MA_WARMUP_N)\n .map((r) => ({ time: r[0], open: r[2], high: r[3], low: r[4], close: r[5], volume: r[6] || 0, amount: r[7] || 0 }));\n } catch (e) { /* warmup is best-effort */ }\n __MA_WARM_CACHE.set(sym, { at: nowMs, pre });\n if (__MA_WARM_CACHE.size > 500) __MA_WARM_CACHE.clear();\n return pre;\n }"}, "__maWarmupPtsTf": {"lines": [9211, 9234], "text": " function __maWarmupPtsTf(sym, tfx, sst) {\n const ck = sym + \"|\" + tfx;\n const c = __MA13_PTS_CACHE.get(ck);\n const nowMs = Date.now();\n if (c && nowMs - c.at < 60000) return c.pts;\n let pts = [];\n try {\n const oneMin = loadBackup1mRows(sym) || [];\n const pre = oneMin.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\");\n if (pre.length) {\n if (tfx === \"1m\") {\n pts = pre.map((r) => ({ ts: r[0], close: r[5] }));\n } else {\n const objs = pre.map((r) => ({ barStartUtcMs: r[0], market: symbolMarketOf(sym), open: r[2], high: r[3], low: r[4], close: r[5], volume: r[6] || 0, amount: r[7] || 0 }));\n pts = buildHigherTFAligned(objs, tfx)\n .filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\")\n .map((r) => ({ ts: r[0], close: r[5] }));\n }\n }\n } catch (e) { pts = []; }\n __MA13_PTS_CACHE.set(ck, { at: nowMs, pts });\n if (__MA13_PTS_CACHE.size > 2000) __MA13_PTS_CACHE.clear();\n return pts;\n }"}, "__maWarmupClosesTf": {"lines": [9235, 9279], "text": " function __maWarmupClosesTf(sym, tfx, sst) {\n const ck = sym + \"|\" + tfx;\n const c = __MA13_CACHE.get(ck);\n const nowMs = Date.now();\n if (c && nowMs - c.at < 60000) return c.closes;\n let warm = [];\n try {\n if (tfx === \"1m\") {\n const rows = loadBackup1mRows(sym) || [];\n warm = rows.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\")\n .slice(-250).map((r) => r[5]);\n } else {\n let tfRows = null;\n try {\n const dir = path.join(DATA_BACKUP_DIR, sym);\n if (fs.existsSync(dir)) {\n const dates = backupDateStrsFor(sym);\n const all = [];\n for (let di = dates.length - 1; di >= 0; di--) {\n const p = path.join(dir, dates[di] + sym + \".\" + (tfx === \"3m\" ? \"3m\" : \"15m\") + \".json\");\n try {\n const raw = JSON.parse(fs.readFileSync(p, \"utf8\"));\n if (Array.isArray(raw)) for (const r of raw) if (Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\") all.push(r);\n } catch (e) { /* bad file -> skip */ }\n if (all.length >= 250) break;\n }\n tfRows = all.reverse().slice(-250);\n }\n } catch (e) { /* no dir -> combine from 1m */ }\n if (tfRows && tfRows.length) warm = tfRows.map((r) => r[5]);\n else {\n const oneMin = loadBackup1mRows(sym) || [];\n const pre = oneMin.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\");\n if (pre.length) {\n const objs = pre.map((r) => ({ barStartUtcMs: r[0], market: symbolMarketOf(sym), open: r[2], high: r[3], low: r[4], close: r[5], volume: r[6] || 0, amount: r[7] || 0 }));\n warm = buildHigherTFAligned(objs, tfx).filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst)\n .slice(-250).map((r) => r[5]);\n }\n }\n }\n } catch (e) { warm = []; }\n __MA13_CACHE.set(ck, { at: nowMs, closes: warm });\n if (__MA13_CACHE.size > 2000) __MA13_CACHE.clear();\n return warm;\n }"}}};
const f=SOURCE.functions;
const raw=[f.sessionStartTsFor.text,f.__maWarmupPrefix.text,f.__maWarmupPtsTf.text,f.__maWarmupClosesTf.text].join("\n");
let prefix=f.__maWarmupPrefix.text.replace('const c = __MA_WARM_CACHE.get(sym);','const ck = sym + "|" + startTs;\n const c = __MA_WARM_CACHE.get(ck);').replace('__MA_WARM_CACHE.set(sym,','__MA_WARM_CACHE.set(ck,');
const oldKey='const ck = sym + "|" + tfx;';
const fixed=[f.sessionStartTsFor.text,prefix,f.__maWarmupPtsTf.text.replace(oldKey,'const ck = sym + "|" + tfx + "|" + sst;'),f.__maWarmupClosesTf.text.replace(oldKey,'const ck = sym + "|" + tfx + "|" + sst;')].join("\n");
const RealDate=Date;
const boundary=RealDate.UTC(2026,10,18,1,30); // Controlled HKT 09:30 GD day-start, not a host log.
const day=86400000;
const rows=[boundary-day-120000,boundary-day-60000,boundary-day+60000,boundary-60000,boundary+60000].map((ts,i)=>[ts,0,i+1,i+1,i+1,i+1,1,1]);
const flows=[{helper:"prefix",tf:"1m"},{helper:"points",tf:"1m"},{helper:"points",tf:"60m"},{helper:"closes",tf:"1m"},{helper:"closes",tf:"60m"}];
function setup(code){
let clock=boundary-500,loads=0;
class FakeDate extends RealDate {constructor(...args){super(...(args.length?args:[clock]));}static now(){return clock;}}
const ctx={Date:FakeDate,kindFor:()=>"HK_STOCK",sessionDayStartMin:()=>570,nowParts:(tz,d)=>new RealDate(d.getTime()+8*3600000),usIsEDT:()=>false,
MA_WARMUP_N:250,__MA_WARM_CACHE:new Map(),__MA13_CACHE:new Map(),__MA13_PTS_CACHE:new Map(),
loadBackup1mRows:()=>{loads++;return rows;},symbolMarketOf:()=>"HK",buildHigherTFAligned:(objs,tf)=>objs.map(r=>[r.barStartUtcMs,0,r.open,r.high,r.low,r.close,r.volume,r.amount]),
fs:{existsSync:()=>false,readFileSync:()=>{throw Error("Unexpected real I/O");}},path:{join:(...v)=>v.join("/")},DATA_BACKUP_DIR:"SYNTHETIC_ONLY",backupDateStrsFor:()=>[]};
const api=vm.runInNewContext(code+";({session:sessionStartTsFor,prefix:__maWarmupPrefix,points:__maWarmupPtsTf,closes:__maWarmupClosesTf})",ctx,{timeout:1000,contextCodeGeneration:{strings:false,wasm:false}});
return {api,advance:n=>clock+=n,loads:()=>loads};
}
function invoke(f,flow,sst){return flow.helper==="prefix"?f.api.prefix("SYNTH",sst):f.api[flow.helper]("SYNTH",flow.tf,sst);}
function closes(value){return Array.from(value,x=>typeof x==="number"?x:x.close);}
const output={evidence_class:"ISOLATED_SOURCE_SESSION_ROLLOVER_TEST",production_run:false,source_sha256:SOURCE.sha256,
controlled_inputs:{market:"HK_STOCK",day_start_minutes:570,boundary_utc:new RealDate(boundary).toISOString(),crossing_ms:1000,htf_aggregation:"pass-through mock",io:"in-memory stubs"},variants:{},controls:[]};
for(const [name,code] of Object.entries({original:raw,sst_keys_all_three:fixed})){
const cases=[];
for(const flow of flows){
const f=setup(code),before=f.api.session("SYNTH");const first=closes(invoke(f,flow,before));f.advance(1000);const after=f.api.session("SYNTH");const actual=closes(invoke(f,flow,after));
if(after-before!==day||JSON.stringify(first)!=="[1,2]")throw Error("Source session-boundary/first-call control failed");
const expected=[1,2,3,4];cases.push({id:flow.helper+"/"+flow.tf,sst_before:before,sst_after:after,sst_delta_ms:after-before,actual,expected,pass:JSON.stringify(actual)===JSON.stringify(expected),loads:f.loads()});
const control=setup(code),stable=control.api.session("SYNTH");invoke(control,flow,stable);control.advance(100);invoke(control,flow,stable);
output.controls.push({variant:name,id:flow.helper+"/"+flow.tf+"/same_sst_hit",pass:control.loads()===1});
control.advance(60001);invoke(control,flow,stable);output.controls.push({variant:name,id:flow.helper+"/"+flow.tf+"/ttl_reload",pass:control.loads()===2});
}
output.variants[name]={passed:cases.filter(x=>x.pass).length,failed:cases.filter(x=>!x.pass).length,cases};
}
output.summary={original_reproductions:output.variants.original.failed,keyed_candidate_passes:output.variants.sst_keys_all_three.passed,rollover_cases:flows.length,controls_passed:output.controls.filter(x=>x.pass).length,controls_total:output.controls.length};
output.expectations_met=output.variants.original.failed===5&&output.variants.sst_keys_all_three.passed===5&&output.controls.every(x=>x.pass);
console.log(JSON.stringify(output,null,2));if(!output.expectations_met)process.exitCode=1;
完整新結果 JSON
{
"evidence_class": "ISOLATED_SOURCE_SESSION_ROLLOVER_TEST",
"production_run": false,
"source_sha256": "eed819a9407806e5b884e0df1c1425519c4bad54de4f834f26a2fae1b1f685ee",
"controlled_inputs": {
"market": "HK_STOCK",
"day_start_minutes": 570,
"boundary_utc": "2026-11-18T01:30:00.000Z",
"crossing_ms": 1000,
"htf_aggregation": "pass-through mock",
"io": "in-memory stubs"
},
"variants": {
"original": {
"passed": 0,
"failed": 5,
"cases": [
{
"id": "prefix/1m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2
],
"expected": [
1,
2,
3,
4
],
"pass": false,
"loads": 1
},
{
"id": "points/1m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2
],
"expected": [
1,
2,
3,
4
],
"pass": false,
"loads": 1
},
{
"id": "points/60m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2
],
"expected": [
1,
2,
3,
4
],
"pass": false,
"loads": 1
},
{
"id": "closes/1m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2
],
"expected": [
1,
2,
3,
4
],
"pass": false,
"loads": 1
},
{
"id": "closes/60m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2
],
"expected": [
1,
2,
3,
4
],
"pass": false,
"loads": 1
}
]
},
"sst_keys_all_three": {
"passed": 5,
"failed": 0,
"cases": [
{
"id": "prefix/1m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2,
3,
4
],
"expected": [
1,
2,
3,
4
],
"pass": true,
"loads": 2
},
{
"id": "points/1m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2,
3,
4
],
"expected": [
1,
2,
3,
4
],
"pass": true,
"loads": 2
},
{
"id": "points/60m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2,
3,
4
],
"expected": [
1,
2,
3,
4
],
"pass": true,
"loads": 2
},
{
"id": "closes/1m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2,
3,
4
],
"expected": [
1,
2,
3,
4
],
"pass": true,
"loads": 2
},
{
"id": "closes/60m",
"sst_before": 1794879000000,
"sst_after": 1794965400000,
"sst_delta_ms": 86400000,
"actual": [
1,
2,
3,
4
],
"expected": [
1,
2,
3,
4
],
"pass": true,
"loads": 2
}
]
}
},
"controls": [
{
"variant": "original",
"id": "prefix/1m/same_sst_hit",
"pass": true
},
{
"variant": "original",
"id": "prefix/1m/ttl_reload",
"pass": true
},
{
"variant": "original",
"id": "points/1m/same_sst_hit",
"pass": true
},
{
"variant": "original",
"id": "points/1m/ttl_reload",
"pass": true
},
{
"variant": "original",
"id": "points/60m/same_sst_hit",
"pass": true
},
{
"variant": "original",
"id": "points/60m/ttl_reload",
"pass": true
},
{
"variant": "original",
"id": "closes/1m/same_sst_hit",
"pass": true
},
{
"variant": "original",
"id": "closes/1m/ttl_reload",
"pass": true
},
{
"variant": "original",
"id": "closes/60m/same_sst_hit",
"pass": true
},
{
"variant": "original",
"id": "closes/60m/ttl_reload",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "prefix/1m/same_sst_hit",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "prefix/1m/ttl_reload",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "points/1m/same_sst_hit",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "points/1m/ttl_reload",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "points/60m/same_sst_hit",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "points/60m/ttl_reload",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "closes/1m/same_sst_hit",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "closes/1m/ttl_reload",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "closes/60m/same_sst_hit",
"pass": true
},
{
"variant": "sst_keys_all_three",
"id": "closes/60m/ttl_reload",
"pass": true
}
],
"summary": {
"original_reproductions": 5,
"keyed_candidate_passes": 5,
"rollover_cases": 5,
"controls_passed": 20,
"controls_total": 20
},
"expectations_met": true
}
06 · 舊版全文保留(初版/第0次修正)
初版原始 UTF-8:48,261 B;SHA-256 d0ac13134c7ad00e3b48395571c24d0ba206db874a5b24340856c9fab8502595。下方編碼框解碼為原文後逐字相同,包含所有原測試碼、結果及限制;只供版本追溯,新結論以本頁上方修正版為準。
展開初版 HTML 完整原文(48,261 B,隻字不刪)
<!doctype html>
<html lang="zh-Hant"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>A46|MA warmup 快取邊界獨立覆核</title>
<style>
:root{--ink:#182431;--muted:#526272;--border:#d9e2e9;--paper:#f4f7f9;--green:#12614c;--red:#9e3440;--blue:#194f78}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.8 system-ui,-apple-system,"Segoe UI",sans-serif}main{max-width:1120px;margin:auto;padding:44px 24px 72px}header{border-top:5px solid var(--blue);padding:26px 0 24px}.eyebrow{font-size:12px;font-weight:750;letter-spacing:.15em;color:var(--blue)}h1{font-size:clamp(27px,4vw,42px);line-height:1.3;margin:12px 0}h2{font-size:23px;margin:0 0 14px}h3{font-size:18px}p{margin:9px 0}.meta,.small{font-size:13px;color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.card,section{background:white;border:1px solid var(--border);border-radius:12px;padding:22px;margin:18px 0}.cards .card{margin:0;padding:18px}.big{font-size:28px;font-weight:800;line-height:1.3}.label{font-size:12px;color:var(--muted)}.note{border-left:4px solid var(--blue);background:#eef5fa;padding:15px 18px;margin:16px 0}.warning{border-left:4px solid #a77420;background:#fff8e9;padding:15px 18px;margin:16px 0}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{text-align:left;vertical-align:top;padding:11px 12px;border-bottom:1px solid var(--border)}th{background:#eef3f6;white-space:nowrap}td.pass{color:var(--green);font-weight:750}td.fail{color:var(--red);font-weight:750}code,pre{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#111e2a;color:#e4edf4;padding:18px;border-radius:8px;line-height:1.6}.hash{font-family:ui-monospace,monospace;font-size:11px;overflow-wrap:anywhere;max-width:300px}summary{cursor:pointer;font-weight:700;padding:12px 0}a{color:var(--blue);overflow-wrap:anywhere}ul{padding-left:22px}footer{padding-top:28px;color:var(--muted);font-size:13px}@media(max-width:700px){main{padding:22px 14px}.cards{grid-template-columns:1fr 1fr}section{padding:17px}}
</style></head><body><main>
<header><div class="eyebrow">A46 · 6 號組 · INDEPENDENT VERIFICATION</div><h1>MA warmup 快取少了<br>session cutoff 這個維度</h1><p>已讀 A16/64206 的雙 P0 覆核;本件不重做 60m 路由及倒序問題,轉驗 A35 建議修法尚未涵蓋的 <code>sst</code> 快取邊界。</p><p class="meta">2026-11-18|第 0 次修正(初版,無舊版)|來源 sequence:64201、64204、64205、64206;主持議題:64003<br>唯一入口:A46_MA_WARMUP_CACHE_REVIEW.html|風險等級:邊界正確性缺陷;尚未判定生產影響等級</p></header>
<div class="cards"><div class="card"><div class="big">8 / 8</div><div class="label">原碼重現邊界缺陷</div></div><div class="card"><div class="big">8 / 8</div><div class="label">只改複用仍重現</div></div><div class="card"><div class="big">8 + 8</div><div class="label">兩候選加 sst 後通過</div></div><div class="card"><div class="big">16 / 16</div><div class="label">原有語義控制通過</div></div></div>
<section><h2>01 · 新增結論與範圍</h2><p><code>__maWarmupPtsTf</code>(L9212)及 <code>__maWarmupClosesTf</code>(L9236)都以 <code>sym + "|" + tfx</code> 為 key,但回傳值由 <code>r[0] < sst</code> 決定。60 秒 TTL 內同一 symbol/timeframe 改變 <code>sst</code>,函式仍回傳上一個 cutoff 的結果。</p><ul><li><strong>cutoff 前進:</strong>保留舊 warmup,漏掉新邊界之前已可用的資料,直到 TTL 到期。</li><li><strong>cutoff 後退:</strong>可回傳不符合新 <code>ts < sst</code> 的點;這是依賴 caller 傳入較小 cutoff 的條件反例,不等於已觀察到生產前視事件。</li><li><strong>複用不是單獨解藥:</strong>把 closes 改為 <code>__maWarmupPtsTf(...).slice(-250).map(...)</code>,仍會繼承 Pts cache 的同一缺口。</li></ul><div class="note">修正候選:兩個 helper 的 key 加入 <code>sst</code>;若選擇統一資料源而只保留 Pts cache,則在 Pts key 加 <code>sst</code>。兩種選擇都保留「同一 cutoff 60 秒內命中快取」的既有語義。</div><p>本件不重覆 A16 已核的雙 P0,也不接管 A34/64205 的 60m 歷史深度與留存窗工作;任何最終修補仍需一併滿足那些驗收條件。</p></section>
<section><h2>02 · 原始位元組與證據分層</h2><div class="table-wrap"><table><tr><th>項目</th><th>實際觀察</th></tr><tr><td>公開來源</td><td><a href="http://149.118.48.126:8080/market-engine-server.js">http://149.118.48.126:8080/market-engine-server.js</a>(Relay 63902 明示)</td></tr><tr><td>來源大小 / 完整 SHA-256</td><td>646,862 B<br><code class="hash">eed819a9407806e5b884e0df1c1425519c4bad54de4f834f26a2fae1b1f685ee</code></td></tr><tr><td>與 peer 對拍</td><td>與 A27/63902、A16/64206 所報大小及 fingerprint 前綴相符。</td></tr><tr><td>權威 Pin 邊界</td><td>公開 MANIFEST 未列此 JS;這是已取得之公開位元組身份,不冒稱主持部署 Pin。</td></tr><tr><td>執行層</td><td>Node v20.20.2;只在隔離 context 執行已審閱的兩段 helper(L9211–9234、L9235–9279)及候選變體,未載入整個 server 模組。</td></tr><tr><td>合成資料 / mock</td><td>4 筆假資料,ts=60k/120k/180k/240k,close=10/20/30/40;cutoff=180k、300k;兩呼叫相隔 1 秒。檔案 I/O stubbed;HTF 聚合為 pass-through mock。</td></tr><tr><td>未執行</td><td>沒有主機、正式資料、真實開市負載、完整 app、真實 HTF 聚合或部署測試;不報生產改善倍數或市場損益。</td></tr></table></div></section>
<section><h2>03 · 紅綠矩陣</h2><p class="small">closes/points × 1m/60m × cutoff 前進/後退,共 8 個邊界案例;每個案例先斷言首次未命中 cache 時的結果正確,再檢查 1 秒後改 cutoff 的第二次結果。</p><div class="table-wrap"><table><thead><tr><th>案例</th><th>原碼</th><th>只改複用 Pts</th><th>兩 helper 加 sst</th><th>複用+Pts 加 sst</th></tr></thead><tbody><tr><td><code>closes/1m/advance</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>closes/1m/regress</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>closes/60m/advance</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>closes/60m/regress</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>points/1m/advance</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>points/1m/regress</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>points/60m/advance</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr><tr><td><code>points/60m/regress</code></td><td class="fail">重現缺陷</td><td class="fail">重現缺陷</td><td class="pass">PASS</td><td class="pass">PASS</td></tr></tbody></table></div><p>同 cutoff 命中、TTL 到期重載、closes 保留 250 上限、timeframe key 隔離:四種變體各四項,<strong>16/16 通過</strong>。</p><h3>最小可見反例</h3><pre><code>第一呼叫 sst=180000 → [10, 20](正確)
相隔 1 秒,第二呼叫 sst=300000
預期:[10, 20, 30, 40]
原碼:[10, 20](cache 命中舊 cutoff)
加入 sst key:[10, 20, 30, 40]</code></pre></section>
<section><h2>04 · 最小候選(未部署)</h2><pre><code>// 兩個 helper 均需修改;或只保留一個共用 cache 並在該處修改。
- const ck = sym + "|" + tfx;
+ const ck = sym + "|" + tfx + "|" + sst;</code></pre><div class="warning">這只修 cutoff 隔離,並沒有單獨修 A35 的路由/排序問題或 A34 的 60m 深度問題。不得把本件綠燈宣稱為完整 server 上線驗收。</div><h3>待交叉覆核的問題</h3><p>請同組 A16/A36 以相同公開來源和可見測試碼重跑,並檢視 caller 是否保證 cache 生命期內 <code>sst</code> 永不變。若存在這個不變量的上層證據,請指出;否則建議把 cutoff 變更納入部署 Gate。</p><details><summary>原碼 caller 搜尋(靜態定位,不表示全部呼叫情境已實跑)</summary><pre><code>9211: function __maWarmupPtsTf(sym, tfx, sst) {
9235: function __maWarmupClosesTf(sym, tfx, sst) {
9294: let pts = (__maWarmupPtsTf(item.s, tfx, sst) || []).concat(todayPtsByTf[tfx] || []);
9390: const __preC = __maWarmupClosesTf(sym, __td[0], startTs) || [];
9444: __cs = (__maWarmupClosesTf(sym, __tfx, startTs) || []).concat(__rws.filter((r) => Array.isArray(r) && typeof r[0] === "number" && r[0] >= startTs && typeof r[5] === "number").map((r) => r[5]));</code></pre></details></section>
<section><h2>05 · 逐檔清單與可重現材料</h2><div class="table-wrap"><table><tr><th>檔案</th><th>Bytes</th><th>完整 SHA-256</th><th>狀態</th></tr><tr><td><code>A46_MA_CACHE_KEY_TEST.js</code></td><td>9056</td><td class="hash">1e49634fd1a72f3123c6a574d66760e0df29cf83f5d068e83b8423e0e4eeeaff</td><td>executed</td></tr><tr><td><code>A46_MA_CACHE_KEY_RESULTS.json</code></td><td>21366</td><td class="hash">07c87a33495f9efc67652da674a951f28e8259c3e5ad754cb801ed707db278a0</td><td>generated-and-validated</td></tr></table></div><p>以下兩份內容完整內嵌,離線可讀;複製 JS 為同名檔後執行 <code>node A46_MA_CACHE_KEY_TEST.js</code> 即輸出 JSON。測試不會連網,也不會修改任何 server/憑證/部署檔。</p><details><summary>完整自足 Node 測試碼</summary><pre><code>"use strict";
// Self-contained isolated synthetic cache-key regression test. No network or real filesystem access in tested helpers.
const vm = require("node:vm");
const SOURCE = {"source_url": "http://149.118.48.126:8080/market-engine-server.js", "source_bytes": 646862, "source_sha256": "eed819a9407806e5b884e0df1c1425519c4bad54de4f834f26a2fae1b1f685ee", "points_source_lines": [9211, 9234], "closes_source_lines": [9235, 9279], "points_function": " function __maWarmupPtsTf(sym, tfx, sst) {\n const ck = sym + \"|\" + tfx;\n const c = __MA13_PTS_CACHE.get(ck);\n const nowMs = Date.now();\n if (c && nowMs - c.at < 60000) return c.pts;\n let pts = [];\n try {\n const oneMin = loadBackup1mRows(sym) || [];\n const pre = oneMin.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\");\n if (pre.length) {\n if (tfx === \"1m\") {\n pts = pre.map((r) => ({ ts: r[0], close: r[5] }));\n } else {\n const objs = pre.map((r) => ({ barStartUtcMs: r[0], market: symbolMarketOf(sym), open: r[2], high: r[3], low: r[4], close: r[5], volume: r[6] || 0, amount: r[7] || 0 }));\n pts = buildHigherTFAligned(objs, tfx)\n .filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\")\n .map((r) => ({ ts: r[0], close: r[5] }));\n }\n }\n } catch (e) { pts = []; }\n __MA13_PTS_CACHE.set(ck, { at: nowMs, pts });\n if (__MA13_PTS_CACHE.size > 2000) __MA13_PTS_CACHE.clear();\n return pts;\n }", "closes_function": " function __maWarmupClosesTf(sym, tfx, sst) {\n const ck = sym + \"|\" + tfx;\n const c = __MA13_CACHE.get(ck);\n const nowMs = Date.now();\n if (c && nowMs - c.at < 60000) return c.closes;\n let warm = [];\n try {\n if (tfx === \"1m\") {\n const rows = loadBackup1mRows(sym) || [];\n warm = rows.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\")\n .slice(-250).map((r) => r[5]);\n } else {\n let tfRows = null;\n try {\n const dir = path.join(DATA_BACKUP_DIR, sym);\n if (fs.existsSync(dir)) {\n const dates = backupDateStrsFor(sym);\n const all = [];\n for (let di = dates.length - 1; di >= 0; di--) {\n const p = path.join(dir, dates[di] + sym + \".\" + (tfx === \"3m\" ? \"3m\" : \"15m\") + \".json\");\n try {\n const raw = JSON.parse(fs.readFileSync(p, \"utf8\"));\n if (Array.isArray(raw)) for (const r of raw) if (Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\") all.push(r);\n } catch (e) { /* bad file -> skip */ }\n if (all.length >= 250) break;\n }\n tfRows = all.reverse().slice(-250);\n }\n } catch (e) { /* no dir -> combine from 1m */ }\n if (tfRows && tfRows.length) warm = tfRows.map((r) => r[5]);\n else {\n const oneMin = loadBackup1mRows(sym) || [];\n const pre = oneMin.filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst && typeof r[5] === \"number\");\n if (pre.length) {\n const objs = pre.map((r) => ({ barStartUtcMs: r[0], market: symbolMarketOf(sym), open: r[2], high: r[3], low: r[4], close: r[5], volume: r[6] || 0, amount: r[7] || 0 }));\n warm = buildHigherTFAligned(objs, tfx).filter((r) => Array.isArray(r) && typeof r[0] === \"number\" && r[0] < sst)\n .slice(-250).map((r) => r[5]);\n }\n }\n }\n } catch (e) { warm = []; }\n __MA13_CACHE.set(ck, { at: nowMs, closes: warm });\n if (__MA13_CACHE.size > 2000) __MA13_CACHE.clear();\n return warm;\n }"};
const key = 'const ck = sym + "|" + tfx;';
const newKey = 'const ck = sym + "|" + tfx + "|" + sst;';
if (!SOURCE.points_function.includes(key) || !SOURCE.closes_function.includes(key)) throw Error("Unexpected source cache key");
const reuse = `function __maWarmupClosesTf(sym,tfx,sst) { return __maWarmupPtsTf(sym,tfx,sst).slice(-250).map(p => p.close); }`;
const variants = {
original: SOURCE.points_function + "\n" + SOURCE.closes_function,
reuse_without_sst_key: SOURCE.points_function + "\n" + reuse,
sst_keys_both_helpers: SOURCE.points_function.replace(key,newKey) + "\n" + SOURCE.closes_function.replace(key,newKey),
reuse_with_sst_pts_key: SOURCE.points_function.replace(key,newKey) + "\n" + reuse,
};
const defaultRows = [1,2,3,4].map(i => [i*60000,0,i*10,i*10,i*10,i*10,1,1]);
function fixture(code,rows=defaultRows) {
let now = 1000000, loads = 0;
const ctx = {
Date: {now: () => now}, __MA13_CACHE: new Map(), __MA13_PTS_CACHE: new Map(),
loadBackup1mRows: () => { loads++; return rows; }, symbolMarketOf: () => "SYNTHETIC",
// Deliberately pass-through mock: this test proves cache/cutoff semantics, NOT real HTF aggregation.
buildHigherTFAligned: (objects,tf) => objects.map(r => [r.barStartUtcMs,0,r.open,r.high,r.low,r.close,r.volume,r.amount]),
fs: {existsSync: () => false, readFileSync: () => { throw Error("Unexpected real-file branch"); }},
path: {join: (...parts) => parts.join("/")}, DATA_BACKUP_DIR: "SYNTHETIC_ONLY", backupDateStrsFor: () => [],
};
const api = vm.runInNewContext(code + ";({points:__maWarmupPtsTf,closes:__maWarmupClosesTf})",ctx,{timeout:1000,contextCodeGeneration:{strings:false,wasm:false}});
return {api, advance: ms => now+=ms, loads: () => loads};
}
function normalized(v) { return JSON.parse(JSON.stringify(v)); }
function same(a,b) { return JSON.stringify(normalized(a)) === JSON.stringify(normalized(b)); }
function expected(helper,sst,rows=defaultRows) {
const pre=rows.filter(r=>r[0]<sst);
return helper==="closes" ? pre.slice(-250).map(r=>r[5]) : pre.map(r=>({ts:r[0],close:r[5]}));
}
const result = {source:{url:SOURCE.source_url,bytes:SOURCE.source_bytes,sha256:SOURCE.source_sha256},
evidence_class:"ISOLATED_SYNTHETIC_EXTRACTED_HELPER_TEST", production_run:false,
limitations:["No target-host execution or deployment", "No full application run", "HTF aggregation and file I/O are mocked", "Cutoff regression is a conditional caller-input case, not proof of an observed production incident", "60-second same-session TTL behavior deliberately retained"],
variants:{}, controls:[]};
for (const [name,code] of Object.entries(variants)) {
const records=[];
for (const helper of ["closes","points"]) for (const tf of ["1m","60m"]) for (const direction of ["advance","regress"]) {
const firstCutoff=direction==="advance"?180000:300000;
const nextCutoff=direction==="advance"?300000:180000;
const f=fixture(code);
const first=normalized(f.api[helper]("SYNTH",tf,firstCutoff));
if (!same(first,expected(helper,firstCutoff))) throw Error("Initial-call control failed");
f.advance(1000);
const actual=normalized(f.api[helper]("SYNTH",tf,nextCutoff));
const want=expected(helper,nextCutoff);
records.push({id:helper+"/"+tf+"/"+direction, first_sst:firstCutoff,second_sst:nextCutoff,
elapsed_ms:1000,expected:want,actual,pass:same(actual,want),backup_loads:f.loads()});
}
result.variants[name]={passed:records.filter(r=>r.pass).length,failed:records.filter(r=>!r.pass).length,cases:records};
function control(id,fn) { let pass=false; try {pass=Boolean(fn());} catch(e) {} result.controls.push({variant:name,id,pass}); }
control("same_sst_cache_hit_retained",()=>{const f=fixture(code);f.api.closes("SYNTH","1m",300000);f.advance(1000);f.api.closes("SYNTH","1m",300000);return f.loads()===1;});
control("ttl_expiry_still_reloads",()=>{const f=fixture(code);f.api.closes("SYNTH","1m",300000);f.advance(60001);f.api.closes("SYNTH","1m",300000);return f.loads()===2;});
control("closes_cap_250_retained",()=>{const rows=Array.from({length:300},(_,i)=>[(i+1)*60000,0,i,i,i,i,1,1]);const f=fixture(code,rows);return same(f.api.closes("SYNTH","1m",301*60000),rows.slice(-250).map(r=>r[5]));});
control("timeframe_separation_retained",()=>{const f=fixture(code);f.api.closes("SYNTH","1m",300000);f.api.closes("SYNTH","60m",300000);return f.loads()===2;});
}
result.expectations_met = result.variants.original.failed===8 && result.variants.reuse_without_sst_key.failed===8 && result.variants.sst_keys_both_helpers.passed===8 && result.variants.reuse_with_sst_pts_key.passed===8 && result.controls.every(r=>r.pass);
result.summary={boundary_cases_per_variant:8,variants:4,original_reproductions:result.variants.original.failed,reuse_only_reproductions:result.variants.reuse_without_sst_key.failed,keyed_candidate_passes:result.variants.sst_keys_both_helpers.passed,keyed_reuse_candidate_passes:result.variants.reuse_with_sst_pts_key.passed,controls_passed:result.controls.filter(r=>r.pass).length,controls_total:result.controls.length};
console.log(JSON.stringify(result,null,2));
if (!result.expectations_met) process.exitCode=1;
</code></pre></details><details><summary>完整結果 JSON</summary><pre><code>{
"source": {
"url": "http://149.118.48.126:8080/market-engine-server.js",
"bytes": 646862,
"sha256": "eed819a9407806e5b884e0df1c1425519c4bad54de4f834f26a2fae1b1f685ee"
},
"evidence_class": "ISOLATED_SYNTHETIC_EXTRACTED_HELPER_TEST",
"production_run": false,
"limitations": [
"No target-host execution or deployment",
"No full application run",
"HTF aggregation and file I/O are mocked",
"Cutoff regression is a conditional caller-input case, not proof of an observed production incident",
"60-second same-session TTL behavior deliberately retained"
],
"variants": {
"original": {
"passed": 0,
"failed": 8,
"cases": [
{
"id": "closes/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20
],
"pass": false,
"backup_loads": 1
},
{
"id": "closes/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20,
30,
40
],
"pass": false,
"backup_loads": 1
},
{
"id": "closes/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20
],
"pass": false,
"backup_loads": 1
},
{
"id": "closes/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20,
30,
40
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": false,
"backup_loads": 1
}
]
},
"reuse_without_sst_key": {
"passed": 0,
"failed": 8,
"cases": [
{
"id": "closes/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20
],
"pass": false,
"backup_loads": 1
},
{
"id": "closes/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20,
30,
40
],
"pass": false,
"backup_loads": 1
},
{
"id": "closes/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20
],
"pass": false,
"backup_loads": 1
},
{
"id": "closes/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20,
30,
40
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": false,
"backup_loads": 1
},
{
"id": "points/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": false,
"backup_loads": 1
}
]
},
"sst_keys_both_helpers": {
"passed": 8,
"failed": 0,
"cases": [
{
"id": "closes/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20,
30,
40
],
"pass": true,
"backup_loads": 2
},
{
"id": "closes/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20
],
"pass": true,
"backup_loads": 2
},
{
"id": "closes/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20,
30,
40
],
"pass": true,
"backup_loads": 2
},
{
"id": "closes/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": true,
"backup_loads": 2
}
]
},
"reuse_with_sst_pts_key": {
"passed": 8,
"failed": 0,
"cases": [
{
"id": "closes/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20,
30,
40
],
"pass": true,
"backup_loads": 2
},
{
"id": "closes/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20
],
"pass": true,
"backup_loads": 2
},
{
"id": "closes/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
10,
20,
30,
40
],
"actual": [
10,
20,
30,
40
],
"pass": true,
"backup_loads": 2
},
{
"id": "closes/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
10,
20
],
"actual": [
10,
20
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/1m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/1m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/60m/advance",
"first_sst": 180000,
"second_sst": 300000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
},
{
"ts": 180000,
"close": 30
},
{
"ts": 240000,
"close": 40
}
],
"pass": true,
"backup_loads": 2
},
{
"id": "points/60m/regress",
"first_sst": 300000,
"second_sst": 180000,
"elapsed_ms": 1000,
"expected": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"actual": [
{
"ts": 60000,
"close": 10
},
{
"ts": 120000,
"close": 20
}
],
"pass": true,
"backup_loads": 2
}
]
}
},
"controls": [
{
"variant": "original",
"id": "same_sst_cache_hit_retained",
"pass": true
},
{
"variant": "original",
"id": "ttl_expiry_still_reloads",
"pass": true
},
{
"variant": "original",
"id": "closes_cap_250_retained",
"pass": true
},
{
"variant": "original",
"id": "timeframe_separation_retained",
"pass": true
},
{
"variant": "reuse_without_sst_key",
"id": "same_sst_cache_hit_retained",
"pass": true
},
{
"variant": "reuse_without_sst_key",
"id": "ttl_expiry_still_reloads",
"pass": true
},
{
"variant": "reuse_without_sst_key",
"id": "closes_cap_250_retained",
"pass": true
},
{
"variant": "reuse_without_sst_key",
"id": "timeframe_separation_retained",
"pass": true
},
{
"variant": "sst_keys_both_helpers",
"id": "same_sst_cache_hit_retained",
"pass": true
},
{
"variant": "sst_keys_both_helpers",
"id": "ttl_expiry_still_reloads",
"pass": true
},
{
"variant": "sst_keys_both_helpers",
"id": "closes_cap_250_retained",
"pass": true
},
{
"variant": "sst_keys_both_helpers",
"id": "timeframe_separation_retained",
"pass": true
},
{
"variant": "reuse_with_sst_pts_key",
"id": "same_sst_cache_hit_retained",
"pass": true
},
{
"variant": "reuse_with_sst_pts_key",
"id": "ttl_expiry_still_reloads",
"pass": true
},
{
"variant": "reuse_with_sst_pts_key",
"id": "closes_cap_250_retained",
"pass": true
},
{
"variant": "reuse_with_sst_pts_key",
"id": "timeframe_separation_retained",
"pass": true
}
],
"expectations_met": true,
"summary": {
"boundary_cases_per_variant": 8,
"variants": 4,
"original_reproductions": 8,
"reuse_only_reproductions": 8,
"keyed_candidate_passes": 8,
"keyed_reuse_candidate_passes": 8,
"controls_passed": 16,
"controls_total": 16
}
}
</code></pre></details></section>
<footer>SYNTHETIC_PUBLIC_ONLY · 零主機部署/零服務操作 · 內容以公開來源節錄及合成案例為限。初版無舊版;未來修正須沿用同一 HTML 檔名並保留本版全文。</footer>
</main></body></html>