test(executors): restore the #10986 reasoning-only fallback guards - #12364
Merged
diegosouzapw merged 1 commit intoSep 2, 2026
Conversation
…ck guards The diegosouzapw#10265 rewrite of tests/unit/command-code-executor.test.ts (b6412c6) dropped the two regression tests that diegosouzapw#10986 added for reasoning-only Command Code output, even though the production fallback in createJsonResponse / createStreamResponse (open-sse/executors/commandCode.ts) survived that rewrite. Since diegosouzapw#10265 the CLI translator is only reachable through the /alpha/generate fallback taken when /provider/v1/chat/completions answers 403/404, so the restored tests are routed through that path via a shared goPlanFallbackFetch() helper. - non-stream: a reasoning-only /alpha/generate stream yields message.content equal to the reasoning text, with reasoning_content still populated and reasoning_tokens carried through from totalUsage. - stream: exactly one synthesized content delta is emitted, after the reasoning delta and before the finish chunk. Both tests pass against the current fallback and fail when that fallback is disabled. No production code changed. Related to diegosouzapw#10986, diegosouzapw#12130 Co-authored-by: Leon Marcos <leonaniagomez@gmail.com>
pacocartones
force-pushed
the
test/restore-10986-reasoning-only-guards
branch
from
September 1, 2026 23:30
354f34a to
4f90cfc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/unit/command-code-executor.test.ts(b6412c6) deleted them, even though the production fallback increateJsonResponse/createStreamResponse(open-sse/executors/commandCode.ts) survived that rewrite, leaving it unguarded./alpha/generatefallback taken when/provider/v1/chat/completionsanswers 403/404, so both tests are routed through that path via a sharedgoPlanFallbackFetch()helper./alpha/generatestream yieldsmessage.contentequal to the reasoning text,reasoning_contentstays populated,reasoning_tokensis carried through fromtotalUsage.Related Issues
Validation
tests/unit/command-code-executor.test.tsvia the repository runner, 18 pass / 0 fail. Disabling the three fallback guards incommandCode.tsmakes exactly these two tests fail (non-streamcontentbecomes""; stream emits 0 content deltas); the file was restored unchanged afterward.npm run lint— repository-wide eslint exit 0 (run with--pass-on-unpruned-suppressions; the literal command reports only pre-existing unused global suppressions on this base);npm run typecheck:core0;git diff --checkclean;npm run check:changelog-integrityOKrelease/v3.8.51@158647618; focused checks rerun afterwardTests Added Or Updated
tests/unit/command-code-executor.test.ts: addedgoPlanFallbackFetch()helper and two tests:Command Code /alpha/generate fallback: reasoning-only output falls back to reasoning as content (non-stream) (#10986)Command Code /alpha/generate fallback: reasoning-only output emits a content delta chunk when streaming (#10986)Coverage Notes
src/,open-sse/,electron/, orbin/. The restored tests exercise the existing reasoning-only branches ofcreateJsonResponseandcreateStreamResponseinopen-sse/executors/commandCode.ts, so coverage of that file can only move up.Reviewer Notes
changelog.d/maintenance/entry can be added if preferred.