Skip to content

feat(bots): reviewer-bot live workflows (review + follow-up)#834

Draft
eric-wang-1990 wants to merge 3 commits into
mainfrom
eric-wang-1990/stack/reviewer-bot-live
Draft

feat(bots): reviewer-bot live workflows (review + follow-up)#834
eric-wang-1990 wants to merge 3 commits into
mainfrom
eric-wang-1990/stack/reviewer-bot-live

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?

Third of the stacked reviewer-bot migration. Adds the live workflows that run
the bot on PRs:

  • reviewer-bot.yml — reviews on pull_request (opened/synchronize/reopened/
    ready_for_review) + manual workflow_dispatch (dry-run capable). Fork-guarded;
    protected runner; mints a peco-review-bot App token; setup-claude-sdk for the
    SDK/CLI install. Reads/explores the PR's own checkout (no driver clone).
  • reviewer-bot-followup.yml — responds to pull_request_review_comment with the
    cheap pre-checkout filter + the marker-based loop guards.

Adapted from the driver-test workflows: removed the driver-repo clone auth
(INTEGRATION_TEST_APP_TOKEN — N/A here) and made MODEL_ENDPOINT a secret rather
than a hardcoded workspace URL.

PREREQS (these workflows stay inert until provided):

  • peco-review-bot GitHub App installed on this repo (Pull requests / Issues /
    Contents: Read & Write).
  • Secrets: REVIEW_BOT_APP_ID, REVIEW_BOT_APP_PRIVATE_KEY, MODEL_ENDPOINT;
    DATABRICKS_TOKEN authorized for that serving endpoint.

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>
Third of the stacked reviewer-bot migration. Adds the live workflows that run
the bot on PRs:

- reviewer-bot.yml — reviews on pull_request (opened/synchronize/reopened/
  ready_for_review) + manual workflow_dispatch (dry-run capable). Fork-guarded;
  protected runner; mints a peco-review-bot App token; setup-claude-sdk for the
  SDK/CLI install. Reads/explores the PR's own checkout (no driver clone).
- reviewer-bot-followup.yml — responds to pull_request_review_comment with the
  cheap pre-checkout filter + the marker-based loop guards.

Adapted from the driver-test workflows: removed the driver-repo clone auth
(INTEGRATION_TEST_APP_TOKEN — N/A here) and made MODEL_ENDPOINT a secret rather
than a hardcoded workspace URL.

PREREQS (these workflows stay inert until provided):
  - peco-review-bot GitHub App installed on this repo (Pull requests / Issues /
    Contents: Read & Write).
  - Secrets: REVIEW_BOT_APP_ID, REVIEW_BOT_APP_PRIVATE_KEY, MODEL_ENDPOINT;
    DATABRICKS_TOKEN authorized for that serving endpoint.

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