8000 fix(review): PR checks are not retroactive and attest destructive sites per commit (unblocks #1437) by minguyen9988 · Pull Request #1567 · Altinity/clickhouse-sink-connector · GitHub
[go: up one dir, main page]

Skip to content

fix(review): PR checks are not retroactive and attest destructive sites per commit (unblocks #1437) - #1567

Merged
minguyen9988 merged 2 commits into
2.11.0from
review-checks-not-retroactive
Oct 10, 2026
Merged

minguyen9988 merged 2 commits into
2.11.0from
review-checks-not-retroactive

Conversation

@minguyen9988
Copy link
Copy Markdown
Collaborator

Fixes the failing Review check on #1437.

#1437 compares the whole 2.11.0 line with develop. Once #1565 merged, the new check ran over that range: 139 commits reviewed and merged before the check existed. It flagged 6 old destructive lines and demanded a single trailer covering all 35 destructive sites in the line, a count no commit could carry.

Changes to the check script and Spec 11.06:

  • Not retroactive: when the commit that introduced the check script lies inside merge-base..head, checking starts at that commit. Code merged before the checks existed is not re-judged, and every change from the introducing commit onward is checked in full.
  • Per-commit attestation replaces the single cumulative trailer. Each commit that adds destructive sites carries its own Destructive-Op-Check trailer for its own count, and the finding names the commit. A cumulative trailer cannot work for a release branch whose range holds many already-attested commits.
  • A squash merge (subject ending in #N in parentheses) concatenates its PR commits trailers, each checked exactly in that PR, so for those commits the sum may exceed the net site count but never fall short. Every other commit must attest exactly.
  • tests_e2e directories count as tests.
  • Warning comments are still required on every destructive line added from the introducing commit onward.

Ranges checked with the new script:

  • The 2.11.0  #1437 range (3c0759b to the 2.11.0 tip): 0 findings, previously 7.
  • The 2.11.0 line before the checks (3c0759b..7f3102d): still reports the 6 unwarned lines, plus 2 old squash commits whose earlier-format trailers attest fewer sites than they add.
  • This branch: 0 findings.

Whole-Change-Verification: ran=python3 -m unittest discover -s scripts/tests (91 tests, 9 new, 4 skipped, all pass), python3 scripts/validate_specs.py --changed-base on 3fcf20d (84 specs, 1243 citations, PASSED), and the check script on the three ranges above; result=pass

Created on behalf of the team that co-maintains this connector; maintainers own the merge.

Generated with Claude Code (https://claude.com/claude-code)

minguyen9988 and others added 2 commits October 10, 2026 00:11
… sites per commit (Spec 11.06 sections 3.1, 3.2)

The release PR for the 2.11.0 line (#1437, base develop) failed the new Review gates check: its range holds 139 commits merged before the check existed, so it re-judged 6 old destructive lines and demanded one trailer covering all 35 sites in the line.

- When the commit that introduced scripts/review_gates.py lies inside merge-base..head, checking starts at that commit, so nothing reviewed before the checks existed is re-judged, and every change from the introducing commit onward still is.
- Attestation is per commit: each commit that adds sites carries its own Destructive-Op-Check trailer for its own count (several trailers in one message, as a squash merge collects them, are summed). A single cumulative trailer cannot work for a release branch whose range holds many already-attested commits.
- Warning comments are still checked on the head version of every added line.

Tests: 5 new (per-commit attestation, missing per-commit trailer, squash summing, pre-check changes ignored, changes from the introducing commit checked). The #1437 range (3c0759b..3fcf20d) now reports 0 findings; the same range without the introducing commit still reports the 6 unwarned sites.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t data is exempt (Spec 11.06 section 3.2)

A squash merge concatenates the trailers of the PR's commits, each already checked exactly in that PR; when the PR reworked a destructive line their sum exceeds the squashed diff's net count. For a commit whose subject ends in (#N) the sum may exceed, never fall short of, its sites; every other commit still attests exactly. tests_e2e/ joins the test directories. 4 new tests (91 total, 4 skipped).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@minguyen9988
minguyen9988 merged commit be84678 into 2.11.0 Oct 10, 2026
4 checks passed
@minguyen9988
minguyen9988 deleted the review-checks-not-retroactive branch October 10, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0