Evidence
src/services/kyc/KycRouter.ts:41 contains throw new Error('Invalid route table signature. Fails closed.');.
src/services/kyc/KycRouter.ts:58 contains throw new Error(Jurisdiction ${jurisdiction} not supported. Fails closed.);.
src/services/kyc/KycRouter.ts:63 contains throw new Error(Configured provider ${providerName} not registered.);.
Problem
RouteTableEntry contains an explicit failure or empty-result path that needs a regression suite to prevent silent behavior changes.
Required change
Exercise the branch evidence in src/services/kyc/KycRouter.ts, assert the returned value or error contract, and add tests for the neighboring normal path and boundary inputs.
Acceptance criteria
- Cover the named behavior with focused automated tests, including the relevant success and failure paths.
- Preserve the existing public contract unless the change includes an explicit compatibility plan.
- Make error and boundary behavior observable and deterministic.
Validation
- Run the focused test file and the surrounding suite.
- Run the repository's configured lint, type, build, or contract checks.
- Include the exercised cases and results in the pull request description.
Evidence
src/services/kyc/KycRouter.ts:41containsthrow new Error('Invalid route table signature. Fails closed.');.src/services/kyc/KycRouter.ts:58containsthrow new Error(Jurisdiction ${jurisdiction} not supported. Fails closed.);.src/services/kyc/KycRouter.ts:63containsthrow new Error(Configured provider ${providerName} not registered.);.Problem
RouteTableEntry contains an explicit failure or empty-result path that needs a regression suite to prevent silent behavior changes.
Required change
Exercise the branch evidence in src/services/kyc/KycRouter.ts, assert the returned value or error contract, and add tests for the neighboring normal path and boundary inputs.
Acceptance criteria
Validation