Skip to content

test: add cross-PR scenario suite - #594

Open
LukasParke wants to merge 4 commits into
mainfrom
claude/scenario-suite
Open

LukasParke wants to merge 4 commits into
mainfrom
claude/scenario-suite

Conversation

@LukasParke

@LukasParke LukasParke commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a cross-PR scenario suite (122 tests over 8 files) under src/tests/scenarios/. It drives the provider through ai's public APIs (generateText, streamText, experimental_evaluate, provider registry, workflow serde) with a mocked fetch. It covers cache control, Decisions, media (imageDetail, videoProcessing, image routing), reasoning params and streaming, tool-call streaming and workflow serialization.

I ran the suite 3 times in each of node and edge: 126/126 passed every time (before the known-bug tests moved out), in about 4-5s per run.

Checklist

  • I have run pnpm stylecheck and pnpm typecheck
  • I have run pnpm test and all tests pass
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)

Changeset

  • I have run pnpm changeset to create a changeset file

Note: A changeset is required for your changes to trigger a release. If your PR only contains docs, tests, or CI changes that don't need a release, run pnpm changeset --empty instead.

🤖 Generated with Claude Code


Devin Review

Adds 126 scenario tests under src/tests/scenarios/ that exercise the
provider through generateText/streamText/evaluate/registry with a mocked
fetch. A global fetch guard fails any request that bypasses the mock.
The 20k-delta streaming test asserts on the number of large JSON
re-parses instead of wall time. Four known bugs stay as it.fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Removes the four it.fails scenarios. Each is covered by a regression test
in the PR that fixes it (#596, #598, #601), so main no longer goes red when
one of those fixes merges.

Adds the property suite's biome override after the scenario one, in the
same form as #599, so the two PRs merge without a conflict.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LukasParke added a commit that referenced this pull request Oct 23, 2026
…Text

Moved from the scenario suite's known-bug repros (#594): a file part URL
with the top-level media type 'image' is sent as image_url with its
detail, and the AI SDK does not download it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LukasParke added a commit that referenced this pull request Oct 23, 2026
Removes known-bugs.test.ts. Each it.fails repro is covered by a regression
test in the PR that fixes it (#590, #591, #592, #595, #600), so main no
longer goes red when one of those fixes merges.

The convert-messages invariant on assistant content shape no longer
assumes that any truthy cacheControl makes the content an array: it
asserts a string when no text part has a truthy value, an array when some
part has a valid value, and skips the shape check when only invalid values
are present (these are dropped once cache control is validated, #590).

Adds the scenario suite's biome override next to the property one, in
the same form as #594, so the two PRs merge without a conflict.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LukasParke and others added 2 commits October 23, 2026 00:27
An empty reasoning part that carries late reasoning_details (#608) is
allowed, so the signature-only scenario now passes whatever order the
PRs merge in.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant