Skip to content

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

Open
eric-wang-1990 wants to merge 1 commit into
eric-wang-1990/reviewer-bot-foundationfrom
eric-wang-1990/reviewer-bot-code
Open

feat(bots): reviewer-bot code, adapted for databricks-sql-python#827
eric-wang-1990 wants to merge 1 commit into
eric-wang-1990/reviewer-bot-foundationfrom
eric-wang-1990/reviewer-bot-code

Conversation

@eric-wang-1990
Copy link
Copy Markdown

Second of the stacked reviewer-bot migration (stacked on #826). Vendors scripts/reviewer_bot/ and adapts the repo-specific surface for this Python connector. No live workflow yet — that's PR3.

What's kept verbatim (the valuable core)

The review loop, finalize_review tool + structured output, the v2 per-push posting model, dedup/suppressions + reconcile, severity scheme, validate_findings, the thoroughness "What to review for" agenda, and the live per-turn agent trace.

What's adapted for Python

  • prompts.py — retargeted to databricks-sql-python; cites CONTRIBUTING.md (PEP 8 / 100-char lines, DCO) + README.md. Dropped the csharp driver-source section, specs/*.yaml alignment rules, and CLAUDE.md/.claude/** landmarks (none exist here). Trimmed the user-prompt template to PR / diff / open-threads / repo-conventions.
  • gather_context.aggregate_repo_rules — reads CONTRIBUTING.md 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).

Tests

  • .github/workflows/reviewer-bot-unit-tests.yml (protected runner + setup-poetry + pytest; no secrets — the Claude Agent SDK import is guarded).
  • 361 reviewer + shared tests pass locally. Updated test_prompts/test_gather_context for the Python conventions; relaxed one symlink-containment assertion to accept either guard (the security-critical "no leak + REJECTED" checks are unchanged).

Deferred (follow-up cleanup PR)

The csharp-conditional dead paths — run_review's driver-clone block, list_driver_source, the fake_repo/fake_driver_tree fixtures — are left in place; they never execute on this repo. A focused cleanup removes them.

Next

PR3: live reviewer-bot.yml / reviewer-bot-followup.yml (needs the peco-review-bot App + REVIEW_BOT_APP_* / MODEL_ENDPOINT secrets).

This pull request and its description were written by Isaac.

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