feat(bots): reviewer-bot code, adapted for databricks-sql-python#827
Open
eric-wang-1990 wants to merge 1 commit into
Open
feat(bots): reviewer-bot code, adapted for databricks-sql-python#827eric-wang-1990 wants to merge 1 commit into
eric-wang-1990 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_reviewtool + 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 todatabricks-sql-python; citesCONTRIBUTING.md(PEP 8 / 100-char lines, DCO) +README.md. Dropped the csharp driver-source section,specs/*.yamlalignment rules, andCLAUDE.md/.claude/**landmarks (none exist here). Trimmed the user-prompt template to PR / diff / open-threads / repo-conventions.gather_context.aggregate_repo_rules— readsCONTRIBUTING.mdinstead of CLAUDE.md/.claude/specs/per-driver files.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).test_prompts/test_gather_contextfor 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, thefake_repo/fake_driver_treefixtures — 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_ENDPOINTsecrets).This pull request and its description were written by Isaac.