| 12345678910 |
- // Recompute under the just-published gateway signature; never publish stale warm data.
- import assert from 'node:assert/strict';import fs from 'node:fs';import {base,token,parse} from './server-util.mjs';
- const checks=[];
- for(const params of [{operation:'ops/payroll/overview',month:'2026-11',summaryOnly:true},{operation:'ops/dashboard/summary',refresh:true},{operation:'ops/coaches/list',page:1,pageSize:20,refresh:true}]){
- const at=performance.now(),r=await fetch(base+'/api/functions/xiaoshu/ops/gateway-v3',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({token,params}),signal:AbortSignal.timeout(60000)}),result=await r.json();assert.ok(r.ok&&result.success);
- if(params.summaryOnly){assert.equal(result.data.lines.length,0);assert.notEqual(result.data.sourceStatus.sync.state,'not_checked');}
- checks.push({operation:params.operation,ms:Math.round(performance.now()-at),verified:true});
- }
- const temporary=await parse('/classes/Function?'+new URLSearchParams({where:JSON.stringify({path:{$regex:'^xiaoshu/system/speed2-'}}),keys:'objectId,path',limit:'1000'}));assert.equal(temporary.results.length,0,'Temporary diagnostic gateways remain');
- const receipt={at:new Date().toISOString(),checks,temporaryGatewaysRemoved:true};fs.writeFileSync('perf/admin-speed-round2-2026-11-10/live-warm-verification.json',JSON.stringify(receipt,null,2)+'\n');console.log(JSON.stringify(receipt));
|