Skip to content

fix(sse): preserve auto scoring order - #11400

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
jacobsparts:fix/auto-task-reorder
Aug 24, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
jacobsparts:fix/auto-task-reorder

Conversation

@jacobsparts

@jacobsparts jacobsparts commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Auto routing already includes task fitness as one of its scoring criteria. Running the separate generic task-aware reorder afterward scored task fit a second time and could overwrite the final order produced by the full auto score.

Summary

  • Stop generic task-aware post-processing from reordering targets after auto routing has completed scoring.
  • The task-routing predicate no longer classifies auto as a generic task strategy; explicit task strategies retain their behavior.

Related Issues

Validation

  • Change type: routing
  • Focused regression test passed
  • Focused category gates from the Contribution Golden Path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

This is a draft. Final category-gate and lint results will be recorded before review.

Tests Added Or Updated

  • tests/unit/combo-task-aware.test.ts

Coverage Notes

  • The updated regression verifies that auto bypasses generic task reordering while explicit task strategies remain eligible.
  • No known touched-file coverage decrease.

Reviewer Notes

  • Task fitness is not removed: it remains part of auto candidate scoring.
  • Explicit task-aware strategies retain their existing post-processing behavior.
  • The optional taskFit=0 defense is excluded because it would broaden semantics without a demonstrated regression.

Generic task-aware routing could reorder candidates after auto scoring had finalized their rank. Remove auto from that strategy gate while leaving explicitly task-aware strategies unchanged.
@jacobsparts
jacobsparts force-pushed the fix/auto-task-reorder branch from 3ee1cda to e9efb86 Compare August 24, 2026 16:37
@diegosouzapw
diegosouzapw marked this pull request as ready for review August 24, 2026 17:15
@diegosouzapw
diegosouzapw self-requested a review as a code owner August 24, 2026 17:15
diegosouzapw pushed a commit that referenced this pull request Aug 24, 2026
Validado em lote combinado (batch-0824f, junto de #11400/#11402/#11407) contra o tip de release/v3.8.50: typecheck:core limpo, file-size/changelog/complexity/cognitive-complexity OK (abaixo do baseline), 56/56 testes focados passando incluindo os deste PR (tests/unit/8370-priority-affinity-reorder.test.ts).

Aditivo e coerente: protege a ordem já decidida pelo `auto` contra reordenação pelo pós-processamento de prompt-cache-affinity — mesma linha do #11400. Obrigado pela contribuição!
@diegosouzapw
diegosouzapw merged commit ddee064 into diegosouzapw:release/v3.8.50 Aug 24, 2026
3 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 24, 2026
Validado em lote combinado (batch-0824f, junto de #11399/#11400/#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-scoring-inspector.test.ts).

Baixo risco: normaliza pesos parciais/não-unitários no inspector de diagnóstico (`comboScoringInspector.ts`) reutilizando o normalizador já existente do motor real de scoring, mantendo diagnósticos consistentes com o runtime. Obrigado pela contribuição!
diegosouzapw pushed a commit that referenced this pull request Aug 24, 2026
Validado em lote combinado (batch-0824f, junto de #11399/#11400/#11402) 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/autocombo-unification.test.ts).

Baixo risco: expõe a opção "custom" já suportada em runtime (`getModePack("custom") === undefined`, cai de volta para os pesos explícitos dos sliders) no seletor compartilhado de mode-pack da UI. Obrigado pela contribuição!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Validado em lote combinado (batch-0824f, junto de diegosouzapw#11400/diegosouzapw#11402/diegosouzapw#11407) contra o tip de release/v3.8.50: typecheck:core limpo, file-size/changelog/complexity/cognitive-complexity OK (abaixo do baseline), 56/56 testes focados passando incluindo os deste PR (tests/unit/8370-priority-affinity-reorder.test.ts).

Aditivo e coerente: protege a ordem já decidida pelo `auto` contra reordenação pelo pós-processamento de prompt-cache-affinity — mesma linha do diegosouzapw#11400. Obrigado pela contribuição!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Validado em lote combinado (batch-0824f, junto de diegosouzapw#11399/diegosouzapw#11402/diegosouzapw#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 diegosouzapw#11399, que também protege a ordem já computada pelo `auto` contra reordenação por outro pós-processamento. Obrigado pela contribuição!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Validado em lote combinado (batch-0824f, junto de diegosouzapw#11399/diegosouzapw#11400/diegosouzapw#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-scoring-inspector.test.ts).

Baixo risco: normaliza pesos parciais/não-unitários no inspector de diagnóstico (`comboScoringInspector.ts`) reutilizando o normalizador já existente do motor real de scoring, mantendo diagnósticos consistentes com o runtime. Obrigado pela contribuição!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Validado em lote combinado (batch-0824f, junto de diegosouzapw#11399/diegosouzapw#11400/diegosouzapw#11402) 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/autocombo-unification.test.ts).

Baixo risco: expõe a opção "custom" já suportada em runtime (`getModePack("custom") === undefined`, cai de volta para os pesos explícitos dos sliders) no seletor compartilhado de mode-pack da UI. Obrigado pela contribuição!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants