Skip to content

fix(openapi): return fresh cached specs#6550

Open
xianjianlf2 wants to merge 1 commit into
Effect-TS:mainfrom
xianjianlf2:fix/openapi-from-api-copy-6330
Open

fix(openapi): return fresh cached specs#6550
xianjianlf2 wants to merge 1 commit into
Effect-TS:mainfrom
xianjianlf2:fix/openapi-from-api-copy-6330

Conversation

@xianjianlf2

Copy link
Copy Markdown
Contributor

Fixes #6330

Summary

  • keep the internal OpenApi.fromApi cache but return fresh deep copies to callers
  • preserve special OpenAPI keys like proto as own enumerable properties while cloning
  • add regression coverage for external mutation not affecting later cached calls

Tests

  • pnpm test packages/effect/test/unstable/httpapi/OpenApi.test.ts
  • pnpm lint-fix
  • pnpm check

@github-project-automation github-project-automation Bot moved this to Discussion Ongoing in PR Backlog Jul 23, 2026
@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c33e7f3

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

This PR includes changesets to release 27 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node 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/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/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

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@xianjianlf2, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2048242b-2f90-4e4e-b75f-f755b80318ab

📥 Commits

Reviewing files that changed from the base of the PR and between 4e0be58 and c33e7f3.

📒 Files selected for processing (3)
  • .changeset/fix-openapi-from-api-cache-copy.md
  • packages/effect/src/unstable/httpapi/OpenApi.ts
  • packages/effect/test/unstable/httpapi/OpenApi.test.ts

Comment @coderabbitai help to get the list of available commands.

@tim-smart tim-smart added the bug Something isn't working label Jul 23, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

OpenApi.fromApi exposes shared mutable state

2 participants