Skip to content

fix(cdc): preserve DDL log confidentiality replacement - #277

Draft
seonghobae wants to merge 5 commits into
developfrom
repair/schema-ddl-log-redaction-preserved-45e1409
Draft

fix(cdc): preserve DDL log confidentiality replacement#277
seonghobae wants to merge 5 commits into
developfrom
repair/schema-ddl-log-redaction-preserved-45e1409

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Replaces the stale duplicate line #171/#267 without rewriting either history. This branch is an exact descendant of #267 current source and preserves the predecessor-only API contracts that #267 had not yet carried forward.

Exact identity

Preservation proof

The only descendant delta is 23 additive source lines: the public constructor Javadoc, public apply(...) Javadoc, and @Nullable contract on extractDdl(...) that were unique to #171. No confidentiality behavior, DDL execution/validation/idempotence logic, or #267 regression test is changed.

Keep Draft. #267's valid RED/GREEN history and CodeRabbit follow-up remain inherited history, but old reviews/checks do not become current-head acceptance evidence. Regenerate current-head CI/security/SBOM/SAST/review evidence before any integration decision. Repository-wide non-vacuous 100% owned-production coverage (#164/#205), complete vulnerability dependency materialization (#196), literal-source evidence, and qualifying independent approval remain separate gates.

After this replacement is confirmed to preserve both predecessor lines, #171 and #267 may be closed as superseded duplicates; they must not be merged separately.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1aa75d4c-83b9-46e2-9bd2-c055cf2acced

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Please review exact current head 1b8e93e92f8f6f1943d13e4bcb899d46bf77641b. Revalidate the inherited DDL-log confidentiality behavior and the preservation-only descendant delta; do not treat reviews from closed predecessors #171/#267 as current-head evidence.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected_head='1b8e93e92f8f6f1943d13e4bcb899d46bf77641b'
predecessor_head='45e140969977299a5cfe7cac2fe6b0e8689b034f'
base='942d164ceb7af497bb28a95f842db96429d1bdc4'

printf '%s\n' '== Checked-out commit =='
git rev-parse HEAD
git show -s --format='commit=%H%nparents=%P%nsubject=%s' HEAD

printf '%s\n' '== Required commits =='
git cat-file -t "$expected_head"
git cat-file -t "$predecessor_head"
git cat-file -t "$base"

printf '%s\n' '== Ancestry and distance =='
printf 'merge_base='
git merge-base "$expected_head" "$predecessor_head"
git rev-list --left-right --count "$predecessor_head...$expected_head"
git merge-base --is-ancestor "$predecessor_head" "$expected_head" && echo 'predecessor_is_ancestor=true'
git merge-base --is-ancestor "$base" "$expected_head" && echo 'base_is_ancestor=true'

printf '%s\n' '== Current-head descendant delta =='
git diff --stat "$predecessor_head" "$expected_head"
git diff --name-status "$predecessor_head" "$expected_head"
git diff --check "$predecessor_head" "$expected_head"
git diff --find-renames --find-copies --unified=80 "$predecessor_head" "$expected_head"

printf '%s\n' '== Candidate DDL log source and tests =='
fd -t f . | rg -i '(ddl|schema|log|redact|confidential|mask|sanitize|cdc)'
printf '%s\n' '== DDL/log/redaction references =='
rg -n -i -C 3 '(extractDdl|ddl.*log|log.*ddl|redact|confidential|sanitize|mask)' . \
  -g '!**/.git/**' -g '!**/target/**' -g '!**/build/**'

Length of output: 41913


🏁 Script executed:

#!/bin/bash
set -euo pipefail

source_file='cdc-service/src/main/java/com/xtrmetl/cdc/replication/SchemaChangeReplicaApplier.java'
logging_test='cdc-service/src/test/java/com/xtrmetl/cdc/replication/SchemaChangeReplicaApplierLoggingTest.java'
security_test='cdc-service/src/test/java/com/xtrmetl/cdc/replication/SchemaChangeReplicaApplierSecurityTest.java'
predecessor_head='45e140969977299a5cfe7cac2fe6b0e8689b034f'
current_head='1b8e93e92f8f6f1943d13e4bcb899d46bf77641b'

printf '%s\n' '== Source structure =='
ast-grep outline "$source_file" --items all --view expanded

printf '%s\n' '== Source: JDBC exception classification, validation, and all logging calls =='
sed -n '200,330p' "$source_file"
rg -n -C 2 '\blog\.(trace|debug|info|warn|error)\s*\(' "$source_file"

printf '%s\n' '== Current-head confidentiality logging regression tests =='
cat -n "$logging_test"

printf '%s\n' '== Current-head DDL security regression test map =='
ast-grep outline "$security_test" --items all --view expanded
rg -n -C 3 '(log|secret|password|ddl=|exception|diagnostic|execute)' "$security_test"

printf '%s\n' '== Descendant comparison, excluding known additive contract lines =='
python3 - <<'PY'
import re
import subprocess
from pathlib import Path

predecessor = '45e140969977299a5cfe7cac2fe6b0e8689b034f'
current = '1b8e93e92f8f6f1943d13e4bcb899d46bf77641b'
path = 'cdc-service/src/main/java/com/xtrmetl/cdc/replication/SchemaChangeReplicaApplier.java'

before = subprocess.check_output(['git', 'show', f'{predecessor}:{path}'], text=True)
after = Path(path).read_text()

# Strip comments and annotations that are exactly the claimed contract-only additions.
after = re.sub(r'\n    /\*\*\n     \* Creates the schema-change applier.*?\n     \*/', '', after, flags=re.S)
after = re.sub(r'\n    /\*\*\n     \* Applies one schema-change event.*?\n     \*/', '', after, flags=re.S)
after = after.replace('\n    `@Nullable`\n    private String extractDdl', '\n    private String extractDdl')

print('production_content_matches_predecessor_after_contract_additions=' + str(before == after).lower())
PY

printf '%s\n' '== Current commit changed-file test status =='
git diff --name-only "$predecessor_head" "$current_head"

Length of output: 22106


@seonghobae Reviewed exact current head 1b8e93e92f8f6f1943d13e4bcb899d46bf77641b.

I found no review findings.

The checked-out HEAD matches the requested commit. Its direct parent and merge base are 45e140969977299a5cfe7cac2fe6b0e8689b034f. The comparison is 0 commits behind and 1 commit ahead.

The descendant diff changes only SchemaChangeReplicaApplier.java. It adds 23 lines. These lines are the constructor Javadoc, the public apply(...) Javadoc, and @Nullable on extractDdl(...). After removal of those additions, the production file exactly matches the predecessor.

The DDL-log confidentiality behavior remains preserved. All production logging paths emit bounded outcome metadata. They do not log raw DDL, exception messages, or JDBC driver diagnostics. Current-head logging tests cover successful execution, blocked DDL, multi-statements, comments and NUL characters, duplicate failures, non-duplicate failures, and malformed JSON. The assertions reject secret literals, raw SQL fragments, ddl=, JDBC URLs, driver secrets, and parser diagnostics.

This review does not use reviews or checks from #171 or #267 as current-head evidence.

I could not execute repository tests in this environment. Current-head CI, security, SBOM, SAST, and runtime test evidence remain required acceptance gates.

You are interacting with an AI system.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant