Repository navigation
Share one crypto-provider cache across hub mail senders (CL-7284) - #620
Merged
TheGreatAxios merged 3 commits intoSep 4, 2026
Conversation
Contributor
Author
|
Fixes CL-7284 |
Contributor
Author
Self-reviewVerdict: the fix does what the ticket asks — one process-wide
Targeted tests run (all pass):
No fixes needed; nothing pushed. |
Independent cache instances mint different signing keys for the same id, which is why every mail sender in a hub process must share one cache rather than constructing its own.
Chat, webhook launch, routine launch, and agent-definition drafting
each constructed their own cache. Independent caches mint independent
Ed25519 keys for the same string, and workbench ids and run instance
ids share the generateId("workflowRun") shape, so the same id could
sign mail with four different keys.
The hub now constructs one TTL-bounded cache and passes it into every
consumer. createHubChatPlatform takes that cache instead of minting
its own.
A second createCryptoProviderCache() in createHub would still typecheck. This scan pins exactly one production constructor under apps/hub and that chat, webhook launch, routine launch, and one-shot drafting all receive that same cache.
TheGreatAxios
force-pushed
the
cl-7284-four-separate-crypto-provider-caches-can-mint-four-different
branch
from
September 4, 2026 05:50
6dd6930 to
2815669
Compare
TheGreatAxios
added a commit
that referenced
this pull request
Sep 4, 2026
Rebasing onto main's shared cryptoProviders cache (#620) left one platform-adapter test calling the raw createHubChatPlatform wrapper instead of createPlatform, so it no longer got a default credentialCipher and failed to mint.
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.
CL-7284
Chat sendMail, webhook launch, routine launch, and agent-definition
drafting each constructed their own
createCryptoProviderCache.Independent caches mint independent Ed25519 keys for the same string,
so the same workbench or instance id could sign mail with four
different keys.
Chat keys by workbench id; webhook, routine, and one-shot drafting key
by the launched run's instance id. Both are
generateId("workflowRun")(older workbenches:
generateId("instance")), so they share a stringshape. generateId uniqueness keeps distinct entities from colliding;
separate caches still rotate the key for the same id across consumers.
Fix
Construct one TTL-bounded
createCryptoProviderCache(CL-7223) in thehub composition root and pass it into
createHubChatPlatform, webhooklaunch, the routine launcher, and one-shot drafting.
createHubChatPlatformno longer mints a cache of its own.Testing
bun test packages/folded-runs/src/crypto-cache.test.tsbun test packages/chat/test/platform-adapter.test.ts packages/chat/test/relaunch-close.test.tsbun run typecheckbun run check:structuralbun run check's full package test run hits pre-existing Postgres28P01against the localDATABASE_URL(unrelated DB-gated suites).Fixes CL-7284