Preserve concurrent updates during Atomic table saves #62

Merged
michielbdejong merged 3 commits from codex/issue-54-atomic-save into main 2026-10-28 13:04:50 +01:00

The in-memory Atomic adapter can lose an unrelated external update while awaiting field setters or a delayed persistence callback. Pass a synchronous preparation function to persistence, recheck membership/schema/edited-field baselines at application, and rebase only the validated patch onto the latest Resource. Overlapping edits and deletion reject while retaining the draft; retry remains available.

This fixes the defect from #54, whose original /atomic-reuse demo now lives at /atomic-reuse-memory. It does not change the separate real Atomic Server adapter now at /atomic-reuse; #45 has already been completed. Native commit actions are retained, but local preparation does not add a remote conditional-commit guarantee.

Updated against current main, including the move to experimental/. Also restores documentation repository URLs accidentally changed by that move.

Validation on the updated branch:

  • All 380 unit/integration tests pass, including deterministic setter/persistence interleavings and concurrent adapter cases.
  • All 12 Atomic in-memory browser regressions pass.
  • Atomic and runtime TypeScript checks pass.
  • Atomic app production build and git diff --check pass.

Closes #54.

The in-memory Atomic adapter can lose an unrelated external update while awaiting field setters or a delayed persistence callback. Pass a synchronous preparation function to persistence, recheck membership/schema/edited-field baselines at application, and rebase only the validated patch onto the latest Resource. Overlapping edits and deletion reject while retaining the draft; retry remains available. This fixes the defect from #54, whose original `/atomic-reuse` demo now lives at `/atomic-reuse-memory`. It does not change the separate real Atomic Server adapter now at `/atomic-reuse`; #45 has already been completed. Native commit actions are retained, but local preparation does not add a remote conditional-commit guarantee. Updated against current main, including the move to `experimental/`. Also restores documentation repository URLs accidentally changed by that move. Validation on the updated branch: - All 380 unit/integration tests pass, including deterministic setter/persistence interleavings and concurrent adapter cases. - All 12 Atomic in-memory browser regressions pass. - Atomic and runtime TypeScript checks pass. - Atomic app production build and git diff --check pass. Closes #54.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ELFA/database-apps!62
No description provided.