mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 00:52:18 +03:00
fix(sse): preserve auto scoring order (#11400)
Validado em lote combinado (batch-0824f, junto de #11399/#11402/#11407) contra o tip de release/v3.8.50: typecheck:core limpo, file-size/changelog/complexity/cognitive-complexity OK, 56/56 testes focados passando incluindo os deste PR (tests/unit/combo-task-aware.test.ts). Remove `auto` da lista de estratégias task-routing genéricas — coerente com o #11399, que também protege a ordem já computada pelo `auto` contra reordenação por outro pós-processamento. Obrigado pela contribuição!
This commit is contained in:
@@ -64,7 +64,7 @@ const MAX_CONVERSATION_AFFINITY_ENTRIES = 1000;
|
||||
* Task routing is additive: other strategies are wholly unaffected.
|
||||
*/
|
||||
export function isTaskRoutingStrategy(strategy: unknown): boolean {
|
||||
return ["smart", "task", "task-aware", "task_aware", "auto"].includes(
|
||||
return ["smart", "task", "task-aware", "task_aware"].includes(
|
||||
String(strategy ?? "").toLowerCase()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -255,9 +255,10 @@ describe("reorderByTaskWeight", () => {
|
||||
|
||||
describe("isTaskRoutingStrategy", () => {
|
||||
it("returns true for task-aware strategy names", () => {
|
||||
for (const name of ["smart", "task", "task-aware", "task_aware", "auto"]) {
|
||||
for (const name of ["smart", "task", "task-aware", "task_aware"]) {
|
||||
assert.ok(isTaskRoutingStrategy(name), `Expected ${name} to be task-routing`);
|
||||
}
|
||||
assert.ok(!isTaskRoutingStrategy("auto"), "auto scoring must not be reordered by task routing");
|
||||
});
|
||||
|
||||
it("is case-insensitive", () => {
|
||||
|
||||
Reference in New Issue
Block a user