|
|
|
@@ -33,6 +33,8 @@ const credentialsScenarioDir = join(snapshotsDir, 'missing-credential')
|
|
|
|
|
const credentialsConfigPath = fileURLToPath(new URL('../credentials.cordis.snapshot.yml', import.meta.url))
|
|
|
|
|
const ralphScenarioDir = join(snapshotsDir, 'ralph-loop')
|
|
|
|
|
const ralphConfigPath = fileURLToPath(new URL('../ralph.cordis.snapshot.yml', import.meta.url))
|
|
|
|
|
const startupFailureConfigPath = fileURLToPath(new URL('./fixtures/startup-activation-error/cordis.yml', import.meta.url))
|
|
|
|
|
const startupFailureExpected = join(snapshotsDir, 'startup-activation-error', 'stderr.expected.txt')
|
|
|
|
|
const binScript = fileURLToPath(new URL('../../../packages/examples/cli-demo/src/bin.ts', import.meta.url))
|
|
|
|
|
const tsconfigPath = fileURLToPath(new URL('../../../tsconfig.json', import.meta.url))
|
|
|
|
|
const reasoningConfigPath = fileURLToPath(new URL('./fixtures/cli.cordis.yml', import.meta.url))
|
|
|
|
@@ -167,6 +169,20 @@ async function persistedLogs(cwd: string): Promise<PersistedLog[]> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
describe('headless stream-json snapshots', () => {
|
|
|
|
|
it('prints the original Loader activation error through the assembled one-shot app', async () => {
|
|
|
|
|
const result = await runLoaderSmoke({
|
|
|
|
|
label: 'headless startup activation error snapshot',
|
|
|
|
|
tempDirPrefix: 'headless-snapshot-startup-error-',
|
|
|
|
|
binScript,
|
|
|
|
|
configPath: startupFailureConfigPath,
|
|
|
|
|
binArgs: ['--config', startupFailureConfigPath, '--output-format', 'stream-json', 'unreachable task'],
|
|
|
|
|
tsconfigPath,
|
|
|
|
|
expectedExitCode: 1,
|
|
|
|
|
})
|
|
|
|
|
expect(result.stdout).toBe('')
|
|
|
|
|
await expect(result.stderr).toMatchFileSnapshot(startupFailureExpected)
|
|
|
|
|
}, LOADER_SMOKE_TEST_TIMEOUT_MS)
|
|
|
|
|
|
|
|
|
|
it('retries a transient provider failure through the one-shot app', async () => {
|
|
|
|
|
const prompt = await scenarioPrompt(retryScenarioDir, 'provider-retry')
|
|
|
|
|
const streamExpected = join(retryScenarioDir, 'stream-json.expected.jsonl')
|
|
|
|
|