refactor(runtime): expose shared admission and artifact boundaries (CL26)

This commit is contained in:
Boki 2026-10-28 14:02:03 -04:00
parent 2165a2efa8
commit b4589d5af1
49 changed files with 1790 additions and 1565 deletions

View file

@ -370,9 +370,9 @@ suite('actual OS-isolated candidate runtime', () => {
// The candidate artifact remains inert JSON in this trusted supervisor fixture.
await writeFile(
parentPath,
`import {fork} from 'node:child_process';const child=fork(${JSON.stringify(fileURLToPath(canonicalWorkerUrl))},[],{execPath:process.execPath,execArgv:[],serialization:'json',stdio:['ignore','ignore','pipe','ipc']});child.stderr?.resume();child.send(${JSON.stringify(input)});`
`import {fork} from 'node:child_process';const child=fork(${JSON.stringify(fileURLToPath(canonicalWorkerUrl()))},[],{execPath:process.execPath,execArgv:[],serialization:'json',stdio:['ignore','ignore','pipe','ipc']});child.stderr?.resume();child.send(${JSON.stringify(input)});`
);
const child = fork(target === 'worker' ? fileURLToPath(canonicalWorkerUrl) : parentPath, [], {
const child = fork(target === 'worker' ? fileURLToPath(canonicalWorkerUrl()) : parentPath, [], {
execPath: process.execPath,
execArgv: [],
serialization: 'json',
@ -454,14 +454,14 @@ suite('actual OS-isolated candidate runtime', () => {
'not installed'
);
await absent(f.name);
const hidden = candidateDescriptorPath + '.missing-test-' + randomUUID();
await rename(candidateDescriptorPath, hidden);
const hidden = candidateDescriptorPath() + '.missing-test-' + randomUUID();
await rename(candidateDescriptorPath(), hidden);
try {
await expect(IsolatedCandidateController.start(f.request, f.name)).rejects.toThrow(
'unavailable'
);
} finally {
await rename(hidden, candidateDescriptorPath);
await rename(hidden, candidateDescriptorPath());
}
await absent(f.name);
if (f.request.strategy.origin !== 'candidate') {

View file

@ -373,7 +373,7 @@ describe('retained canonical strategy worker', () => {
)
).rejects.toThrow('canonical bundled worker');
expect(
await new NativeBacktestWorker(canonicalWorkerUrl).execute(
await new NativeBacktestWorker(canonicalWorkerUrl()).execute(
value,
new AbortController().signal,
() => {}