fix: close merge-review mail policy and repair validation gaps

This commit is contained in:
abaishu0730 committed 2026-10-27 14:38:36 +08:00
1 parent dcea4a063f
commit d744c36365
16 files changed
+168 -31

No files matched your search

@@ -0,0 +1,14 @@
'use strict';
// Keep the real server entrypoint and OS lifecycle, replacing business startup
// so this crash test cannot access company systems or production state.
const fs=require('node:fs'),http=require('node:http'),path=require('node:path');
const {respondToPing}=require('../../../src/platform/service/ping.cjs');
const application=require.resolve('../../../src/app/application.cjs');
require.cache[application]={id:application,filename:application,loaded:true,exports:{async main(){
const dir=process.env.ORDER_CRASH_TEST_DIR,port=Number(process.env.ORDER_CRASH_TEST_PORT);let ticks=0;
const server=http.createServer((req,res)=>respondToPing(req,res,{token:process.env.ORDER_SUPERVISOR_TOKEN,instanceId:process.env.ORDER_SUPERVISOR_INSTANCE,startedAt:new Date().toISOString()}));
await new Promise(resolve=>server.listen(port,'127.0.0.1',resolve));
fs.writeFileSync(path.join(dir,'child.pid'),String(process.pid));
const timer=setInterval(()=>fs.writeFileSync(path.join(dir,'ticks'),String(++ticks)),40);
return {async stop(){clearInterval(timer);await new Promise(resolve=>server.close(resolve));}};
}}};
@@ -0,0 +1,4 @@
'use strict';
const path=require('node:path');
const {ServiceSupervisor}=require('../../../src/platform/service/supervisor.cjs');
new ServiceSupervisor({stateDir:process.env.ORDER_CRASH_TEST_DIR,ports:[Number(process.env.ORDER_CRASH_TEST_PORT)],env:{NODE_OPTIONS:'--require "'+path.join(__dirname,'crash-service-preload.cjs').replaceAll('\\','/')+'"'},timing:{intervalMs:50,pingTimeoutMs:100,startupGraceMs:3000}}).start().catch(error=>{console.error(error);process.exit(1);});