Branch fix/native-prerelease-0.1.10 (on main c715478), two commits. Not merged, released or deployed.
- d766437 — repin rastrillo/native a18c32b → 0254817 (rastrillo/native #49, chunked response reader) in Package.swift, Package.resolved, both project.yml, provenance.json; Colophon.json regenerated with
go run ./cmd/docs-colophon (pinned go1.26.5). - 6a11103 — Fable's follow-ups from #130: L1 (#131), L2 (#132), L4 (#134).
L1 (#131) — Use another checks before it asks. DocsOficinaSession.requestUseAnother(identity:openDocuments:) awaits DocsLeaveBlock.check first (identity-wide outboxes, open document windows), asks openDocuments again after the await, and only then calls useAnother. The window's useAnother(_:) uses it; its .onChange(of: model.confirmingReplace) stays as the backstop. The confirmation is no longer put up, confirmable, while the check runs, then withdrawn. Test: OficinaIDAdoptionTests.testUseAnotherWithUnsentChangesIsRefusedBeforeItAsks (sink on $confirmingReplace: never true with an unsent entry; a window opening during the check refuses; clear asks once).
L2 (#132) — a document window opening withdraws the question. DocsAccountWindow reads replaceUnderOpenDocument (confirmingReplace && a document window of the identity open) and acts in .onChange: cancelReplace() + the "close its windows" alert. Read only in the body, written only in onChange. Test: SignedInLaunchTests.testADocumentWindowOpeningWithdrawsTheReplaceQuestion hosts the real home window, lets the kit ask, then windows.reserve(...) (what File ▸ Recent/⌘N do) and checks the question is gone and the identity still signed in. Also added Fable's finding-6 backstop test testTheReplaceQuestionIsWithdrawnWithChangesUnsent (passes before and after; it pins the existing guard).
L4 (#134) — a refusal of an already-replaced session. The transport now records which session each request was sent with (DocsOficinaSession.watch(_:account:session:)); rejected(_:sentWith:):
- waits for a re-mint in flight (the
renewing Bool became a renewal Task; a refusal landing mid-re-mint used to be dropped); - if the account's session is no longer the one sent with, mints nothing and calls
DocsOfflineAccount.sessionReplaced, which joins the drain in flight (if phase == .sending) and then sessionRestored(). Why join and not call sessionRestored straight away as #134 suggested: the watch's rejected Task usually runs on the main actor before the drainer sets sessionEnded (the drainer awaits outbox.endSend first), so an immediate restore would be overwritten. Joining the drain (it starts nothing new) restores after the drainer has stopped. Test: OficinaIDAdoptionTests.testARefusalOfAnAlreadyReplacedSessionRestartsTheOutbox (an outbox write on the first session's cookie gets 403 "signed out" after another request's re-mint; the drainer must leave sessionEnded and no second exchange happens).
Each test fails with its fix reverted (checked by mutation: ask-then-check order for L1, the onChange disabled for L2, the replaced-session branch disabled for L4), and passes with it.
Kit bump notes (a18c32b..0254817). Two commits: 382bf73 and its merge, NativeHTTP.responseDetails reading the body through a task delegate (BoundedBody) in URLSession's chunks instead of AsyncBytes byte-by-byte. Same contract: maxBytes still refuses past the limit (now also up front on Content-Length, cancelling the task), same "The server response is too large." message, response observed before a body error. Kit Package.swift and LICENSE unchanged, so the provenance sha256 holds. Nothing in Docs needed to adapt; Docs never read AsyncBytes itself.
Gates. See the follow-up comment for the Go gate, Mac/iOS builds and hub CI. native/scripts/check-native.sh: passed (171 Swift tests, 0 failures, 4 pre-existing skips; WorkspaceInitTests, SignedInLaunchTests, realtime/healing tests green).
Not in this branch: L3 (deploy-order note), L5 (straight-in drift on the server route), L6 parts 2–3, L7, and Paul's Use-another tap-through on iPhone and Mac (still to do before release).