Skip to content

feat(core): tablepro-records crate for synced kinds - #4518

Merged
datlechin merged 7 commits into
mainfrom
feat/core-records
Nov 25, 2026
Merged

datlechin merged 7 commits into
mainfrom
feat/core-records

Conversation

@datlechin

@datlechin datlechin commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • New crate tablepro-records (core/crates/records) on core and storage (ADR 0054, Crates).
  • Kinds, kind syntax, the reserved set and each kind's scopes (0051, Kinds).
  • Every 0052 id form: UUIDs, history UUIDv4, sha256- long ids, favourite and table folder item digests, settings categories, envelope ids, key object ids.
  • A wire schema per kind, with a class and a content or placement role per member.
  • Personal kinds use their CloudKit names in snake case and CloudKit values; team kinds keep the library's and the bundle's keys; key objects follow 0051's bodies.
  • A table placing each member of the core's store models on the wire; a new store member fails the test until it is classed.
  • Secret kinds per parent and each secret's dest paths, with dest built from the record's current fields (0056).
  • dest also binds a connection's driver fields, network options and published SSH route: a driver's own fields can name the hosts it dials or turn off its TLS checks.
  • Every synced driver field is approval-required; a loose value set where none was waits too.
  • The macOS settings registry with every option's class; keyboard, AI and themes go whole. iOS, Linux and Windows name no category yet.
  • The three-way merge: personal per field, team with contested fields, content against placement on a deletion (D12), settings by option.
  • An envelope this device changed is resealed, never merged field by field; history entries and key objects keep the stored copy.
  • The sort and cycle rules, generic over ids.
  • RFC 7396 apply and diff in the crate: json-patch has no merge-patch diff.
  • A mirror of the server's SecretKey and its per-record checks (depth, NUL, null, 1 MiB as Go measures it).
  • tablepro_storage::cloudkit moved to tablepro_records::cloudkit::library; ffi calls it, the FFI surface is unchanged.
  • CloudKit schema registry in place of verifiedInProduction, record names, and a projection between CloudKit and wire fields for all 13 types.
  • The projection keeps isReadOnly, colorTag and tagId, stamps modifiedAtLocal and schemaVersion, and writes only deployed fields.
  • ConnectionStore::lay_out_blocking replaces cloud_edits_blocking and apply_cloud_pull_blocking.
  • apple/scripts/export-cloudkit-schema.sh also writes core/crates/records/fixtures/production-schema.ckdb, since a Linux source archive holds no apple/.

Test plan

  • verify.sh --jobs 4 --platform windows core tablepro-records: PASS, 115 tests.
  • verify.sh --jobs 4 --platform windows core tablepro-ffi -- --test cloud_library --test library: PASS, 30 tests.
  • verify.sh --jobs 4 package TableProFFI: PASS, 8 tests, CloudLibraryRecordsTests among them.
  • Codex review and security pass, two rounds and a check of the last fix: findings fixed, none open.
  • fixtures/ids.json printed by the Mac's own IdentityPath and TableScope under Foundation.
  • fixtures/merge.json run directly and again after a trip through CloudKit fields; fixtures/dest.json.
  • Registry against production-schema.ckdb in both directions.
  • tablepro-storage on this Mac fails 14 query_history copy tests on origin/main as well: macOS 27's SQLite 3.54 refuses VACUUM INTO an existing empty file.

@datlechin
datlechin enabled auto-merge (squash) November 25, 2026 17:27
@datlechin
datlechin disabled auto-merge November 25, 2026 18:43
@datlechin
datlechin merged commit fdc66a8 into main Nov 25, 2026
1 check passed
@datlechin
datlechin deleted the feat/core-records branch November 25, 2026 18:43
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