Repository navigation
feat(core-sync): only a team's changes wait for approval, and rows older builds left settle - #4812
Merged
Merged
Conversation
…der builds left settle ADR 0114, Approvals. iCloud lands what an older build kept waiting; a TablePro Sync file drops it, with the base of a record held whole so the diff sends no deletion.
…e that cannot land to the previous stable
This was referenced Dec 1, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lane L4 of core ADR 0114, Approvals.
adapters/fields.rs,Rule::of: an approval-required member, and a member no schema or registry names, waits only in a team scope. The personal scope, on TablePro Sync and on iCloud, takes a pulled change on pull. Device-only and dropped members still stay.adapters/approval.rs,Queue::settle_personal, run at the start of each pass, for the personal rows a build before 0114 left:Earlier::Land): each value that waited lands, as Approve does; each record held whole lands whole; refusals go, so the kept value goes up as the person's edit. Each write lands on a store read just before it.Earlier::Drop): the approval and held-whole rows go and nothing lands. A held-whole record's base goes with its row, so the diff sends no deletion of it.prior/mirror items go.cloudkit/legacy/export.rs: the downgrade mirror drops its approval readings: noprior/copy, no waiting value held by id, no type left unread. A held-whole leftover that has not landed yet goes to the previous stable as a change held by id. The fetch no longer writesprior/copies.sync-host/src/engines_tests.rs:cargo fmtof a line main left unformatted.Tests changed on purpose:
tests/engine/approvals.rsand the approval cases oftests/engine/rules.rsrun on Team Library connections (DeviceBuilder::team_library). The 0107 settings take-up cases become team record cases. E2E F14's case now takes the person's connections with nothing to review.tests/cloudkit/approval.rsrewritten: a pulled host applies on pull, a new connection lands whole, rows an older build left settle, an unreadable copy keeps its rows for a later pass.tests/cloudkit/legacy/mirror.rs: the previous stable gets the applied value; leftovers that cannot settle hold nothing back from it.tests/cloudkit/{pending,pull,held,legacy/import}.rs,tests/engine/{moves,library}.rs,ffi/src/sync/secrets_tests.rs: the same scenarios with nothing waiting.tests/engine/fixtures.rsreads the memory store as a real store holds it: a newer build's member in the personal scope now reaches the store write, which a real store drops.sync-host/src/service_tests.rscounts team rows only.teams_only::a_personal_approval_rests_unlisted_and_undecided_while_teams_only,rules::a_policy_revival_sends_the_device_s_own_value_of_a_member_still_waiting(no team policy toggle),cloudkit pending::a_pulled_port_change_keeps_its_waiting_row_across_a_crash_after_the_store_write(an existing crash case once nothing waits), and the cloudkit cases for a host set while one waits, a deletion leaving nothing to approve, and a held-whole record whose next copy fails to read.Test plan
engine approvals::personal_rows_an_earlier_build_left_go_and_nothing_they_held_lands(also fails without the base deletion: the server record is deleted),engine approvals::a_personal_host_change_lands_while_a_team_host_change_waits_in_the_same_pass,cloudkit approval::rows_an_earlier_build_left_land_what_waited_and_send_what_was_refused.cargo nextest run -p tablepro-sync: 1224 passed.cargo nextest run -p tablepro-sync-host -p tablepro-recordsand thetablepro-ffisync tests: 220 passed.cargo clippy -p tablepro-sync -p tablepro-sync-host -p tablepro-ffi --all-targets -- -D warningsclean;cargo fmt --all -- --checkclean.codex review --base origin/main: round 1 raised the merge order (above), a stale store read and a lost downgrade marker, both fixed in the second commit.