Skip to content

Commit 61bfe59

Browse files
Wrap opaque string checkpoints for RxDB; restart on refusal.
Signed-off-by: Dmitri Zagidulin <dzagidulin@gmail.com>
1 parent e2530bd commit 61bfe59

7 files changed

Lines changed: 337 additions & 233 deletions

File tree

‎AGENTS.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ change that puts an `rxdb` import (a type import included) anywhere the root
2121
entry reaches breaks the contract, and `test/packaging/` is what catches it.
2222

2323
What does NOT belong here: WAS HTTP, the sync port, the wire vocabulary, the
24-
error classes, and the four `err.name` predicates (`@interop/was-client`, its
25-
`/sync` subpath); the last-write-wins comparison rule (`@interop/social-core`);
26-
ciphers, key epochs, and any other key handling (`@interop/was-client/edv` and
27-
each consuming app); the session gates, the status store, and the platform
28-
wiring (each app's binding); and the replica-less change engine
24+
error classes, and the `err.name` predicates (`@interop/was-client`, its `/sync`
25+
subpath); the last-write-wins comparison rule (`@interop/social-core`); ciphers,
26+
key epochs, and any other key handling (`@interop/was-client/edv` and each
27+
consuming app); the session gates, the status store, and the platform wiring
28+
(each app's binding); and the replica-less change engine
2929
(`@interop/wallet-core/sync`), which is this driver's sibling rather than its
3030
other half.
3131

@@ -266,7 +266,7 @@ rather than memory; check with the user before editing anything in them.
266266

267267
- [was-client](https://github.com/interop-alliance/was-client) -- the WAS HTTP
268268
client, the sync port this driver runs on, the wire vocabulary, the error
269-
classes, and the four `err.name` predicates.
269+
classes, and the `err.name` predicates.
270270
- [was-react](https://github.com/interop-alliance/was-react) and the Freewallet
271271
browser wallet -- the two consumers, and the two copies this package was
272272
merged from.

‎CHANGELOG.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
persisted with the retired object record reads as no checkpoint and pulls from
1313
the beginning. `createWasReplication` returns
1414
`RxReplicationState<SyncedDoc, ReplicationCheckpoint>`. Requires
15-
`@interop/was-client` 0.84.0 or later.
16-
- The pull handler restarts the feed from the beginning when the server refuses
17-
the stored checkpoint with `invalid-request-body` (400) at `#/checkpoint`, as
18-
for a checkpoint issued by another server. A 400 of that type pointing
19-
elsewhere is rethrown. The refused checkpoint is remembered for the life of
20-
the handler, so an empty restarted feed (which RxDB does not persist a
21-
checkpoint for) costs the 400 round trip once rather than once per poll.
15+
`@interop/was-client` 0.85.0 or later.
16+
- The pull handler restarts the feed from the beginning when the port raises its
17+
refused-checkpoint signal (`isSyncCheckpointError`), as for a checkpoint
18+
issued by another server. Every other pull failure is rethrown. The refused
19+
checkpoint is remembered for the life of the handler, so an empty restarted
20+
feed (which RxDB does not persist a checkpoint for) costs the 400 round trip
21+
once rather than once per poll.
2222

2323
## 0.6.0 - 2026-09-28
2424

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@eslint/js": "^10.0.1",
5858
"@interop/ed25519-verification-key": "^8.2.1",
5959
"@interop/logger": "^0.2.0",
60-
"@interop/was-client": "^0.84.0",
60+
"@interop/was-client": "^0.85.0",
6161
"@playwright/test": "^1.60.0",
6262
"@types/node": "^26.0.1",
6363
"@vitest/coverage-v8": "^4.1.7",
@@ -74,7 +74,7 @@
7474
"was-teaching-server": "link:../was-teaching-server"
7575
},
7676
"peerDependencies": {
77-
"@interop/was-client": ">=0.84.0 <1.0.0",
77+
"@interop/was-client": ">=0.85.0 <1.0.0",
7878
"rxdb": "^17.0.0"
7979
},
8080
"peerDependenciesMeta": {

0 commit comments

Comments
 (0)