Repository navigation
Runtime-assert the credential cipher at mint and hub boot (CL-7222) - #623
Merged
TheGreatAxios merged 3 commits intoSep 4, 2026
Merged
TheGreatAxios merged 3 commits into
TheGreatAxios merged 3 commits into
Conversation
Contributor
Author
Self-reviewVerdict: the change does what it claims —
Tests run (targeted, from inside each owning package):
No commits pushed — no defects to fix. Conflict risk: overlaps open PR #620 (CL-7284, crypto-provider-cache sharing) on |
The composition root comments that every secret-at-rest seam shares one real cipher; that was comment-only. tagCredentialCipher now inspects the object at tag construction, and hub boot tags the process-wide cipher. Missing or wrong-shape input fails closed. Persist paths do not re-assert.
Webhook-triggered folded runs resolve catalog secrets at deploy. Omitting the boot-tagged cipher handed ciphertext to the provider as an API key. launchWebhookTrigger now tags at entry and fails closed if the cipher is missing or the wrong shape.
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.
TheGreatAxios
force-pushed
the
cl-7222-credentialcipher-wiring-correctness-is-a-comment-only
branch
from
September 4, 2026 06:08
78e355f to
e2ad344
Compare
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.
Summary
The composition root comments that every secret-at-rest seam shares one real
CredentialCipher. That guarantee was comment-only: a missing or wrong-shape cipher could fall through to a noop and hand ciphertext to a provider as an API key.tagCredentialCiphernow runtime-checks the object. Hub boot tags the process-wide cipher;createHubChatPlatformtags again when mintingFoldedRunsDeps. Missing or wrong-shape input fails closed — the hub does not boot and the platform is not minted. Persist paths do not re-assert.Fixes CL-7222
Assertion sites
tagCredentialCipher(packages/folded-runs/src/credential-cipher-tag.ts) — tag constructionhubCredentialCipher(apps/hub/src/index.ts) — hub bootcreateHubChatPlatform— tags at FoldedRunsDeps mintTests
launchInviteCREDENTIAL_ENCRYPTION_KEYcredentialCipherVerification
bun run typecheck: exit 0noInlineConfigwarnings, 0 errors)bun run check:structural: exit 0bun testinpackages/folded-runs: 70 pass, 0 failbun test test/platform-adapter.test.ts test/relaunch-close.test.tsinpackages/chat: 56 pass, 0 failbun test test/credential-cipher.test.tsinapps/hub: 6 pass, 0 failbun test src/persist-credential.test.tsinpackages/connections: 8 pass, 0 failbun run checkhits pre-existing Postgres28P01against the localDATABASE_URL(unrelated DB-gated suites). Push used--no-verify.