Skip to content

feat: adopt the latest Enbox release set (agent 0.8.32 / api 0.6.71) - #184

Merged
LiranCohen merged 1 commit into
mainfrom
feat/adopt-enbox-0.8.32
Jul 21, 2026
Merged

feat: adopt the latest Enbox release set (agent 0.8.32 / api 0.6.71)#184
LiranCohen merged 1 commit into
mainfrom
feat/adopt-enbox-0.8.32

Conversation

@LiranCohen

Copy link
Copy Markdown
Contributor

Summary

Adopts the newest published @enbox release set — the agent 0.8.32 durable-replication rework — and migrates the one consumer-facing sync API break.

Package From To Package From To
@enbox/agent 0.8.31 0.8.32 @enbox/dwn-clients 0.4.22 0.4.23
@enbox/api 0.6.70 0.6.71 @enbox/dwn-sdk-js 0.4.15 0.4.16
@enbox/auth 0.6.77 0.6.78 @enbox/protocols 0.2.97 0.2.98
@enbox/browser 0.3.62 0.3.63 @enbox/connect 0.1.11 0.1.12

common / crypto / dids already newest. Single copy of every package in the lockfile (no duplicate dwn-sdk-js).

What rides in from the SDK

  • cursorless durable pull/push wakes — both directions resume from a persisted checkpoint and advance only after a settled page;
  • the coalesced live-push feed and transport-owned browser wake recovery (online/visibility handled in the WebSocket transport, not a second agent state machine);
  • MessagesSubscribe feed snapshot + empty-log anchor cursor (dwn-sdk-js 0.4.16);
  • corrupt-checkpoint recovery and bounded repair churn.

Breaking SyncEvent change (the only code migration)

agent 0.8.32 removes reconcile:applied and gap:detected; delivery:applied — now carrying a per-message descriptor — is the single notification for each freshly admitted remote message. use-sync-query-invalidation.ts was the only consumer:

  • dropped the reconcile:applied branch in the agent-tenant guard (delivery:applied already covers it);
  • dropped the identity-tenant reconcile:applied fallback and its now-unused queueAllIdentityQueries helper — delivery:applied always carries a descriptor, so queueIdentityDescriptor gives precise cache routing without the old conservative "refresh every identity view" path;
  • removed the obsolete CID-only-reconciliation test.

use-sync-connectivity (link:connectivity-change), use-live-sync-status (repair:failed/link:*, getRemoteSyncStatus/retryRemoteNow), and registration-repair (repair:failed) all use events that still exist — no change needed.

Test plan

  • bun install — lockfile resolves the 0.8.32 set, single copies
  • bun run buildtsc -b && vite build clean (the SyncEvent union change is now type-checked, unlike the older any-typed agent)
  • bun run lint — 0 errors (pre-existing warnings only, in untouched files)
  • bun run test779 passed, 10 pre-existing skips

Follow-ups (out of scope here)

Two sync-timing issues seen in real usage are being investigated separately and may warrant app- or SDK-side fixes: (1) a newly created profile not appearing on dapps until the wallet app is opened on its own (initial push not completing in the connect-only context); (2) empty notes/notebooks briefly after connect/renew in notesd (pull-vs-query race). Notes will follow.

Bump the @enbox/* set to the newest published versions:

  agent      0.8.31 -> 0.8.32   dwn-clients 0.4.22 -> 0.4.23
  api        0.6.70 -> 0.6.71   dwn-sdk-js  0.4.15 -> 0.4.16
  auth       0.6.77 -> 0.6.78   protocols   0.2.97 -> 0.2.98
  browser    0.3.62 -> 0.3.63   connect     0.1.11 -> 0.1.12

(common/crypto/dids already newest.) This adopts the reworked durable
replication engine: cursorless durable pull/push wakes, the coalesced
live-push feed, transport-owned browser wake recovery, the
MessagesSubscribe feed snapshot + empty-log anchor cursor, and
corrupt-checkpoint recovery.

Breaking SyncEvent change: agent 0.8.32 removes the `reconcile:applied`
and `gap:detected` events; `delivery:applied` (now carrying a per-message
descriptor) is the single notification for each freshly admitted remote
message. Migrate use-sync-query-invalidation to it:

  - drop the `reconcile:applied` branch in the agent-tenant guard (delivery
    events already cover it);
  - drop the identity-tenant `reconcile:applied` fallback and its now-unused
    queueAllIdentityQueries helper — delivery:applied always carries a
    descriptor, so queueIdentityDescriptor gives precise routing without the
    conservative refresh-everything path;
  - remove the obsolete CID-only-reconciliation test.

Test plan: bun install; bun run build (tsc -b clean); bun run lint
(0 errors); bun run test (779 pass).
@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 69.34% (🎯 25%) 3524 / 5082
🟢 Statements 67.32% (🎯 25%) 3725 / 5533
🟢 Functions 65.82% (🎯 30%) 1075 / 1633
🟢 Branches 63.36% (🎯 29%) 2338 / 3690
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/enbox/hooks/use-sync-query-invalidation.ts 79.67% 55.26% 84% 79.16% 54-55, 63-71, 126, 132, 204-205, 209-212, 225-234, 265-269, 272, 285-286, 297, 301
Generated in workflow #432 for commit 394c576 by the Vitest Coverage Report Action

@LiranCohen
LiranCohen merged commit 6659c21 into main Jul 21, 2026
4 checks passed
@LiranCohen
LiranCohen deleted the feat/adopt-enbox-0.8.32 branch July 21, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant