Repository navigation
test(executors): drop the tool-truncation assertion #11444 removed the code for - #11591
Conversation
…#11444 removed the code for `Unit Tests fast-path` is red on every branch: ✖ truncates an over-long tools array to 128 entries 200 !== 128 Two tests in this repo asserted opposite contracts for the same call. `opencode-tools-no-truncation.test.ts` (cheaper-inference#11444) pins that `OpencodeExecutor.transformRequest` forwards a 150+ tool array intact, because the executor's own `tools.slice(0, 128)` dropped every tool past the 128th — task, skill, write, read — and left subagent runs paralyzed. This file still asserted the truncation that fix removed. Limiting is the chatCore layer's job now: `upstreamBody.truncateToolList()` reads a per-provider limit from `toolLimitDetector` instead of a hardcoded 128, so grok-cli (200) and nvidia (1536) are not cut at someone else's ceiling. Rather than delete the case, it now pins the same direction from this file's angle — the TS 7 narrowing fix must not let the cap creep back in here — so the two files agree instead of racing.
|
CI note: this run shows one failure that is not from this PR — Evidence it is unrelated:
It looks like a timing-boundary flake rather than a one-off: the test sets I have not read the retry internals closely enough to be sure that is the mechanism, so I am flagging it rather than sending a fix. Happy to dig in and send one if you would like. |
88939a3
into
cheaper-inference:release/v3.8.51
…es registration (#9282) (#11609) Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). Dois conflitos, ambos triviais: (1) stryker.conf.json — mesma linha com indentação diferente, mantida a indentação correta; (2) ts7-executor-shared-shapes.test.ts — mesma correção já coberta por #11591/#11608 (mergeados neste lote), mantido o describe/comentário melhor deste PR sobre a asserção já validada. Validado: 4/4 testes passando. Obrigado pela contribuição.
Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). 7 conflitos, todos triviais/duplicados (mesmos base-reds já corrigidos por PRs paralelas mergeadas neste lote — #11580/#11582/#11583/#11585/#11588/#11589/#11590/#11591/#11609): mantida a versão já validada nesses casos. Validado: 68/68 testes passando. Obrigado por resolver os base-reds.
…#11444 removed the code for (cheaper-inference#11591) Merged via /merge-batch (lote 2026-08-26, v3.8.51). Boarded no worktree combinado junto com outras ~30 PRs; validação única: typecheck/complexity/cognitive-complexity/changelog-integrity verdes, file-size rebaseado onde necessário (crescimento legítimo), lint com os mesmos 228 achados pré-existentes confirmados via sonda contra o tip puro (não introduzidos por este lote), e ~370 testes focados (unit + vitest) passando. Obrigado pela contribuição.
…es registration (cheaper-inference#9282) (cheaper-inference#11609) Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). Dois conflitos, ambos triviais: (1) stryker.conf.json — mesma linha com indentação diferente, mantida a indentação correta; (2) ts7-executor-shared-shapes.test.ts — mesma correção já coberta por cheaper-inference#11591/cheaper-inference#11608 (mergeados neste lote), mantido o describe/comentário melhor deste PR sobre a asserção já validada. Validado: 4/4 testes passando. Obrigado pela contribuição.
…per-inference#11608) Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). 7 conflitos, todos triviais/duplicados (mesmos base-reds já corrigidos por PRs paralelas mergeadas neste lote — cheaper-inference#11580/cheaper-inference#11582/cheaper-inference#11583/cheaper-inference#11585/cheaper-inference#11588/cheaper-inference#11589/cheaper-inference#11590/cheaper-inference#11591/cheaper-inference#11609): mantida a versão já validada nesses casos. Validado: 68/68 testes passando. Obrigado por resolver os base-reds.
Part of the "every gate is red on every branch" cleanup — one of six independent unit-test failures on
release/v3.8.51.The red test
Two tests asserted opposite contracts for the same call
tests/unit/opencode-tools-no-truncation.test.tsexists specifically to pin theopposite, and it passes today:
So the removal was deliberate and fixed a real user-facing bug (#11444). This file still
asserted the truncation that fix removed.
Why the behaviour is better where it moved
upstreamBody.truncateToolList()reads a per-provider limit(
getKnownToolLimit→PROVIDER_TOOL_LIMITS) rather than a hardcoded 128, sogrok-cli(200) andnvidia(1536) are no longer cut at someone else's ceiling, andbypassDefaultToolLimitgives callers an escape the executor-level slice never had.What changed
I did not delete the case. It now pins the same direction from this file's angle — the
TS 7 narrowing fix (#8484) must not let the cap creep back in here — so the two files
agree instead of racing:
The describe title lost the word "truncation" for the same reason.
Verification
Both files, run together:
Test-only; no production code touched.