fix(cutover): launch gateway without wrapper pid

This commit is contained in:
chick
2026-07-18 17:46:05 +08:00
parent f7d111588b
commit 020879f7e6
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ import { PRODUCTION_CUTOVER_ACK } from './canary-runtime.js';
const STATE_VERSION = 1; const STATE_VERSION = 1;
const STATE_FILE = 'cutover-state.json'; const STATE_FILE = 'cutover-state.json';
const GATEWAY_ARGV = [ const GATEWAY_ARGV = [
resolve(process.cwd(), 'apps/api/node_modules/.bin/tsx'), process.execPath,
'--import',
resolve(process.cwd(), 'node_modules/.pnpm/tsx@4.22.4/node_modules/tsx/dist/loader.mjs'),
resolve(process.cwd(), 'apps/api/src/production-gateway-cli.ts'), resolve(process.cwd(), 'apps/api/src/production-gateway-cli.ts'),
] as const; ] as const;
const DIGEST = /^[a-f0-9]{64}$/u; const DIGEST = /^[a-f0-9]{64}$/u;
+3 -1
View File
@@ -144,7 +144,9 @@ describe('cutover validation and reversible orchestration', () => {
expect(signals).toEqual([41, 42]); expect(signals).toEqual([41, 42]);
expect(starts.map((start) => start.argv)).toEqual([ expect(starts.map((start) => start.argv)).toEqual([
[ [
resolve(process.cwd(), 'apps/api/node_modules/.bin/tsx'), process.execPath,
'--import',
resolve(process.cwd(), 'node_modules/.pnpm/tsx@4.22.4/node_modules/tsx/dist/loader.mjs'),
resolve(process.cwd(), 'apps/api/src/production-gateway-cli.ts'), resolve(process.cwd(), 'apps/api/src/production-gateway-cli.ts'),
], ],
['/usr/bin/true', 'legacy'], ['/usr/bin/true', 'legacy'],