fix(sync): a sync touching many cards no longer blocks the server

serverpod_offline_sync v0.0.10 compares byte payloads byte by byte, each
byte through a UUID parse that throws and is caught: 36 ms for two 2 KB
payloads. A sync whose projection loaded a few thousand card revisions
kept the server's isolate busy for minutes, answering no one, while the
client's method stream idled out after 40 s and sent everything again,
without end.

The shared package now comes from our fork (project-halkyon/
serverpod-offline-sync, branch halkyon/byte-payloads at a signed commit):
v0.0.10 with that comparison fixed, 25 µs for the same payloads. The
override sits in the root pubspec, which the server's Docker build keeps,
so production gets it too. The fix is offered upstream; drop the override
once a release has it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-12 13:31:22 +02:00
commit 8b9f3174a6
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -15,3 +15,16 @@ workspace:
dev_dependencies:
# Referenced by analysis_options.yaml in this directory.
leancode_lint: ^27.0.0
dependency_overrides:
# The offline sync package's shared part from our fork: v0.0.10 with one fix,
# comparing byte payloads as bytes. v0.0.10 compares them byte by byte through a
# UUID parse that throws for each byte, so a sync touching a few thousand cards kept
# the server busy for minutes, answering nobody, while its client timed out and
# sent everything again (2026-10-12). Pinned to a signed commit of the fork's branch
# halkyon/byte-payloads; drop this once a release of the package has the fix.
serverpod_offline_sync:
git:
url: https://code.halkyon.app/project-halkyon/serverpod-offline-sync.git
path: packages/serverpod_offline_sync
ref: 1dce863e72e57eb51222452dd9baf1bbd7c4384e