fix(cdc): preserve DDL log confidentiality replacement - #277
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
@coderabbitai review Please review exact current head |
|
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
I found no review findings. The checked-out The descendant diff changes only 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, This review does not use reviews or checks from 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. |
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
develop@942d164ceb7af497bb28a95f842db96429d1bdc445e140969977299a5cfe7cac2fe6b0e8689b034f1b8e93e92f8f6f1943d13e4bcb899d46bf77641brepair/schema-ddl-log-redaction-preserved-45e1409Preservation proof
The only descendant delta is 23 additive source lines: the public constructor Javadoc, public
apply(...)Javadoc, and@Nullablecontract onextractDdl(...)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.