test(acp): pin Windows-native snapshot paths

This commit is contained in:
imccyu
2026-07-17 13:53:13 +08:00
parent 86c09f6ca9
commit beb13c3808
10 changed files with 367 additions and 23 deletions
@@ -18,6 +18,7 @@ import {
refreshFixtureReplacements,
restorePinnedToolSchemas,
stabilizeRefreshLog,
stdoutGoldenVariants,
unknownToolCallIds,
} from '../src/suite.ts'
@@ -189,6 +190,31 @@ describe('childFixturePaths', () => {
})
})
describe('stdoutGoldenVariants', () => {
const scenario: Scenario = {
name: 'windows-native',
hasModelTurn: true,
recorded: true,
pinsNativeWindowsStdout: true,
}
it('adds the native sidecar after the shared golden on Windows', () => {
expect(stdoutGoldenVariants(scenario, 'win32')).toEqual([
{ file: 'stdout.golden.jsonl', cwdPathMode: 'canonical' },
{ file: 'stdout.golden.windows.jsonl', cwdPathMode: 'native' },
])
})
it('keeps only the shared golden on other platforms or without the declaration', () => {
expect(stdoutGoldenVariants(scenario, 'linux')).toEqual([
{ file: 'stdout.golden.jsonl', cwdPathMode: 'canonical' },
])
expect(stdoutGoldenVariants({ ...scenario, pinsNativeWindowsStdout: false }, 'win32')).toEqual([
{ file: 'stdout.golden.jsonl', cwdPathMode: 'canonical' },
])
})
})
describe('fixtureContext', () => {
it('reads the fixture header id and cwd', () => {
const ctx = fixtureContext('{"type":"session","id":"abc","cwd":"/rec"}\n{"type":"turn/start"}\n')