serverpod-offline-sync/test/serverpod_offline_sync_test_server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 845fb557db
feat: Write a row in its own space, and a new one where the host says
A client with a persistent user wrote every change in its personal
space: an update or delete of a row in a shared space it is a member of
found no row and threw, and a new row could reach a shared space only
through transactionForUser, which a host calls at each write itself.

A write without a transaction now acts in the space it touches, through
transactionForUser, which checks membership and role as before: an
update or delete in the space its rows are stored in, a new row in the
one `newRowSpace` names (null, or no hook, for the personal space). One
call touches one space and is refused, with a StateError, where it
would touch two. A write within a transaction acts in its space, as
before; the server, without a persistent user, is unchanged.

Tested on the client: a writing member updates and deletes a shared
row, by row and by condition; a reading member is refused; a call
naming rows of two spaces is refused; new rows go where the hook says,
refused for a space only read or not a member's; a transaction of the
caller's own still decides. The integration suite passes (994 tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-11 12:40:44 +01:00
..
.test_databases test: Add a DST and tests reproducing found failures (#110) 2026-09-04 13:09:20 -03:00
bin refactor: Replace drift by serverpod as core engine (#33) 2026-05-03 09:09:23 -03:00
config fix: Preserve shared model and SQLite value types during sync (#118) 2026-09-16 00:07:51 -03:00
lib fix: Author the column default an upsert writes for a null foreign key (#164) 2026-10-08 22:48:47 -03:00
migrations fix: Author the column default an upsert writes for a null foreign key (#164) 2026-10-08 22:48:47 -03:00
test feat: Write a row in its own space, and a new one where the host says 2026-11-11 12:40:44 +01:00
.gitignore refactor: Move the core implementation to the shared package with no manual queries (#107) 2026-08-04 11:04:04 -03:00
analysis_options.yaml feat: Implement the sync protocol (#54) 2026-05-29 01:54:23 -03:00
CHANGELOG.md refactor: Replace drift by serverpod as core engine (#33) 2026-05-03 09:09:23 -03:00
dart_test.yaml test: Harden DST authored-state checks and workloads (#123) 2026-09-17 10:39:07 -03:00
pubspec.yaml fix: Prevent web deadlocks in transactional membership reads (#161) 2026-10-08 19:00:44 -03:00
README.md refactor: Replace drift by serverpod as core engine (#33) 2026-05-03 09:09:23 -03:00

serverpod_offline_sync_test_server

This is the starting point for your Serverpod server.

To run your server, you first need to start Postgres and Redis. It's easiest to do with Docker.

docker compose up --build --detach

Then you can start the Serverpod server.

dart bin/main.dart

When you are finished, you can shut down Serverpod with Ctrl-C, then stop Postgres and Redis.

docker compose stop