Skip to content

[Refactor] Roll out stream helpers to OpenAI spec - #1093

Merged
edelauna merged 1 commit into
mainfrom
refactor/openai-spec-stream-test-utils-06q4nypl2c73c
Aug 1, 2026
Merged

[Refactor] Roll out stream helpers to OpenAI spec#1093
edelauna merged 1 commit into
mainfrom
refactor/openai-spec-stream-test-utils-06q4nypl2c73c

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

  • Migrated the standalone openai.spec.ts follow-up to the shared stream helpers.
  • Replaced every inline Symbol.asyncIterator mock, including both async function* generators and custom next-chain iterators, with asyncStreamFrom.
  • Replaced all pure collect loops and empty drain loops with collectStream, including rejection-drain loops inside expect(...).rejects.
  • Reduced the openai.spec.ts ESLint suppressions count from 25 to 4 after removing obsolete chunks: any[] declarations.

Why this change was made

This is the deferred larger follow-up from the previous batch, kept as its own PR so the diff stays reviewable while still clearing one of the biggest remaining provider-spec stream-mock files.

Impact

No user-facing behavior change. One of the largest provider specs now uses the shared stream-helper idiom, the full spec passed, src lint/typecheck passed, and the full Zoo-Code test suite passed.

Related PRs

@zoomote

zoomote Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

Reviewed the stream-helper rollout in openai.spec.ts: every replaced inline Symbol.asyncIterator mock and collect/drain loop maps cleanly onto asyncStreamFrom/collectStream, all 64 spec tests pass locally, ESLint passes with the reduced suppression count of 4 (matching the actual remaining any usages), and there is no user-facing behavior change.

Reviewed 8890636

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna
edelauna marked this pull request as ready for review August 1, 2026 16:54
@edelauna
edelauna enabled auto-merge August 1, 2026 16:54
@edelauna
edelauna added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit 176b626 Aug 1, 2026
23 checks passed
@edelauna
edelauna deleted the refactor/openai-spec-stream-test-utils-06q4nypl2c73c branch August 1, 2026 17:16
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