Repository navigation
perf(relay): verify cached history in the native host - #3426
Merged
Merged
Conversation
Co-authored-by: Codex <[email protected]> Signed-off-by: Jordan Mecom <[email protected]>
Co-authored-by: Codex <[email protected]> Signed-off-by: Jordan Mecom <[email protected]>
jmecom
force-pushed
the
jm/native-cached-verification
branch
from
November 13, 2026 18:05
ce22144 to
51ab4ba
Compare
jmecom
marked this pull request as ready for review
November 13, 2026 18:18
kalvinnchau
approved these changes
Nov 13, 2026
kalvinnchau
left a comment
Contributor
There was a problem hiding this comment.
🤖 Reviewed at 51ab4ba. Routing cached head events, embedded head profiles and discovery through verifyStored keeps the per-input ordering, all-or-nothing rejection and JS fallback of parseEvents/native.settle. The post-await guards match the existing loop fences. Empty or already-proven batches skip the host. CI is green. No findings.
Add startup-service cases where a cached history message or embedded profile carries a signature only the host accepts. With an accepting host they are restored from its answer alone, which fails on main; with a rejecting host the JavaScript fallback drops the head and its profiles. Co-authored-by: jm-opus <c10eccc76a9e867c86efb341b91c7a0f401dd4da6b36cae0a2d87708d7fb06d8@buzz.block.builderlab.xyz> Signed-off-by: Jordan Mecom <[email protected]>
joshfriend
added a commit
that referenced
this pull request
Nov 13, 2026
* origin/main: (153 commits) feat(agents): preview where interrupted agents were working before resume (#3494) perf(messages): close the editor and delete dialog on submit (#3493) feat(messages): quote selected message text into the composer (#2392) perf(toast): scope docked clearance to the toast host (#3489) fix(unread): undo exact captured ordinary reads conditionally (#3473) fix(solo): keep navigation responsive during chat deletion (#3488) fix(channels): keep custom thread tab names until the tab closes (#3458) perf(relay): verify cached history in the native host (#3426) fix(settings): refine claude and typesafe key setup dialogs (#3391) Update bundled help for Bestie and agent settings (#3194) feat(profiles): share and show a local time zone (#3332) Revert "feat(link-previews): unfurl web links below messages by default" (#3480) Show disabled plugin chats in Solo (#3456) perf(messages): host one context menu per message list (#3465) test(claude): keep the quit-release test copy above the minimum version (#3477) fix(profiles): restore verified names from the device cache (#3382) fix(mentions): show addressed agents first in Solo audience picker (#2856) perf: count member access once and scope find highlights to painting (#3464) perf(messages): prepare a message once for its renderer and link previews (#3466) fix(composer): speed up long pastes and paste office text as text (#3441) ... # Conflicts: # docs/plugin-authoring-guide.md
joshfriend
added a commit
that referenced
this pull request
Nov 13, 2026
…when-ready * origin/main: (21 commits) fix(agents): report a conversation wake that fails before its turn starts (#2192) fix(usage): read Claude transcripts over 50 MB a page at a time (#3498) feat(agents): preview where interrupted agents were working before resume (#3494) perf(messages): close the editor and delete dialog on submit (#3493) feat(messages): quote selected message text into the composer (#2392) perf(toast): scope docked clearance to the toast host (#3489) fix(unread): undo exact captured ordinary reads conditionally (#3473) fix(solo): keep navigation responsive during chat deletion (#3488) fix(channels): keep custom thread tab names until the tab closes (#3458) perf(relay): verify cached history in the native host (#3426) fix(settings): refine claude and typesafe key setup dialogs (#3391) Update bundled help for Bestie and agent settings (#3194) feat(profiles): share and show a local time zone (#3332) Revert "feat(link-previews): unfurl web links below messages by default" (#3480) Show disabled plugin chats in Solo (#3456) perf(messages): host one context menu per message list (#3465) test(claude): keep the quit-release test copy above the minimum version (#3477) fix(profiles): restore verified names from the device cache (#3382) fix(mentions): show addressed agents first in Solo audience picker (#2856) perf: count member access once and scope find highlights to painting (#3464) ...
joshfriend
added a commit
that referenced
this pull request
Nov 13, 2026
…n-on-github * origin/main: (21 commits) fix(agents): report a conversation wake that fails before its turn starts (#2192) fix(usage): read Claude transcripts over 50 MB a page at a time (#3498) feat(agents): preview where interrupted agents were working before resume (#3494) perf(messages): close the editor and delete dialog on submit (#3493) feat(messages): quote selected message text into the composer (#2392) perf(toast): scope docked clearance to the toast host (#3489) fix(unread): undo exact captured ordinary reads conditionally (#3473) fix(solo): keep navigation responsive during chat deletion (#3488) fix(channels): keep custom thread tab names until the tab closes (#3458) perf(relay): verify cached history in the native host (#3426) fix(settings): refine claude and typesafe key setup dialogs (#3391) Update bundled help for Bestie and agent settings (#3194) feat(profiles): share and show a local time zone (#3332) Revert "feat(link-previews): unfurl web links below messages by default" (#3480) Show disabled plugin chats in Solo (#3456) perf(messages): host one context menu per message list (#3465) test(claude): keep the quit-release test copy above the minimum version (#3477) fix(profiles): restore verified names from the device cache (#3382) fix(mentions): show addressed agents first in Solo audience picker (#2856) perf: count member access once and scope find highlights to painting (#3464) ...
joshfriend
added a commit
that referenced
this pull request
Nov 13, 2026
* origin/main: (31 commits) Let plugin panels name their tab with panels.useTabTitle (#3251) fix(agents): report a conversation wake that fails before its turn starts (#2192) fix(usage): read Claude transcripts over 50 MB a page at a time (#3498) feat(agents): preview where interrupted agents were working before resume (#3494) perf(messages): close the editor and delete dialog on submit (#3493) feat(messages): quote selected message text into the composer (#2392) perf(toast): scope docked clearance to the toast host (#3489) fix(unread): undo exact captured ordinary reads conditionally (#3473) fix(solo): keep navigation responsive during chat deletion (#3488) fix(channels): keep custom thread tab names until the tab closes (#3458) perf(relay): verify cached history in the native host (#3426) fix(settings): refine claude and typesafe key setup dialogs (#3391) Update bundled help for Bestie and agent settings (#3194) feat(profiles): share and show a local time zone (#3332) Revert "feat(link-previews): unfurl web links below messages by default" (#3480) Show disabled plugin chats in Solo (#3456) perf(messages): host one context menu per message list (#3465) test(claude): keep the quit-release test copy above the minimum version (#3477) fix(profiles): restore verified names from the device cache (#3382) fix(mentions): show addressed agents first in Solo audience picker (#2856) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cached channel discovery, message history, and embedded profiles were reverified in JavaScript during desktop restoration. Route them through the existing
verifyStoredcapability and native libsecp256k1 worker. This is an independent change based on main; it introduces no batch cryptography, Rust changes, or dependencies.Preserve event-shape/content-hash validation, JavaScript fallback for unavailable or rejecting hosts, and the guards that prevent late results from surviving disposal, cache clear, or access revocation. Browser behavior and relay-read counts are unchanged.
A local native WKWebView fixture on base
63a0c1bdplus this unchanged store implementation, with 64 saved histories (1,344 signed events plus 128 discovery records) measured median selected-history visibility of 271 → 165 ms, and complete restoration of 1,136 → 246 ms. Three runs per version in alternating order, Apple M4 Max, Rust 1.98.1, optimized development native build and Vite frontend. All runs made zero relay reads. These timings exclude process launch, community handshake, signing and storage seeding; they are not production telemetry. No benchmark artifacts are checked in.The three focused Vitest files pass all 124 tests. Added host-routing cases fail on the baseline; removing the new post-await guards makes both native revoke/regrant cases fail by admitting a stale profile. Source was restored and affected tests passed again. Existing tests were extended; no browser journeys or test infrastructure were added. Independent review found no blockers. The push hook also exposed an existing dialog test race on main; a four-line frame wait preserves its focus and exact cooldown assertions, and all 12 dialog tests pass.
After rebasing onto
6223ae59, the restored head batch also carries the cached membership notices that #3461 added, so the host verifies them with the head's events. TypeScript passes, and the focused files plus the adjacent verified-profile, native and store tests pass (323 tests in seven files). A one-off host-path run of #3461's notice-restore test also passed. The native timing fixture was not rerun on this base. Normal live-relay and human acceptance remain outstanding.After reviewing #3487, which routes the same head and discovery restores through
verifyStored, this branch adds its two startup-service cases adapted to the embedded-profile path: a cached history message or embedded profile whose signature only the host accepts is restored from the host's answer alone (fails on main), and a rejecting host drops the head and its profiles through the JavaScript fallback. The relay suite passes (3,653 tests in 144 files) andpnpm checkis clean.