Skip to content

feat: adopt the latest Enbox release set (agent 0.8.31 / api 0.6.70) - #183

Merged
LiranCohen merged 2 commits into
mainfrom
feat/enbox-0.8.31
Jul 20, 2026
Merged

feat: adopt the latest Enbox release set (agent 0.8.31 / api 0.6.70)#183
LiranCohen merged 2 commits into
mainfrom
feat/enbox-0.8.31

Conversation

@LiranCohen

@LiranCohen LiranCohen commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adopts the latest Enbox release set (agent 0.8.31, api 0.6.70, auth 0.6.77, browser 0.3.62, connect 0.1.11, dwn-clients 0.4.22, dwn-sdk-js 0.4.15, protocols 0.2.97) — protocol-owned record encryption, authoritative stored record data, pre-dispatch raw payload validation, and opt-in message-subscription record hydration.

One wallet adaptation — protocol-owned encryption policy (#1383): the connect override path (reconfigureProtocolsForOverride) passed the caller-controlled encryption switch on ProtocolsConfigure, which this release removes. Protocol definitions are now the sole source of encryption policy: the agent derives and injects $keyAgreement keys itself whenever a definition's types demand encryption. The wallet was computing the same predicate (protocolHasEncryptedTypes) the agent now applies internally, so behavior is unchanged while the decision moves to the layer that owns it — and a malicious or buggy caller can no longer install an encrypted protocol without its keys. The preflight's validation-side key derivation (Protocols.deriveAndInjectPublicEncryptionKeys with the synthetic validation signer) is unaffected.

Absorbed without changes — authoritative stored data (#1382): low-level reads, queries, and subscriptions now stay on the raw stored bytes, and decryption happens lazily when record.data is consumed. Every wallet consumption site (social graph, profiles, group members, profile image cache) already wraps its data.json()/data.blob() reads in per-record typed error handling, so this lands as a strict improvement: one undecryptable record surfaces at its own read instead of failing the containing query or subscription.

Deliberately not enabled — subscription record hydration (#1384, api 0.6.70): messages.subscribe can now hydrate each RecordsWrite event with version-pinned stored data (includeRecords), read under the feed's own Messages.Read authorization. The wallet's invalidation subscriptions key cache updates off event descriptors alone and never consume record payloads, so hydration stays off there — enabling it would add a per-event record read for data the wallet immediately discards.

Transparent — raw payload validation (#1380): RecordsWrite payloads whose CID or size does not match the signed message are rejected before local processing or remote transmission, so plaintext can never leave under a ciphertext-committing message.

Test plan

  • bun install (lockfile updated for the new release set)
  • bun run lint (0 errors; pre-existing warning set unchanged)
  • bunx tsc --noEmit
  • bun run test (780 passed, 10 skipped)
  • bun run build
  • bun run test:e2e (28 passed, isolated from other local dev servers)

🤖 Generated with Claude Code

Updates the direct Enbox dependencies to the release delivering
protocol-owned encryption policy, authoritative stored record data, and
pre-dispatch raw payload validation.

The connect override path no longer passes the caller-controlled
encryption switch on ProtocolsConfigure: protocol definitions are now the
sole source of encryption policy and the agent derives and injects
$keyAgreement keys itself whenever a definition's types demand
encryption — the wallet computed the same predicate the agent now
applies, so behavior is unchanged while the decision moves to the layer
that owns it.

Decryption failures now surface when record.data is consumed instead of
failing the containing read, query, or subscription; every wallet
consumption site already wraps data reads in per-record typed error
handling, so one undecryptable record no longer fails a whole query.
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 69.42% (🎯 25%) 3536 / 5093
🟢 Statements 67.4% (🎯 25%) 3737 / 5544
🟢 Functions 65.85% (🎯 30%) 1076 / 1634
🟢 Branches 63.37% (🎯 29%) 2341 / 3694
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/features/connect/protocol-override.ts 84.37% 73.07% 100% 83.33% 100-102, 118-120, 136, 146, 154
Generated in workflow #430 for commit b5537aa by the Vitest Coverage Report Action

api 0.6.70 adds opt-in message-subscription record hydration
(includeRecords) with version-pinned stored data; browser 0.3.62 and
protocols 0.2.97 follow. The wallet's invalidation subscriptions key
cache updates off event descriptors alone, so hydration stays
deliberately disabled there — no per-event record reads for data the
wallet does not consume.
@LiranCohen LiranCohen changed the title feat: adopt the Enbox 0.8.31 release line feat: adopt the latest Enbox release set (agent 0.8.31 / api 0.6.70) Jul 20, 2026
@LiranCohen
LiranCohen merged commit de64183 into main Jul 20, 2026
4 checks passed
@LiranCohen
LiranCohen deleted the feat/enbox-0.8.31 branch July 20, 2026 22:19
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