test(model-proxy): settings-p3 ride-fence: the launch fixture runs its Claude model on claude-code, since a legacy Claude entry counts as OAuth and runs there only; a stand-in adapter path skips only the binary check, so the before launch still reaches the limit checks and the fenced launch after Ride all is still refused with proxy-uncertain (#1873, lane settings-p3)

This commit was merged in pull request #2002.
This commit is contained in:
jason.woltje committed 2026-11-19 15:44:31 -06:00
1 parent dd0a8612c8
commit 6c5ec23b47
1 file changed
+5 -3
@@ -102,10 +102,12 @@ test('after Ride all the launcher asks admission for a direct anthropic route an
}; };
const launchOf = async riding => { const launchOf = async riding => {
const root = tmp(t); const root = tmp(t);
// A Claude model on a legacy entry counts as OAuth and runs on claude-code only. The stand-in adapter
// path skips only the binary check; the launch stops at authorizeLaunch, before any adapter runs.
const f = fixture(root, 'acme', doc => { const f = fixture(root, 'acme', doc => {
doc.plugins = { ...doc.plugins, harness: ['pi'] }; doc.plugins = { ...doc.plugins, harness: ['claude-code'] };
doc.launch.models['claude-opus-5-5'] = { provider: 'anthropic', model: 'claude-opus-5-5' }; doc.launch.models['claude-opus-5-5'] = { provider: 'anthropic', model: 'claude-opus-5-5' };
doc.roles.coder.vars = { harness: 'pi', model: 'claude-opus-5-5', thinking: 'low' }; doc.roles.coder.vars = { harness: 'claude-code', model: 'claude-opus-5-5', thinking: 'low' };
return doc; return doc;
}); });
if (riding) await ride(join(root, 'config', 'businesses', 'acme.json')); if (riding) await ride(join(root, 'config', 'businesses', 'acme.json'));
@@ -119,7 +121,7 @@ test('after Ride all the launcher asks admission for a direct anthropic route an
if (x.op === 'authorizeLaunch') throw Object.assign(Error('fixture authorization stop'), { code: 'fixture-policy' }); if (x.op === 'authorizeLaunch') throw Object.assign(Error('fixture authorization stop'), { code: 'fixture-policy' });
return {}; return {};
} }; } };
const makeLoader = await fakeHarnesses(t, { pi: null }, write => write('model-provider', 'cliproxy', `export * from ${JSON.stringify(new URL('../../plugins/model-provider/cliproxy/index.mjs', import.meta.url).href)};`)); const makeLoader = await fakeHarnesses(t, { 'claude-code': '/fixture-unused' }, write => write('model-provider', 'cliproxy', `export * from ${JSON.stringify(new URL('../../plugins/model-provider/cliproxy/index.mjs', import.meta.url).href)};`));
const system = { ...JSON.parse(readFileSync(f.config, 'utf8')), proxy: { port: 1, binary: '/fixture-unused' } }; const system = { ...JSON.parse(readFileSync(f.config, 'utf8')), proxy: { port: 1, binary: '/fixture-unused' } };
const launcher = createLauncher({ host, system, env: f.env, makeLoader, bwrap: '/usr/bin/true', log: () => {} }); const launcher = createLauncher({ host, system, env: f.env, makeLoader, bwrap: '/usr/bin/true', log: () => {} });
return { answer: await launcher.fromSession('fixture-cap', 'coder'), ops }; return { answer: await launcher.fromSession('fixture-cap', 'coder'), ops };