fix(runtime-fallback): address cubic AI review issues

- Add normalizeFallbackModels helper to centralize string/array normalization (P3)
- Export RuntimeFallbackConfig and FallbackModels types from config/index.ts
- Fix agent detection regex to use word boundaries for sessionID matching
- Improve tests to verify actual fallback switching logic (not just log paths)
- Add SessionCategoryRegistry cleanup in executeSyncTask on completion/error (P2)
- All 24 runtime-fallback tests pass, 115 delegate-task tests pass
This commit is contained in:
um1ng
2026-02-10 00:25:47 +09:00
committed by YeonGyu-Kim
parent f5f54ae1ed
commit ec9ab6b239
5 changed files with 57 additions and 7 deletions
+10
View File
@@ -73,3 +73,13 @@ export function resolveModelWithFallback(
variant: resolved.variant,
}
}
/**
* Normalizes fallback_models config (which can be string or string[]) to string[]
* Centralized helper to avoid duplicated normalization logic
*/
export function normalizeFallbackModels(models: string | string[] | undefined): string[] | undefined {
if (!models) return undefined
if (typeof models === "string") return [models]
return models
}