8000 chore(review): code-review skills and deterministic PR checks (Spec 11.06) by minguyen9988 · Pull Request #1565 · Altinity/clickhouse-sink-connector · GitHub
[go: up one dir, main page]

Skip to content

chore(review): code-review skills and deterministic PR checks (Spec 11.06) - #1565

Merged
minguyen9988 merged 1 commit into
2.11.0from
review-skills-and-checks
Oct 10, 2026
Merged

minguyen9988 merged 1 commit into
2.11.0from
review-skills-and-checks

Conversation

@minguyen9988
Copy link
Copy Markdown
Collaborator

Adds a shared code-review method for this repository, for humans and agents, plus a CI check that enforces the parts a machine can prove.

Review skills under .claude/skills (index in .claude/skills/README.md, pointer in AGENTS.md):

  • pr-self-review: the entry point. Five review stages in order (contract, impacted surface, failure and divergence, evidence, lower-priority quality), triggered expansions, a severity model, and a project-specific per-invariant checklist in references/clickhouse-sink-connector-review.md.
  • code-quality-jvm, -python, -go, -bash, -sql: per-language deep-review checklists. code-quality-architecture covers the design pass.
  • code-reuse-review, code-reuse-first and design-note-debt: duplication and deliberate shortcuts.
  • mandatory-code-change-validation, destructive-operation-safety, repro-harness-negative-proof and sink-connector-mysql-source-of-truth: validation beyond tests pass, the destructive-operation protocol, proving a negative result is real, and the source-of-truth rules.

A new stdlib-only check script under scripts/ runs over the lines a PR adds (base...head):

  • destructive: every DROP, TRUNCATE, DELETE, DETACH PARTITION, SYSTEM DROP REPLICA or recursive forced rm site needs a DESTRUCTIVE: comment within 5 lines, and the commit range needs a Destructive-Op-Check: sites=N; result=pass trailer whose count matches.
  • merge-stop: no code may stop or pause ClickHouse merges, whether literal, templated or as a helper. Starting merges is always allowed.
  • license: no GPL, LGPL or AGPL (Category X) artifact or test framework at compile or runtime scope in any POM, and every new runtime dependency must be listed in THIRD_PARTY_NOTICES.md. Known Category X Python packages are rejected too. This complements the enforcer ban in the lightweight POM.
  • hygiene: conflict markers, swallowed exceptions, debugger leftovers, private keys and token formats, and YAML or JSON that no longer parses.
  • Exit codes: 0 clean, 1 findings, 2 git or usage error.

A new workflow under .github/workflows runs the check on every pull request. Its self-tests also run in the existing spec-governance job through unittest discover. Usage is documented in a new page under doc/, and the check is specified by the new Spec 11.06 in specs/11-verification-tooling.

Calibration: run over the whole 2.11.0 line (3c0759b..7f3102d, 139 commits), the check reports 6 destructive sites without a warning comment (the PostgreSQL DROP COLUMN translation, one log line and one operator hint) and nothing else. Grammars (.g4), Lean proofs, tests and prose are exempt, because they quote destructive statements without executing them. Best-effort cleanup that ignores OSError is allowed.

This complements #1563, a reviewer skill for PRs, which lives at .claude/skills/SKILL.md and does not conflict with these files.

Whole-Change-Verification: ran=python3 -m unittest discover -s scripts/tests (82 tests: 25 new, the rest the existing validator self-tests; 4 skipped), python3 scripts/validate_specs.py --changed-base on 7f3102d (84 specs, 1239 citations, PASSED), the new check script on this branch (0 findings), YAML lint of the new workflow, and frontmatter parse of all 14 SKILL.md files; 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)

…c 11.06)

Adds the review methodology and a CI gate so contributors and agents review PRs the same way:

- .claude/skills/: pr-self-review (five review gates: contract, impacted surface, failure and divergence, evidence, lower-priority quality) with a project-specific checklist; code-quality-{jvm,python,go,bash,sql,architecture}; code-reuse-review, code-reuse-first, design-note-debt, mandatory-code-change-validation, destructive-operation-safety, repro-harness-negative-proof and sink-connector-mysql-source-of-truth. Index in .claude/skills/README.md, pointer in AGENTS.md.
- scripts/review_gates.py: stdlib-only checks over the lines a PR adds. destructive: every DROP/TRUNCATE/DELETE/DETACH/rm -rf site needs a DESTRUCTIVE: comment and a matching Destructive-Op-Check commit trailer. merge-stop: no code may stop or pause ClickHouse merges. license: no Category X dependency at a runtime scope, and every new runtime dependency is in THIRD_PARTY_NOTICES.md. hygiene: conflict markers, swallowed exceptions, debugger leftovers, credentials, YAML/JSON syntax. Exit 0/1/2.
- scripts/tests/test_review_gates.py (25 offline tests), .github/workflows/review-gates.yml, doc/review_gates.md, specs/11-verification-tooling/06-review-gates.md.

Jinja-Render-Check: rendered=1; formats=yaml; result=pass

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@minguyen9988 minguyen9988 mentioned this pull request Oct 10, 2026
@minguyen9988
minguyen9988 merged commit d18c362 into 2.11.0 Oct 10, 2026
15 checks passed
@minguyen9988
minguyen9988 deleted the review-skills-and-checks branch October 10, 2026 05:00
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