mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-14 04:01:35 +00:00
fix(snapshot): honor ACP-local sidecar sources
This commit is contained in:
@@ -42,12 +42,18 @@ const controllerCases: readonly {
|
||||
},
|
||||
] as const
|
||||
|
||||
function localScenarioSource(source: string | undefined): string | undefined {
|
||||
return source?.includes('/') === false ? source : undefined
|
||||
}
|
||||
|
||||
const scenarios: Scenario[] = controllerCases.map((controller) => {
|
||||
const manifestPath = join(corpusDir, controller.name, 'snapshot.yml')
|
||||
const manifest = parseSnapshotManifest(readFileSync(manifestPath, 'utf8'), manifestPath)
|
||||
if (manifest.recording === undefined || manifest.header === undefined) {
|
||||
throw new Error(`${controller.name}: ACP snapshot manifest lacks recording or header metadata`)
|
||||
}
|
||||
const systemPromptSource = localScenarioSource(manifest.header.systemPromptSource)
|
||||
const toolSchemasSource = localScenarioSource(manifest.header.toolSchemasSource)
|
||||
return {
|
||||
...controller,
|
||||
recorded: manifest.recording === 'live',
|
||||
@@ -55,6 +61,8 @@ const scenarios: Scenario[] = controllerCases.map((controller) => {
|
||||
...(manifest.header.pin === true ? { pinsHeader: true } : {}),
|
||||
...(manifest.header.changes === undefined ? {} : { expectedHeaderChanges: manifest.header.changes }),
|
||||
headerClass: manifest.header.class,
|
||||
...(systemPromptSource === undefined ? {} : { systemPromptSource }),
|
||||
...(toolSchemasSource === undefined ? {} : { toolSchemasSource }),
|
||||
...(manifest.platform === 'posix' ? { posixOnly: true } : {}),
|
||||
...(manifest.platform === 'pwsh' ? { pwshOnly: true } : {}),
|
||||
...(controller.configPath === undefined ? {} : { configPath: controller.configPath }),
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../escalation-approved/tool-schemas.expected.json
|
||||
Reference in New Issue
Block a user