Skip to content

Handle conflicting Schema bracket paths - #6627

Merged
gcanti merged 1 commit into
mainfrom
fix/schema-bracket-path-conflicts
Jul 25, 2026
Merged

gcanti merged 1 commit into
mainfrom
fix/schema-bracket-path-conflicts

Conversation

@gcanti

@gcanti gcanti commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of conflicting nested paths when building data from FormData and URLSearchParams entries.
    • Ensured object and array structures are replaced appropriately when later entries require a different structure.
    • Corrected cross-references in the API documentation for bracket-path encoding and decoding.
  • Documentation

    • Added guidance about conflicting paths, delimiter characters in keys, and limitations of the bracket-path format.

@changeset-bot

changeset-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e92d76f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions Bot added the 4.0 label Jul 25, 2026
@ghost ghost added the bug Something isn't working label Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d1d27aa9-461a-4f8c-93d0-f987dd11512b

📥 Commits

Reviewing files that changed from the base of the PR and between 1725927 and e92d76f.

📒 Files selected for processing (2)
  • packages/effect/src/SchemaGetter.ts
  • packages/effect/test/schema/SchemaGetter.test.ts

📝 Walkthrough

Walkthrough

makeTreeRecord now replaces conflicting leaves and incompatible containers according to required path structure. Tests cover object/array conflicts, while JSDoc cross-references and bracket-path behavior notes are corrected and expanded.

Changes

Tree record construction

Layer / File(s) Summary
Container conflict handling
packages/effect/src/SchemaGetter.ts, packages/effect/test/schema/SchemaGetter.test.ts
makeTreeRecord tracks created containers and reuses them only when their object/array shape matches the required path. Conflicting leaves and container types are replaced, with tests covering both cases. JSDoc now documents lossy bracket paths and corrected encoder/decoder references.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: tim-smart

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

File Name Current Size Previous Size Difference
basic.ts 6.64 KB 6.64 KB 0.00 KB (0.00%)
batching.ts 9.42 KB 9.42 KB 0.00 KB (0.00%)
brand.ts 6.25 KB 6.25 KB 0.00 KB (0.00%)
cache.ts 10.13 KB 10.13 KB 0.00 KB (0.00%)
config.ts 19.08 KB 19.08 KB 0.00 KB (0.00%)
differ.ts 18.41 KB 18.41 KB 0.00 KB (0.00%)
http-client.ts 20.73 KB 20.73 KB 0.00 KB (0.00%)
logger.ts 10.30 KB 10.30 KB 0.00 KB (0.00%)
metric.ts 8.56 KB 8.56 KB 0.00 KB (0.00%)
optic.ts 7.41 KB 7.41 KB 0.00 KB (0.00%)
pubsub.ts 14.17 KB 14.17 KB 0.00 KB (0.00%)
queue.ts 11.10 KB 11.10 KB 0.00 KB (0.00%)
schedule.ts 10.28 KB 10.28 KB 0.00 KB (0.00%)
schema-class.ts 18.16 KB 18.16 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 27.87 KB 27.87 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 24.17 KB 24.17 KB 0.00 KB (0.00%)
schema-string-transformation.ts 12.68 KB 12.68 KB 0.00 KB (0.00%)
schema-string.ts 10.36 KB 10.36 KB 0.00 KB (0.00%)
schema-template-literal.ts 14.38 KB 14.38 KB 0.00 KB (0.00%)
schema-toArbitraryLazy.ts 20.93 KB 20.93 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 23.36 KB 23.36 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 18.30 KB 18.30 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 18.01 KB 18.01 KB 0.00 KB (0.00%)
schema-toFormatter.ts 17.86 KB 17.86 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 21.49 KB 21.49 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 18.55 KB 18.55 KB 0.00 KB (0.00%)
schema.ts 17.43 KB 17.43 KB 0.00 KB (0.00%)
stm.ts 12.07 KB 12.07 KB 0.00 KB (0.00%)
stream.ts 9.36 KB 9.36 KB 0.00 KB (0.00%)

@gcanti
gcanti merged commit 2321ea1 into main Jul 25, 2026
17 checks passed
@gcanti
gcanti deleted the fix/schema-bracket-path-conflicts branch July 25, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant