Skip to content

fix(core): fail empty provider output - #37379

Closed
rasitakyol wants to merge 1 commit into
anomalyco:v2from
rasitakyol:empty-response
Closed

fix(core): fail empty provider output#37379
rasitakyol wants to merge 1 commit into
anomalyco:v2from
rasitakyol:empty-response

Conversation

@rasitakyol

Copy link
Copy Markdown

Issue for this PR

Closes #37372

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Treats a successful provider stream with no visible text or tool call as provider.invalid-output. This prevents empty or reasoning-only responses from ending the execution as a silent success.

The test fixtures that intentionally represent successful turns now include usable text or a completed tool call.

How did you verify your code works?

  • Ran bun test test/session-runner.test.ts test/session-execution.test.ts --only-failures: 135 tests passed.
  • Ran bun typecheck in packages/core.
  • Passed the pre-push workspace typecheck: 32/32 tasks.
  • Ran targeted Oxlint and git diff --check.

Screenshots / recordings

Not applicable; this changes the V2 provider-completion contract and tests.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@rasitakyol

Copy link
Copy Markdown
Author

The linked issue is #37372 and the PR body contains Closes #37372. This change targets v2 because the affected Session V2 implementation is not present on dev. GitHub does not populate closingIssuesReferences for a PR whose base is not the default branch, so the standards workflow added needs:issue despite the explicit reference. Retargeting to dev would include the unrelated divergent v2 branch. Maintainers: please confirm this is the preferred base and remove the false-positive label, or advise the expected linkage for v2 PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant