fix: meta-tester cwd path double-nesting bug
CI / test (push) Has been cancelled

tester was running 'cd packages/pulse && bun test packages/pulse/...'
which doubled the path. Fixed to cwd=packages/pulse + relative paths.
This commit is contained in:
2026-04-17 10:39:40 +00:00
parent 592a5566a5
commit 029417ce33
2 changed files with 8 additions and 4 deletions
+5 -2
View File
@@ -81,11 +81,14 @@ function metaModerator(
case 'coder':
return 'reviewer';
case 'reviewer': {
const verdict = (input.meta as MetaReviewerMeta | null)?.verdict;
const meta = input.meta as MetaReviewerMeta | null;
const verdict = meta?.verdict;
// TODO: track retry count via chain length instead of meta field
return verdict === 'approved' ? 'tester' : 'coder';
}
case 'tester': {
const pass = (input.meta as MetaTesterMeta | null)?.pass;
const meta = input.meta as MetaTesterMeta | null;
const pass = meta?.pass;
return pass ? 'promoter' : 'coder';
}
case 'promoter':
@@ -5,6 +5,7 @@
*/
import { execSync } from 'node:child_process';
import { join } from 'node:path';
import type { LlmClient } from '../../llm-client.js';
import type { MetaTesterMeta } from '../meta.js';
import type { Role, RoleResult, WorkflowMessage } from '../workflow-type.js';
@@ -45,8 +46,8 @@ export function createMetaTesterRole(
let testOutput: string;
try {
testOutput = execSync(
'cd packages/pulse && bun run build 2>&1 && bun test packages/pulse/src/workflows/ 2>&1',
{ cwd: opts.repoDir, timeout: 60_000, encoding: 'utf-8' },
'bun run build 2>&1 && cd ../.. && bun test packages/pulse/src/workflows/ 2>&1',
{ cwd: join(opts.repoDir, 'packages/pulse'), timeout: 60_000, encoding: 'utf-8' },
);
} catch (err: any) {
testOutput = err.stdout ?? err.message;