PR W: DBIS Complete Credential (cc-*) adapters with provider-switch #27
Reference in New Issue
Block a user
Delete Branch "devin/1776892271-pr-w-cc-adapters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Headless client adapters for the DBIS Complete Credential bounded-context repos (
DBIS/cc-*) that actually ship runnable code today:cc-identity-core— HTTP service (GET /health,GET /ready,POST /v1/subjectsper upstreamopenapi.yaml/src/server.mjs).cc-compliance-controls—controls/matrix/v0.yaml(loader with embedded v0 snapshot + optional remote JSON override).Other
cc-*repos inspected but not wired —cc-payment-adapters,cc-audit-ledger,cc-shared-events,cc-shared-schemasare template scaffolds upstream at recon time (README:Template scaffold only. Implement per master plan delivery phases…). When those services ship, add sibling clients here following the same provider-switch pattern.Closes gap-analysis v3 §10 “DBIS cc-* separate repos” external blocker — the CurrenciCombo side is now ready; activation is a 1-env-var flip per adapter when the upstream services deploy.
Provider switch
CcIdentityClientCC_IDENTITY_URLMockCcIdentityClientHttpCcIdentityClientwithX-API-Key(CC_IDENTITY_API_KEY), auto-mintedX-Correlation-Id, 10sAbortControllertimeoutloadControlsMatrix()CC_CONTROLS_MATRIX_URLFiles
orchestrator/src/services/completeCredential/types.ts— shared shapes.orchestrator/src/services/completeCredential/identityClient.ts— Http + Mock + factory.orchestrator/src/services/completeCredential/controlsMatrix.ts— embedded v0 + remote loader +findControl()helper.orchestrator/src/services/completeCredential/index.ts— barrel.orchestrator/tests/services/completeCredential.test.ts— 16 tests across 4 describe blocks covering both legs of both adapters.Verification
npx tsc --noEmitclean.npx jestunit suite: 12 suites / 156 tests, all passing (no regressions from PR V landing).Headless clients for the DBIS/cc-* bounded-context repos that actually ship runnable code today: - cc-identity-core — HTTP service (GET /health, GET /ready, POST /v1/subjects per upstream openapi.yaml / src/server.mjs). - cc-compliance-controls — controls/matrix/v0.yaml (loader with embedded v0 snapshot + optional remote JSON override). Other cc-* repos (cc-payment-adapters, cc-audit-ledger, cc-shared-events, cc-shared-schemas) remain template scaffolds upstream at recon time; when those services ship, add sibling clients here following the same pattern. Wired via the standard provider-switch pattern: - CC_IDENTITY_URL unset → MockCcIdentityClient. - CC_IDENTITY_URL set → HttpCcIdentityClient (X-API-Key + X-Correlation-Id auto-minted, 10s AbortController timeout). - CC_CONTROLS_MATRIX_URL unset → embedded v0 matrix. - CC_CONTROLS_MATRIX_URL set → remote JSON loader, normalises snake_case → camelCase per upstream YAML. 16 jest tests cover both legs of both adapters: mock shapes + live fetch stubs for auth headers, correlation ids, JSON body, path encoding, error handling, and matrix normalisation. No network, no UI. Full unit suite: 12 suites / 156 tests still passing. tsc clean.