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:
Jacob Stoner
2026-08-24 13:16:04 -04:00
committed by GitHub
parent b1fdfd5ea4
commit ddee064f1b
2 changed files with 3 additions and 2 deletions

View File

@@ -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()
);
}

View File

@@ -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", () => {