fix(bridge): resolve type errors in bridge-sandbox-e2e suite#409
Merged
islandbitcoin merged 1 commit intoJun 17, 2026
Merged
Conversation
The Bridge sandbox e2e suite never passed through tsc (CI was disabled), so type errors accumulated and now fail Check Code. All test-only: - helpers.ts: route mock req/res through 'unknown' before casting to the Express handler param types (TS2352). - execQuery: make generic (default Record<string, unknown>, backward compatible) so callers can type the GraphQL payload (TS2339). - HandlerResponse.body: type as Record<string, unknown> instead of unknown, fixing .body access in the deposit/external-account specs without per-site casts (TS18046). - cutover-state.spec: type the execQuery result and narrow the error union before asserting. No production code touched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Resolves the
Check Code(tsc) failures surfaced once CI began running on the integration branch. Thetest/flash/bridge-sandbox-e2e/suite was never type-checked while Actions was disabled, so type errors accumulated. Test-only changes — no production code touched. Fixes ENG-423.Changes
helpers.ts— mock req/res casts (TS2352): the inject helpers castcreateReqRes()'s generic objects straight to the Express handler param types. Route them throughas unknown as …(TS's own suggestion).helpers.ts—execQuery(TS2339): made generic (<T = Record<string, unknown>>, backward-compatible default) so call sites can type the GraphQL payload.helpers.ts—HandlerResponse.body(TS18046): typed asRecord<string, unknown>instead ofunknown(defaulting to{}in the inject returns), which fixes.bodyaccess indeposit-withdrawal.specandexternal-account.specwithout per-site casts.cutover-state.spec.ts: type theexecQueryresult and narrow the error union (if ("errors" in response) throw …) before asserting.Validation caveat
tsclocally (no install in my environment), so this is analysis-validated against the exact errors tsc reported. CI is the real check.tmp/bridge-rebase-pr-readydon't run workflows. Either merge ci: run checks on the bridge-rebase integration branch #408 first, or validate this alongside it.🤖 Generated with Claude Code