Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/sdk/tests/artifact-gates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,13 @@ describe('artifact_exists named gate: static scan coverage', () => {
writeFileSync(join(dir!, 'node_modules/review.md'), 'findings');
};
claudeResult = JSON.stringify({ artifacts: [path] });
// The step declares no cwd: `cwd` here is the worker's run root, which is
// how a contained working directory is expressed since the run-root
// contract landed. Declaring the absolute temp directory on the step is
// refused now ("expected a run-root-relative path"), and this test is
// about gate scanning, not about the shape of a cwd declaration.
const authored = { version: '0.1.0', name: 'x', steps: [{ id: 'review', type: 'agent', instruction: 'i',
cli: 'claude', cwd, verification: { type: 'artifact_exists', path } }] };
cli: 'claude', verification: { type: 'artifact_exists', path } }] };

// `claude` carries a default model, so its probe has to answer the
// model-scoped readiness question too; nothing else about it matters here.
Expand All @@ -327,7 +332,7 @@ describe('artifact_exists named gate: static scan coverage', () => {
client.once('worker-error', reject);
});
const worker = new AgentWorker(client as unknown as JournalClient, {
workerId: 'w', pins: { workspace: [], streams: [] },
workerId: 'w', pins: { workspace: [], streams: [] }, runRoot: cwd,
});
worker.on('error', (error: unknown) => client.emit('worker-error', error));
await worker.attach();
Expand Down
Loading