Skip to content

refactor(cdc): make connector identifiers semantically specific - #329

Draft
seonghobae wants to merge 36 commits into
developfrom
fix/cdc-source-semantic-identifiers
Draft

refactor(cdc): make connector identifiers semantically specific#329
seonghobae wants to merge 36 commits into
developfrom
fix/cdc-source-semantic-identifiers

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Naming defect

The organization-owned CDC bounded context exposed generic one-word identity vocabulary in two related seams: configured source declarations (SourceSpec.id() / SourceSpec.type()) and connector SPIs (CdcSourceConnector.id() / CdcTargetConnector.id(), plus generic ID constants and registry locals). The bounded context already supplies the precise concepts: source identity, target identity, and source connector type.

TDD sequence

The original regression-first commit required SourceSpec.sourceId() / SourceSpec.sourceType() while pinning the established {id,type} description keys as a compatibility boundary. A later regression-first commit 949b04aafdaa895ff273cfb91d2b7ff4bc5dacfc required CdcSourceConnector.sourceId() and CdcTargetConnector.targetId() before those semantic accessors existed in production. Successor commits implement both contracts through ordinary non-force history.

Implemented repair

  • CdcSourceFactory.SourceSpec and configuration internals use sourceId / sourceType.
  • CdcSourceConnector.sourceId() and CdcTargetConnector.targetId() are the organization-owned connector identity vocabulary used by registries, controllers, built-in connectors, and tests.
  • Built-in source/target constants are SOURCE_ID / TARGET_ID; historical ID constants and id() SPI methods remain deprecated compatibility aliases rather than internal authority.
  • CdcSourceRegistry / CdcTargetRegistry use semantic fields, parameters, locals, and lookups (sourceConnectorsById, targetConnectorsById, sourceId, targetId).
  • Existing /api/cdc response keys such as id, and existing Spring configuration keys id / type, remain unchanged at the compatibility/anti-corruption boundary.
  • Existing validation exception text is preserved so a naming-only refactor does not introduce unrelated behavioral changes.
  • Doctoring documents DDD vocabulary, compatibility seams, persistence non-impact, and verification expectations.

Safety

No connector delivery behavior, Debezium/Kafka semantics, database persistence, secrets, dependency versions, runtime authority, or wire/config key changes are intended. The SPI compatibility aliases keep existing generic callers available while repository-owned code uses semantic names. No force-push, bypass, gate weakening, skipped tests, or stale evidence.

Merge gate

Keep Draft until the unchanged current head has fresh required checks terminal-success, valid review findings/threads resolved, and ordinary repository review/protection requirements satisfied.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title refactor(cdc): make source identifiers semantically specific refactor(cdc): make connector identifiers semantically specific Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Exact-head CI RCA and minimal repair — 2026-09-07

Predecessor head cd4bade91e8d0d32cf7c73903893b0968e904912 failed CI run 33542053772 identically on Windows job 99970519947, Ubuntu job 99970520072, and macOS job 99970520322. The root etl-service suite completed 327 tests with zero failures before cdc-service:testCompile stopped at XtrmetlPropertiesSecurityDefaultTest.java:54: this Spring BindResult.orElseThrow overload requires a Supplier<? extends X>, but the PR-added binding regression called it with no arguments.

Commit 5daa6c9b5bb1c4ab23c96ce0c5af7073f6b804c7 is the smallest owner-side repair: the existing RED regression remains intact and now supplies an explicit IllegalStateException factory. Production CDC behavior, the legacy id/type compatibility boundary, dependencies, workflows, and coverage gates are unchanged.

Fresh exact-head runs were created for 5daa6c9…: CI 34078667793, CodeQL PR 34078667795, Security Scan 34078667802, SAST 34078667798, Dependency Review 34078667772, and SBOM 34078667825. They are queued and are not acceptance evidence yet. Keep this PR Draft until the unchanged successor head has terminal checks and review evidence. No force update, rerun, self-approval, threshold change, or predecessor GREEN transfer was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant