Repository navigation
feat(sync): add the structured document adapters - #989
Merged
Merged
Conversation
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
from
October 31, 2026 00:05
d42e0c2 to
d69f62d
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
from
November 2, 2026 02:26
d69f62d to
40c351d
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
from
November 3, 2026 00:29
40c351d to
f18fe65
Compare
This was referenced Nov 3, 2026
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
2 times, most recently
from
November 4, 2026 19:25
ad0d76d to
9bf515c
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
from
November 4, 2026 19:46
9bf515c to
44efbf9
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
2 times, most recently
from
November 4, 2026 22:26
4c22725 to
406910d
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
4 times, most recently
from
November 6, 2026 22:13
a371381 to
8a8bc57
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
3 times, most recently
from
November 6, 2026 23:53
95dec01 to
398ef81
Compare
ctawiah
force-pushed
the
ctawiah/sync-structured-adapters-3bbf
branch
10 times, most recently
from
November 7, 2026 04:33
4e5300e to
d542b78
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8757695. Configure here.
nkester-ld
approved these changes
Nov 9, 2026
Add the JSON, YAML, and TOML adapters. Each scalar has an exact byte span. Objects and arrays keep the layout of the text that they replace. Anchors, aliases, merge keys, block scalars, and arrays of tables are read-only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Context
JSON, YAML, and TOML sources need exact scalar edits and clear read-only rules.
What changes
Design notes
Review focus
Verification
make buildgo test ./...golangci-lint run ./...Related changes
🤖 Generated with Claude Code
Note
Overview
Adds JSON, YAML, and TOML sync adapters in
structured/that buildadapter.Nodetrees with exact byte spans for targeted scalar edits, registered viainit()alongside existing formats.Shared adapter core:
EncodeJSONskips HTML escaping; large integers beyond float64 precision stay read-only with original text (ExactInteger, container propagation in JSON); positional IDs,Node.Clone(), and richer reference error messages viaannotateProblem.JSON: Custom parser tracks spans, rejects duplicates/malformed input, preserves indentation on rewrite, and treats empty arrays as values (not null).
YAML: Thin wrapper over
yamltreewith multi-document read-only rules; yamltree now preserves&/<in quoted strings and splits integer vs float write semantics.TOML: Header/array-table/inline/dotted-key graph with structural read-only tables but writable scalars; string family encoders; arrays of tables and oversized numbers read-only.
Extensive tests (including TOML string fuzz) and sample testdata.
Reviewed by Cursor Bugbot for commit 57aea94. Bugbot is set up for automated code reviews on this repo. Configure here.