Skip to content

docs(core): ADR 0054, one sync engine in the core for TablePro Sync and iCloud - #4486

Merged
datlechin merged 16 commits into
mainfrom
docs/core-adr-0054-sync-engine
Nov 25, 2026
Merged

datlechin merged 16 commits into
mainfrom
docs/core-adr-0054-sync-engine

Conversation

@datlechin

@datlechin datlechin commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds core ADR 0054: one engine in tablepro-sync runs TablePro Sync and iCloud, with CloudKit as an async callback interface the Swift apps implement. Records the maintainer's decision of 2026-11-25, which reverses part of 0010.
  • 0054 covers the four crates, the rules both providers follow, the CloudKit transport sketch, the state file schema, the provider key, moves between providers with a move marker and the deletion rule for devices still on iCloud, store identity and refill, the history window, and the downgrade mirror.
  • 0054 states the costs: the iCloud path most users run is rewritten, 28 to 46 agent-hours against 9 to 15 for sharing only the pure parts, and a dual write for one stable cycle.
  • A conflict answer carries the stored tag, not the fields, as 0051 has it: the engine pulls the stored copy on the service, or takes CloudKit's serverRecordChanged copy, then merges.
  • State file, for G0 H4 and M6: the key tables 0053 keeps are named, with one MAC over a canonical snapshot. Freshness comes from an anchor in the device store that keeps the counter and the key checkpoint, written in two steps around each commit, following ROTE. A stale file refills its sync data and rebuilds its key tables only on logs that extend the anchored checkpoint. A restore of the file and the anchor together is stated as the limit.
  • 0010 Status: the account slice shipped in feat(core): sign in to a company server and verify its license #4470, slice 9 numbered, and the amendment by 0054.
  • ADR index: the 0054 row and 0010's Status.
  • ROADMAP Phase 7: T-03 becomes the engine, T-10 (records) and T-11 (keys) split out of it, T-08 gains the iCloud engine move, the platform order and staging follow the 2026-11-25 decisions, and the progress table is recounted.

Test plan

  • scripts/check-banned-words.sh on the four files: clean.
  • lychee --offline --include-fragments 'core/**/*.md': 0 errors.
  • ROADMAP recount with the awk in How to track: Phase 7 0/24, total 61/375.
  • Codex review, 3 rounds, and the Codex security pass, 5 rounds, the last one approving. Applied: the mirror writes dirty and tombstone keys on every local write; the move marker; a history prune pushes no deletion; the first run keeps every consent decision; CloudKit writes name the zone owner; digest file names; the state file's MAC, the anchor with its checkpoint, and the two-step anchor write. CloudKit's unconditional deletes are recorded as a limit.

@datlechin
datlechin enabled auto-merge (squash) November 25, 2026 05:54
@datlechin
datlechin force-pushed the docs/core-adr-0054-sync-engine branch from 3fd0f80 to 6800c22 Compare November 25, 2026 06:21
@datlechin
datlechin disabled auto-merge November 25, 2026 07:17
@datlechin
datlechin force-pushed the docs/core-adr-0054-sync-engine branch from af0fa95 to e125768 Compare November 25, 2026 08:03
@datlechin
datlechin force-pushed the docs/core-adr-0054-sync-engine branch 2 times, most recently from 5d04b0f to 4067f82 Compare November 25, 2026 09:52
…e with its anchor rebuilds without a comparison
…d, and a move back deletes only for user tombstones
…ork re-pin moves the anchor before the person's rotate
@datlechin
datlechin force-pushed the docs/core-adr-0054-sync-engine branch from 101a2ba to d40bb11 Compare November 25, 2026 10:32
@datlechin
datlechin merged commit 43753ff into main Nov 25, 2026
1 check passed
@datlechin
datlechin deleted the docs/core-adr-0054-sync-engine branch November 27, 2026 16:37
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