Skip to content

feat(bots): reviewer-bot code, adapted for databricks-sql-python#833

Draft
eric-wang-1990 wants to merge 2 commits into
mainfrom
eric-wang-1990/stack/reviewer-bot-code
Draft

feat(bots): reviewer-bot code, adapted for databricks-sql-python#833
eric-wang-1990 wants to merge 2 commits into
mainfrom
eric-wang-1990/stack/reviewer-bot-code

Conversation

@eric-wang-1990
Copy link
Copy Markdown

@eric-wang-1990 eric-wang-1990 commented Jun 4, 2026

🥞 Stacked PR

Use this link to review incremental changes.


What type of PR is this?

Second of the stacked reviewer-bot migration. Vendors scripts/reviewer_bot/
(the review loop, finalize_review tool, v2 posting, dedup/reconcile, severity,
validate_findings, observer) and adapts the repo-specific surface for this
Python connector:

  • prompts.py: retarget to databricks-sql-python; cite CONTRIBUTING.md (PEP 8 /
    100-char lines, DCO) + README.md; drop the csharp driver-source section,
    specs/*.yaml alignment rules, and CLAUDE.md/.claude landmarks (none here).
    Trim the user-prompt template to PR/diff/open-threads/repo-conventions.
  • gather_context.aggregate_repo_rules: read CONTRIBUTING.md (this repo's
    conventions doc) instead of CLAUDE.md/.claude/specs/per-driver files.
  • Exploration (read_paths/grep) roots at the PR's own checkout — no driver
    clone (that path is csharp-conditional and never fires here).

Adds .github/workflows/reviewer-bot-unit-tests.yml (protected runner +
setup-poetry + pytest; no secrets — SDK import is guarded). 361 reviewer +
shared tests pass.

The csharp-conditional dead paths (run_review driver-clone, list_driver_source,
the fake_repo/fake_driver_tree fixtures) are left in place for a follow-up
cleanup PR — they never execute on this repo.

Co-authored-by: Isaac
Signed-off-by: Eric Wang e.wang@databricks.com

Description

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

First of a stacked series migrating the PR-review bot from
databricks-driver-test to this repo. This PR adds only the task-agnostic
foundation (no bot logic, nothing runs on PRs yet):

- scripts/shared/ — the common agent engine (Claude Agent SDK loop/transport,
  security guard, markers, threads, github/git ops). Self-contained; 94 unit
  tests pass under scripts/shared/tests.
- scripts/__init__.py — makes `scripts` importable for `python -m scripts.*`.
- scripts/requirements-sdk.txt — the claude-agent-sdk pin.
- .github/actions/setup-claude-sdk + setup-jfrog — install the SDK (pip) + CLI
  (npm) through Databricks' internal JFrog mirror (the protected runner is
  egress-blocked from pypi.org/npmjs.org).
- .github/workflows/sdk-smoke.yml — manual smoke verifying the SDK/CLI install
  on this repo's runner.

Co-authored-by: Isaac
Signed-off-by: Eric Wang <e.wang@databricks.com>
Second of the stacked reviewer-bot migration. Vendors scripts/reviewer_bot/
(the review loop, finalize_review tool, v2 posting, dedup/reconcile, severity,
validate_findings, observer) and adapts the repo-specific surface for this
Python connector:

- prompts.py: retarget to databricks-sql-python; cite CONTRIBUTING.md (PEP 8 /
  100-char lines, DCO) + README.md; drop the csharp driver-source section,
  specs/*.yaml alignment rules, and CLAUDE.md/.claude landmarks (none here).
  Trim the user-prompt template to PR/diff/open-threads/repo-conventions.
- gather_context.aggregate_repo_rules: read CONTRIBUTING.md (this repo's
  conventions doc) instead of CLAUDE.md/.claude/specs/per-driver files.
- Exploration (read_paths/grep) roots at the PR's own checkout — no driver
  clone (that path is csharp-conditional and never fires here).

Adds .github/workflows/reviewer-bot-unit-tests.yml (protected runner +
setup-poetry + pytest; no secrets — SDK import is guarded). 361 reviewer +
shared tests pass.

The csharp-conditional dead paths (run_review driver-clone, list_driver_source,
the fake_repo/fake_driver_tree fixtures) are left in place for a follow-up
cleanup PR — they never execute on this repo.

Co-authored-by: Isaac
Signed-off-by: Eric Wang <e.wang@databricks.com>
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