Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions packages/eval/src/__tests__/lifecycle-boundaries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import test from 'node:test';
import { fileURLToPath } from 'node:url';
import { promisify } from 'node:util';
import { FileAttemptStore } from '../attempt-store.js';
import type { ExperimentCell, ExperimentSpec, JsonObject } from '../experiment.js';
Expand Down Expand Up @@ -601,7 +602,7 @@ test('the Maka shim projects only a completed subject as a zero exit', async ()
)},shortCircuit:true}:n(s,c)}`,
)}",import.meta.url)`,
)}`,
shim.pathname,
fileURLToPath(shim),
Buffer.from(
JSON.stringify({
rootPath: join(root, 'state'),
Expand Down Expand Up @@ -859,7 +860,9 @@ test('eight-arm spec and wrappers freeze the working provider contracts', async
// These subjects run `/usr/bin/true` and never reach the provider, so
// each one is an infrastructure failure and exits nonzero: the exit code
// now carries the semantic status for the relay's benefit.
const stdout = await execFileAsync(process.execPath, [wrapper.pathname, ...args], { env })
const stdout = await execFileAsync(process.execPath, [fileURLToPath(wrapper), ...args], {
env,
})
.then((settled) => settled.stdout)
.catch((error: { stdout?: string }) => {
assert.equal(typeof error.stdout, 'string');
Expand Down
16 changes: 12 additions & 4 deletions packages/eval/src/__tests__/provider-admission-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { createServer } from 'node:http';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import test from 'node:test';
import { fileURLToPath } from 'node:url';
import { promisify } from 'node:util';
import { meteringCheckpointMacMatches } from '../metering-checkpoint.js';

Expand Down Expand Up @@ -76,7 +77,7 @@ test('provider metering checkpoint records admission before the request settles'
const wrapperProcess = spawn(
process.execPath,
[
wrapper.pathname,
fileURLToPath(wrapper),
'opencode',
`http://127.0.0.1:${address.port}`,
root,
Expand Down Expand Up @@ -163,7 +164,7 @@ test('provider failures remain infrastructure failures until inference admission
const wrapper = new URL('../harbor-external-subject.js', import.meta.url);
const { stdout, exitCode } = await runWrapper(
[
wrapper.pathname,
fileURLToPath(wrapper),
'opencode',
`http://127.0.0.1:${address.port}`,
root,
Expand Down Expand Up @@ -292,7 +293,14 @@ async function executePiWithTerminalRecord(contentBytes: number): Promise<{
try {
const wrapper = new URL('../harbor-external-subject.js', import.meta.url);
const { stdout } = await runWrapper(
[wrapper.pathname, 'pi', `http://127.0.0.1:${address.port}`, root, process.execPath, child],
[
fileURLToPath(wrapper),
'pi',
`http://127.0.0.1:${address.port}`,
root,
process.execPath,
child,
],
{ OPENAI_API_KEY: 'upstream-test-key', MAKA_EVAL_RESULT_TOKEN: RESULT_TOKEN },
);
return decodeResultFrame(stdout) as Awaited<ReturnType<typeof executePiWithTerminalRecord>>;
Expand Down Expand Up @@ -388,7 +396,7 @@ process.exit(1);
const wrapper = new URL('../harbor-external-subject.js', import.meta.url);
const { stdout } = await runWrapper(
[
wrapper.pathname,
fileURLToPath(wrapper),
'opencode',
`http://127.0.0.1:${address.port}`,
root,
Expand Down