fix(examples): remove legacy retry rejection

This commit is contained in:
Turtle
2026-07-25 16:28:31 +08:00
parent 5345e93ceb
commit fcd355bf45
14 changed files with 4 additions and 113 deletions

View File

@@ -67,8 +67,6 @@ export interface Config {
toolTasks?: NonNullable<agentCore.Config['toolTasks']>
/** Persisted same-session goals; owner defaults enable them, or false disables the stack and tools. */
goals?: agentCore.GoalConfig | false
/** Invalid at app level; configure `retryPolicy` under each provider. */
llmRetry?: never
}
// Each front door owns a complete, directly readable config schema; extracting
@@ -94,8 +92,6 @@ export const Config: z<Config> = z.object({
toolBash: agentCore.ToolBashConfigSchema,
toolTasks: z.union([z.const(false), agentCore.ToolTasksConfigSchema]),
goals: z.union([z.const(false), agentCore.GoalConfigSchema]),
// Provider retryPolicy makes a top-level llmRetry invalid.
llmRetry: z.never(),
})
/* jscpd:ignore-end */

View File

@@ -76,16 +76,6 @@ async function withIsolatedSkillHomes<T>(run: () => Promise<T>): Promise<T> {
}
describe('dsh-acp-demo composition', () => {
it('rejects app-level llmRetry config through plugin validation', async () => {
const ctx = new Context()
await expect(ctx.plugin(acpAgent, {
provider: 'mock',
model: 'mock',
workspaceContext: false,
llmRetry: { maxTransientRetries: 2 },
} as never)).rejects.toThrow(/llmRetry/)
})
it('brings up the spine + persistence + the ACP bridge', async () => {
const ctx = await mount({
provider: 'mock',

View File

@@ -208,19 +208,6 @@ describe.skipIf(!existsSync(acpBin))('dsh-acp-demo BUILT bin (node lib/bin.js, n
expect(stderr).toContain('config file not found')
}, 30_000)
it('rejects legacy app-level llmRetry through the published Loader path', async () => {
consumer = await makeConsumer()
const configPath = join(consumer, 'cordis.yml')
const config = await readFile(configPath, 'utf8')
await writeFile(configPath, config.replace(
' workspaceContext: false',
' workspaceContext: false\n llmRetry:\n maxTransientRetries: 2',
))
const { code, stderr } = await runBinExpectingExit('./cordis.yml', consumer)
expect(code).not.toBe(0)
expect(stderr).toContain('llmRetry')
}, 30_000)
})
/** Spawn the built acp bin against `configArg` and resolve with its exit code + stderr. */