Repository navigation
docs(swift-sdk): add batch reads and changes since a cursor - #693
Merged
Merged
Conversation
aicayzer
marked this pull request as ready for review
October 30, 2026 03:08
…nd an item removed
aicayzer
commented
Oct 30, 2026
aicayzer
left a comment
Contributor
Author
There was a problem hiding this comment.
Review: ready to merge
Summary. Documents the Swift package's batch reads, batched body links and reads of what changed since a cursor; every name, signature and behaviour matches the package and the contract.
First draft: 4/5. Nothing blocking; two sentences that would have misled a reader were corrected by the reviewer.
Checked.
- True:
items.get(_:includingBin:),edges.get,items.links(in:),changes(since:most:),ChangedRowsandChangeCursoragainst marfa-swift at de2b7b1, and thedevice/bulk-get-*,device/edge-get,device/bulk-links-*anddevice/changed-*statements, including the stated limit on links that resolve differently only because another item changed. - Neighbours: the devices overview, the read-while-filling list, the throws list and the fake's sections.
Quick fixes. 2 applied by the reviewer: a stale copy also refuses a read of what changed (device/changed-partial-refused), and an item left out of a reread may have been removed, not only binned.
Reviewed by withmarfa-reviewer on Claude Sonnet 5.5. This review may contain mistakes.
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.
Summary
The Swift SDK page now covers the batch reads and following changes with a cursor, which withmarfa/marfa-swift#389 adds:
items.get(_:includingBin:)for many IDs,edges.get(_:)for one ID or many,items.links(in:)for many items, andchanges(since:most:). The devices page now says how a read of many items and a read of changes behave during a fill. Merge this once withmarfa/marfa-swift#389 is released.Changes
/swift-sdk:hydrationIncompleteinclude the new calls..everything, whatChangedRowsholds, why a name can change nothing on screen, when to read body links again, keeping the cursor through a refusal, and keeping a cursor across launches. TheChangedRowsbullet and the example's comment say that an ID a reread leaves out has gone to the bin only when the reread isn't.partial, since a hydration started afterchanges(since:)answered can leave an item not yet arrived..refreshedand.savedrow links to the new subsection.unreadablePropertiesbullet says which stored properties read as unreadable: those that aren't JSON, aren't an object, or nest more than 64 levels deep, counting the properties object./devices: a read of many items by ID answers those that have arrived and marks the answerpartial, and a read of what changed since a cursor is refused until the copy is whole.Testing
pnpm test: 39 files and 709 tests passed, including the content lint, after the review fixes.split_propertiesandMAX_JSON_DEPTHin the core and against the Swift package's reader, which both count the properties object as level 1.Core::changes_sinceandrefuse_unless_usablein withmarfa/marfa (core at2b09fc8, the merge of perf(core): pack a Swift listing's items into one buffer marfa#2475, which marfa-swift#389 now pins) and against the Swift package's public API.Notes for reviewers
Checklist