PR W: DBIS Complete Credential (cc-*) adapters with provider-switch #27

Merged
nsatoshi merged 1 commits from devin/1776892271-pr-w-cc-adapters into main 2026-04-22 21:12:23 +00:00
Owner

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/subjects per upstream openapi.yaml / src/server.mjs).
  • cc-compliance-controlscontrols/matrix/v0.yaml (loader with embedded v0 snapshot + optional remote JSON override).

Other cc-* repos inspected but not wiredcc-payment-adapters, cc-audit-ledger, cc-shared-events, cc-shared-schemas are 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

Adapter Env var Unset behaviour Set behaviour
CcIdentityClient CC_IDENTITY_URL MockCcIdentityClient HttpCcIdentityClient with X-API-Key (CC_IDENTITY_API_KEY), auto-minted X-Correlation-Id, 10s AbortController timeout
loadControlsMatrix() CC_CONTROLS_MATRIX_URL Embedded v0 matrix (hand-typed snapshot) Remote JSON loader, normalises snake_case → camelCase per upstream YAML

Files

  • 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 --noEmit clean.
  • npx jest unit suite: 12 suites / 156 tests, all passing (no regressions from PR V landing).
  • No new runtime dependencies.
  • No UI changes. Headless backend only.
## 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/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 inspected but not wired** — `cc-payment-adapters`, `cc-audit-ledger`, `cc-shared-events`, `cc-shared-schemas` are 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 | Adapter | Env var | Unset behaviour | Set behaviour | |---|---|---|---| | `CcIdentityClient` | `CC_IDENTITY_URL` | `MockCcIdentityClient` | `HttpCcIdentityClient` with `X-API-Key` (`CC_IDENTITY_API_KEY`), auto-minted `X-Correlation-Id`, 10s `AbortController` timeout | | `loadControlsMatrix()` | `CC_CONTROLS_MATRIX_URL` | Embedded v0 matrix (hand-typed snapshot) | Remote JSON loader, normalises snake_case → camelCase per upstream YAML | ## Files - `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 --noEmit` clean. - `npx jest` unit suite: 12 suites / 156 tests, all passing (no regressions from PR V landing). - No new runtime dependencies. - No UI changes. Headless backend only.
nsatoshi added 1 commit 2026-04-22 21:11:31 +00:00
PR W: DBIS Complete Credential (cc-*) adapters with provider-switch
Some checks failed
CI / Frontend Lint (pull_request) Failing after 6s
CI / Frontend Type Check (pull_request) Failing after 5s
CI / Frontend Build (pull_request) Failing after 7s
CI / Frontend E2E Tests (pull_request) Failing after 10s
CI / Orchestrator Build (pull_request) Failing after 5s
CI / Orchestrator Unit Tests (pull_request) Failing after 6s
CI / Orchestrator E2E (Testcontainers) (pull_request) Has been skipped
CI / Contracts Compile (pull_request) Failing after 6s
CI / Contracts Test (pull_request) Failing after 6s
Code Quality / SonarQube Analysis (pull_request) Failing after 25s
Code Quality / Code Quality Checks (pull_request) Failing after 4s
Security Scan / Dependency Vulnerability Scan (pull_request) Failing after 4s
Security Scan / OWASP ZAP Scan (pull_request) Failing after 4s
dce9672daa
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.
nsatoshi merged commit c1aef82ede into main 2026-04-22 21:12:23 +00:00
nsatoshi deleted branch devin/1776892271-pr-w-cc-adapters 2026-04-22 21:12:24 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: d-bis/CurrenciCombo#27