Paul, 2026-09-23: "Merge away." (R1 polish round, native merges.)
What. merge/native-sync-batching = fresh origin/main (ae22c11) + git merge --no-ff origin/native/sync-batching (5c177f9). Main was one AGENTS.md commit ahead; no conflicts. Head b3b69e0.
Contains every Docs native branch. native/sync-batching already contains native/document-windows (0d7adf8), native/testflight and native/docs-toolbar-stability (d9aa302), native/sparkle-updates (1e5908e); native/apple-clients and native/server-release are already on main. All worktrees for those branches are clean and every commit is on origin. No branch discussions exist for any of them; last commit 2026-09-20. So document-windows needs no separate merge.
Server changes (outside native/): internal/docs/{app,handlers,models,store,native_test}.go, migration 0008_document_creation_token.sql (nullable creation_token + unique (owner_id, creation_token)), POST /d/{sqid}/title, spec docs/superpowers/specs/2026-09-20-mac-document-windows.md.
Migration verification.
- Upgrade path: applied BootSchema without 0008 to a file DB, inserted 3 documents, then applied the full BootSchema: only
docs/0008_document_creation_token applied, existing rows keep NULL token (SQLite unique index allows many NULLs), a duplicate (owner, token) insert is refused, re-apply is a no-op. - Model/migration drift (
migrate.Generate, what rastrillo migration check runs; the CLI itself can't load Docs because internal/ holds several packages): output on main vs this branch differs only by the new column being carried through the pre-existing rebuilds and documents_creation being recreated. 0008 adds no new drift. (Docs' models already drift from its migrations on main, e.g. links/people/content_sealing; unchanged here.)
Tests.
- CI (
amadan ci status -branch merge/native-sync-batching): exit 0 at b3b69e0, gate + native (the runner is Linux so native ran --core-only; Swift tests do not run in CI). - Locally on macOS:
go vet, go test ./... all ok (cmd/docs needs TMPDIR=/tmp: macOS's long TMPDIR overflows the unix socket path; environmental, same on main). native/scripts/check-native.sh full (with pinned Rust 1.98.0 + Apple targets): Rust tests, wire both directions, XCFramework, swift test 47 XCTest (3 integration skipped, env-gated) + 16 Swift Testing pass. The three integration scripts: test-document-drafts ok, test-home-loading ok, test-sync-latency failed once (11 vs ≤10 requests, timing, cold first run) then passed 3/3.
Pin. native/apple and ios/macos project.yml pin rastrillo/native 2295259 (multi-account). rastrillo/native merge/native-apple-chain (discussion rastrillo/native#4) puts that chain on its main; a follow-up re-pins to the rastrillo main merge commit once it lands.
Needs whole-branch review (Fable) before squash-merge.