Skip to content

fix(RequestResolver): consume tagged iterable results - #7981

Merged
tim-smart merged 4 commits into
Effect-TS:mainfrom
kitlangton:audit/c2-r8-resolver-iterable
Sep 4, 2026
Merged

fix(RequestResolver): consume tagged iterable results#7981
tim-smart merged 4 commits into
Effect-TS:mainfrom
kitlangton:audit/c2-r8-resolver-iterable

Conversation

@kitlangton

@kitlangton kitlangton commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Why

RequestResolver.fromEffectTagged accepts handlers that return an Iterable, but its success path treated results as arrays. Returning an array iterator or generator left requests incomplete.

What changes

  • Iterate successful handler results with for...of, matching fromFunctionBatched.
  • Cover arrays, array iterators, and generators in packages/effect/test/Request.test.ts.
  • Add an effect patch changeset.

Scope

Only successful result traversal changes. Result cardinality and failure behavior remain unchanged.

Verification

nix develop -c pnpm test --run packages/effect/test/Request.test.ts
nix develop -c pnpm lint-fix
nix develop -c pnpm check
git diff --check

On pre-fix origin/main at 88593e4abc, the array control passed while the iterator and generator regressions failed with RequestResolver did not complete request. After rebasing onto 7738b48e48, all 33 tests pass at the PR head.

Closes #7980
Closes EFF-1215

Audit

Runtime correctness audit; intended label: audit.

@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 002a363

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/vitest Patch
@effect/ai-anthropic Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-deno Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/doctest Patch
@effect/openapi-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 34.05 KB 34.05 KB 0.00 KB (0.00%)
basic.ts 7.15 KB 7.15 KB 0.00 KB (0.00%)
batching.ts 10.38 KB 10.38 KB 0.00 KB (0.00%)
brand.ts 6.63 KB 6.63 KB 0.00 KB (0.00%)
cache.ts 11.03 KB 11.03 KB 0.00 KB (0.00%)
config.ts 21.75 KB 21.75 KB 0.00 KB (0.00%)
differ.ts 20.55 KB 20.55 KB 0.00 KB (0.00%)
http-client.ts 22.20 KB 22.20 KB 0.00 KB (0.00%)
http-router.ts 32.90 KB 32.90 KB 0.00 KB (0.00%)
logger.ts 11.12 KB 11.12 KB 0.00 KB (0.00%)
metric.ts 9.28 KB 9.28 KB 0.00 KB (0.00%)
optic.ts 6.87 KB 6.87 KB 0.00 KB (0.00%)
pubsub.ts 15.49 KB 15.49 KB 0.00 KB (0.00%)
queue.ts 12.09 KB 12.09 KB 0.00 KB (0.00%)
schedule.ts 11.20 KB 11.20 KB 0.00 KB (0.00%)
schema-binary.ts 39.70 KB 39.70 KB 0.00 KB (0.00%)
schema-class.ts 20.32 KB 20.32 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 30.48 KB 30.48 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 26.41 KB 26.41 KB 0.00 KB (0.00%)
schema-string-transformation.ts 13.89 KB 13.89 KB 0.00 KB (0.00%)
schema-string.ts 11.38 KB 11.38 KB 0.00 KB (0.00%)
schema-template-literal.ts 15.76 KB 15.76 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 33.59 KB 33.59 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 24.76 KB 24.76 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 19.51 KB 19.51 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 19.65 KB 19.65 KB 0.00 KB (0.00%)
schema-toFormatter.ts 19.77 KB 19.77 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 23.84 KB 23.84 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 19.79 KB 19.79 KB 0.00 KB (0.00%)
schema.ts 19.53 KB 19.53 KB 0.00 KB (0.00%)
stm.ts 13.03 KB 13.03 KB 0.00 KB (0.00%)
stream.ts 10.06 KB 10.06 KB 0.00 KB (0.00%)

@tim-smart
tim-smart force-pushed the audit/c2-r8-resolver-iterable branch from 171409f to 002a363 Compare September 4, 2026 05:48
@tim-smart
tim-smart merged commit 2c63f1e into Effect-TS:main Sep 4, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0 audit Findings originating from the Effect runtime correctness audit bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fromEffectTagged ignores valid iterator and generator results

2 participants