统一 AGC 开发端口分配
Project CI / Repository checks (push) Failing after 1m2s
Project CI / Frontend tests (push) Successful in 3m19s
Project CI / Backend tests (push) Successful in 4m18s
Project CI / Native shell tests (push) Failing after 11m47s

将 AGC Vite 纳入 Linux 用户端口段第六槽位
同步 Tauri devUrl、Vite 监听和配套后端端口预留
兼容迁移旧五端口注册记录并阻止重复分配
补齐动态配置顺序、跨平台和进程生命周期回归测试
更新开发运维文档、端口 skill 与项目共享记忆
This commit is contained in:
2026-08-08 16:18:45 +08:00
parent 6b1dfc77d9
commit 83f07fc58d
19 changed files with 710 additions and 96 deletions
+32
View File
@@ -187,6 +187,38 @@ describe('dev scheduler argument routing', () => {
}
});
linuxTest(
'Linux 配套后端不会漂移到父启动器预留的 AGC Vite 端口',
async () => {
const tempDir = mkdtempSync(
join(tmpdir(), 'genarrative-dev-port-range-'),
);
const baseEnv = {
USER: 'alice',
LOGNAME: 'alice',
GENARRATIVE_DEV_PORT_RANGE: '22000-22099',
GENARRATIVE_DEV_PORT_RANGE_REGISTRY_DIR: tempDir,
GENARRATIVE_AGC_VITE_PORT: '22002',
};
try {
const { command, explicitOptions, options } = parseArgs(
['backend'],
baseEnv,
);
const runner = new DevRunner(options, baseEnv, explicitOptions);
await runner.prepareLinuxPortRange(command);
await runner.resolvePorts(command);
expect(runner.options.spacetimePort).not.toBe(22002);
expect(runner.options.apiPort).not.toBe(22002);
expect(runner.options.bgfilterWorkerPort).not.toBe(22002);
} finally {
rmSync(tempDir, { recursive: true, force: true });
}
},
);
linuxTest(
'Linux 桌面壳显式指定 web-port 时不被系统级端口段改写',
async () => {