修复 AGC 本地 BgFilter worker 启动链路
Project CI / Repository checks (pull_request) Successful in 3m58s
Project CI / Frontend tests (pull_request) Successful in 4m46s
Project CI / Backend tests (pull_request) Successful in 6m12s
Project CI / Native shell tests (pull_request) Successful in 15m48s

backend 模式复用 Rust 双进程启动与 watcher

AGC 后端复用门禁增加 BgFilter worker readiness

补充启动编排与 ready 门禁回归测试

同步本地开发运维文档
This commit is contained in:
2026-09-02 13:27:27 +00:00
parent aad9be8274
commit d522ad0135
5 changed files with 86 additions and 11 deletions
+2 -3
View File
@@ -1619,9 +1619,8 @@ class DevRunner {
if (command === 'backend') {
await this.startSpacetimeForFullStack();
await this.services.get('api-server').start();
await this.waitForApiServer();
this.startWatchers(['spacetime', 'api-server']);
await this.startRustServicePair();
this.startWatchers(['spacetime', 'api-server', 'bgfilter-worker']);
return;
}
+24
View File
@@ -500,6 +500,30 @@ describe('dev scheduler Rust service orchestration', () => {
]);
});
test('backend 模式复用 Rust 双进程并纳入三服务 watcher', async () => {
const { explicitOptions, options } = parseArgs(['backend'], {});
const runner = new DevRunner(options, {}, explicitOptions);
const startSpacetime = vi
.spyOn(runner, 'startSpacetimeForFullStack')
.mockResolvedValue(undefined);
const startPair = vi
.spyOn(runner, 'startRustServicePair')
.mockResolvedValue(undefined);
const startWatchers = vi
.spyOn(runner, 'startWatchers')
.mockImplementation(() => {});
await runner.startCommand('backend');
expect(startSpacetime).toHaveBeenCalledOnce();
expect(startPair).toHaveBeenCalledOnce();
expect(startWatchers).toHaveBeenCalledWith([
'spacetime',
'api-server',
'bgfilter-worker',
]);
});
test('完整栈只为两个 Rust 角色创建一套组合 watcher', () => {
const { explicitOptions, options } = parseArgs(['--watch'], {});
const runner = new DevRunner(options, {}, explicitOptions);