PR Y: wire EXT-* blocker IDs into orchestrator mock-mode logs #28

Merged
nsatoshi merged 0 commits from devin/1776894844-pr-y-blocker-ids into main 2026-04-22 14:58:57 -07:00
Owner

Summary

Mirror the external-dependency blocker gate added to the proxmox repo (scripts/verify/check-external-dependencies.sh + docs/03-deployment/EXTERNAL_DEPENDENCY_BLOCKERS.md) in the CurrenciCombo orchestrator, so startup logs and provider-switch mock-mode logs surface the same EXT-* IDs the deployment pipeline already tracks.

Operators now get a grep-friendly 1:1 correspondence between:

  • check-external-dependencies.sh output (blocked: dbis_core live deployment, resolved: Chain 138 CI RPC …)
  • orchestrator startup logs ([ExternalBlockers] 6 active, 1 resolved with the same IDs structured)
  • per-service mock logs ([DbisCore] HTTP client (no DBIS_CORE_URL — mock mode; blocker EXT-DBIS-CORE active))

Central registry

src/config/externalBlockers.ts:

  • Typed EXT_BLOCKER_IDS union: EXT-DBIS-CORE, EXT-CC-PAYMENT-ADAPTERS, EXT-CC-AUDIT-LEDGER, EXT-CC-SHARED-EVENTS, EXT-CC-SHARED-SCHEMAS, EXT-FIN-GATEWAY, EXT-CHAIN138-CI-RPC.
  • BLOCKER_DETAILS — per-id title, description, resolving env var.
  • evaluateBlockers(env?) — returns {id, status, resolvedVia}[]; empty-string env is treated as unset.
  • activeBlockers(env?) — same filtered to status === "active".
  • logBlockerStatusAtBoot(logger) — single structured startup summary.

Wired sites

File Change
src/index.ts Calls logBlockerStatusAtBoot(logger) right after validateEnv().
services/dbisCore/client.ts Mock-mode log now carries blockerId: EXT-DBIS-CORE.
services/finLink/client.ts getFinLinkClient() logs live vs. in-process decisions; sandbox path carries blockerId: EXT-FIN-GATEWAY.
services/bank.ts Migrated from console.log to pino; mock-mode carries blockerId: EXT-DBIS-CORE (dbis_core is the banking back-end).
services/completeCredential/identityClient.ts Mock log tagged upstream cc-identity-core ships code but not yet deployed — distinguishes env-not-set from cc-* scaffold blockers.

Tests

tests/config/externalBlockers.test.ts — 11 tests covering registry shape, evaluation across env permutations (empty env, each resolving env set, scaffold blockers remain active, empty-string treated as unset), and log emission.

Verification

  • npx tsc --noEmit clean.
  • npx jest unit suite: 13 suites / 167 tests passing.
  • No new runtime deps. No UI.
## Summary Mirror the external-dependency blocker gate added to the proxmox repo (`scripts/verify/check-external-dependencies.sh` + `docs/03-deployment/EXTERNAL_DEPENDENCY_BLOCKERS.md`) in the CurrenciCombo orchestrator, so startup logs and provider-switch mock-mode logs surface the **same** `EXT-*` IDs the deployment pipeline already tracks. Operators now get a grep-friendly 1:1 correspondence between: - `check-external-dependencies.sh` output (`blocked: dbis_core live deployment`, `resolved: Chain 138 CI RPC …`) - orchestrator startup logs (`[ExternalBlockers] 6 active, 1 resolved` with the same IDs structured) - per-service mock logs (`[DbisCore] HTTP client (no DBIS_CORE_URL — mock mode; blocker EXT-DBIS-CORE active)`) ## Central registry `src/config/externalBlockers.ts`: - Typed `EXT_BLOCKER_IDS` union: `EXT-DBIS-CORE`, `EXT-CC-PAYMENT-ADAPTERS`, `EXT-CC-AUDIT-LEDGER`, `EXT-CC-SHARED-EVENTS`, `EXT-CC-SHARED-SCHEMAS`, `EXT-FIN-GATEWAY`, `EXT-CHAIN138-CI-RPC`. - `BLOCKER_DETAILS` — per-id title, description, resolving env var. - `evaluateBlockers(env?)` — returns `{id, status, resolvedVia}[]`; empty-string env is treated as unset. - `activeBlockers(env?)` — same filtered to `status === "active"`. - `logBlockerStatusAtBoot(logger)` — single structured startup summary. ## Wired sites | File | Change | |---|---| | `src/index.ts` | Calls `logBlockerStatusAtBoot(logger)` right after `validateEnv()`. | | `services/dbisCore/client.ts` | Mock-mode log now carries `blockerId: EXT-DBIS-CORE`. | | `services/finLink/client.ts` | `getFinLinkClient()` logs live vs. in-process decisions; sandbox path carries `blockerId: EXT-FIN-GATEWAY`. | | `services/bank.ts` | Migrated from `console.log` to pino; mock-mode carries `blockerId: EXT-DBIS-CORE` (dbis_core is the banking back-end). | | `services/completeCredential/identityClient.ts` | Mock log tagged `upstream cc-identity-core ships code but not yet deployed` — distinguishes env-not-set from cc-* scaffold blockers. | ## Tests `tests/config/externalBlockers.test.ts` — 11 tests covering registry shape, evaluation across env permutations (empty env, each resolving env set, scaffold blockers remain active, empty-string treated as unset), and log emission. ## Verification - `npx tsc --noEmit` clean. - `npx jest` unit suite: **13 suites / 167 tests** passing. - No new runtime deps. No UI.
nsatoshi merged commit 3787362406 into main 2026-04-22 14:58:57 -07:00
nsatoshi deleted branch devin/1776894844-pr-y-blocker-ids 2026-04-22 14:58:57 -07:00
Sign in to join this conversation.