Skip to content

docs(swift-sdk): describe partial reads, every-type hydration and the file budget - #611

Merged
aicayzer merged 4 commits into
mainfrom
docs/swift-device-scale
Oct 24, 2026
Merged

aicayzer merged 4 commits into
mainfrom
docs/swift-device-scale

Conversation

@aicayzer

@aicayzer aicayzer commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Swift SDK page, the files guide and the devices page describe the SDK as it is once withmarfa/marfa-swift#360 merges: reads answer rows that have arrived during a fill and say they are partial, one call hydrates every type, the file budget and the files kept offline have calls, and a file is read with withFile.

Merge this after that pull request.

Changes

  • swift-sdk.mdx: replaces the line that said reads throw during a fill with sections on hydrating every type, reading while the copy fills (Rows and Completeness) and keeping files on the device (cache, setBudget, trim, fetchKept). Adds fileBudget to open, and Rows to LiveQuery and Reading. Names withFile where the page said get.
  • handle-files.mdx: the Swift example and prose use withFile and fetchKept, which the SDK has, in place of a get it does not.
  • devices.mdx: drops the sentences that said the Swift SDK would answer partial reads, set a budget and fetch kept files once it adopted the core's binding.

Testing

  • pnpm test passes (39 files, 700 tests), including the content lint and the command check.

  • The Swift names were checked against the package's source in the pull request above. The Swift snippets were not compiled on their own.

  • swift-sdk.mdx also gets the fixes from review: every LiveQuery<[Item]> over a .list is LiveQuery<Rows<Item>> (here and in the Swift app tutorial), a reader refuses setBudget, trim and fetchKept and can still call cache(), progress compares itemsListed and itemsExpected and not items, .bytes(bytes:), a Refill a stale copy section, and hydrate announcing when it fails. The generated release files are synced from marfa main.

Notes for reviewers

  • The package pull request now pins marfa 3ee9ed675; the page describes stale copies and refill in place. Not run: a real stale copy, which needs a server whose event log has aged out.
  • The old Swift example called blobs.get, which the SDK does not have; the new one uses withFile.

Checklist

  • The title is a scoped Conventional Commit.
  • New behavior has a test that was seen failing first, or no test was needed and the reason is above.
  • Docs, comments and the contract still say what is true after this change.

@aicayzer aicayzer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: ready to merge

Summary. The Swift SDK page, the Swift app tutorial and the device pages say what the package exposes since withmarfa/marfa-swift#360: Rows with a completeness, every-type slices, fill progress, stale copies and refill in place, the file budget, attachments kept offline, and .refreshed(.unfinished).

First draft: 3/5. Published LiveQuery<[Item]> examples no longer compiled, and three sentences were untrue (a reader refusing cache(), counts for items, .bytes(_:)); all fixed.

Checked.


Reviewed by withmarfa-reviewer on Claude Sonnet 5.5 and Codex. This review may contain mistakes.

@aicayzer
aicayzer force-pushed the docs/swift-device-scale branch from 265799e to c7a7aef Compare October 24, 2026 09:56
@aicayzer
aicayzer marked this pull request as ready for review October 24, 2026 09:56
@aicayzer
aicayzer enabled auto-merge (squash) October 24, 2026 09:56
@aicayzer
aicayzer merged commit cea2557 into main Oct 24, 2026
8 checks passed
@aicayzer
aicayzer deleted the docs/swift-device-scale branch October 24, 2026 09:59
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.

1 participant