Skip to content

fix(ack): keep empty-string member keys in error paths - #260

Merged
leoafarias merged 5 commits into
mainfrom
cursor/empty-member-key-path-af66
Nov 6, 2026
Merged

leoafarias merged 5 commits into
mainfrom
cursor/empty-member-key-path-af66

Conversation

@leoafarias

@leoafarias leoafarias commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #223

An error on a member whose key is "" was reported at the parent object. SchemaContext.path skipped every empty pathSegment, and wrapper contexts (anyOf, lazy, boundary, discriminated object) used that same empty string to mean "no segment".

Wrapper contexts now set omitPathSegment, so a real empty member key stays in the JSON Pointer as #/ (RFC 6901) and those wrappers still add no segment.

The new test failed on main (# instead of #/) and passes with this change, including the existing wrapper paths for anyOf, lazy, boundary, and discriminated objects.

cursoragent and others added 2 commits November 6, 2026 11:33
Wrapper contexts used an empty pathSegment to mean "no segment", which
also dropped a real member key of "". Mark those wrappers separately so
an empty key is reported as the JSON Pointer #/.

Fixes #223

Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>
The empty-string member key note was filed under the published
2.0.0-beta.3 section. Published changelog sections stay immutable, so
the note now starts an Unreleased Fixed section.
@leoafarias
leoafarias marked this pull request as ready for review November 6, 2026 14:08
cursoragent and others added 3 commits November 6, 2026 14:27
…ey-path-af66

Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>
Move the empty-string path note into Unreleased beside the reference-cycle
fix from main, and leave the released 2.0.0-beta.3 section unchanged.

Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>
…6' into cursor/empty-member-key-path-af66

Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>

# Conflicts:
#	packages/ack/CHANGELOG.md
@leoafarias
leoafarias merged commit fb77b06 into main Nov 6, 2026
10 checks passed
@leoafarias
leoafarias deleted the cursor/empty-member-key-path-af66 branch November 6, 2026 21:52
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.

Error paths drop a member whose key is the empty string

2 participants