Skip to content

Commit d4774b5

Browse files
committed
Merge branch 'replatform/tauri-shell' into cx/openwork-tauri-pr2
2 parents 09a9422 + d043eea commit d4774b5

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

integration-tests/cli/_daemon-harness.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,8 @@ export function startRssPolling(pid: number, intervalMs = 100): RssPoller {
340340
* `qwen --acp` process between the daemon-facing ACP child and stdio MCP
341341
* servers.
342342
*
343-
* `pgrepOpts.acpFilter` defaults to `'qwen.*--acp'` (matches the spawned
344-
* `qwen --acp` child); pass an override only if a future bridge changes
345-
* the ACP child invocation shape.
343+
* `pgrepOpts.acpFilter` defaults to matching the `--acp` argument; pass an
344+
* override only if a future bridge changes the ACP child invocation shape.
346345
*
347346
* Returns explicit PID arrays so callers can cross-check (e.g., assert
348347
* the ACP child PID matches what the test setup observed). `total` is
@@ -358,7 +357,8 @@ export function countDescendants(
358357
daemonPid: number,
359358
pgrepOpts: { acpFilter?: string; mcpFilter?: string } = {},
360359
): DescendantCount {
361-
const acpFilter = pgrepOpts.acpFilter ?? 'qwen.*--acp';
360+
const acpFilter =
361+
pgrepOpts.acpFilter ?? '(^|[[:space:]])--acp([[:space:]]|$)';
362362
const acpChildren = pgrepChildren(daemonPid, acpFilter);
363363
const mcpGrandchildren: number[] = [];
364364
for (const acpPid of acpChildren) {

integration-tests/cli/qwen-serve-streaming.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import {
6060
startFakeOpenAIServer,
6161
type FakeOpenAIServer,
6262
} from '../fake-openai-server.js';
63+
import { countDescendants } from './_daemon-harness.js';
6364

6465
const __dirname = path.dirname(fileURLToPath(import.meta.url));
6566
const REPO_ROOT = path.resolve(__dirname, '../..');
@@ -395,13 +396,7 @@ describePOSIX('qwen serve — child-crash recovery (real SIGKILL)', () => {
395396
workspaceCwd: workspaceDir,
396397
});
397398

398-
// Find the daemon's direct `--acp` child PID.
399-
const childPids = execSync(`pgrep -P ${daemon.pid} -f "qwen.*--acp"`, {
400-
encoding: 'utf8',
401-
})
402-
.trim()
403-
.split('\n')
404-
.filter(Boolean);
399+
const childPids = countDescendants(daemon.pid!).acpChildren;
405400
expect(childPids.length).toBeGreaterThanOrEqual(1);
406401

407402
const ac = new AbortController();

0 commit comments

Comments
 (0)