reviewer-bot: workflow_dispatch reads default-branch code for explore tools (set REVIEW_CONTENT_ROOT)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 84/100
Rechercherichtung
Beginne in reviewer-bot.yml und untersuche den workflow_dispatch-Pfad zusammen mit dem Verhalten von review_bot/run_review.py's _content_root(). Überprüfe, wie HEAD_SHA ermittelt wird und wie der separate Checkout und REVIEW_CONTENT_ROOT verdrahtet werden sollten, ohne den vertrauenswürdigen primären Checkout zu ändern. Als erledigt gilt, dass der manuelle Dispatch den PR-Head untersucht, während das Verhalten von pull_request unverändert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Follow-up from PR #862 review (thread on reviewer-bot.yml).
Problem
On the workflow_dispatch (manual) trigger, reviewer-bot.yml does a single actions/checkout with no ref:, which resolves to the default branch — not the PR being reviewed. The PR head is resolved separately (HEAD_SHA = gh pr view ... --json headRefOid).
Result:
- The review diff and comment anchors are correct — the engine fetches them from the GitHub compare API keyed on
HEAD_SHA(repos/{repo}/compare/...), independent of the checkout. - But the agent's explore tools (
read_paths/grep) read from the engine's_content_root(), which falls back to the primary checkout (= default branch on dispatch) whenREVIEW_CONTENT_ROOTis unset. So on manual dispatch, the agent explores default-branch code, not the PR head.
The automatic pull_request trigger (the normal case) is unaffected — its checkout already is the PR merge ref.
Why the engine expects this
Per reviewer_bot/run_review.py _content_root(), workflow_dispatch is meant to check the PR head into a separate directory and export its path as REVIEW_CONTENT_ROOT, while engine code keeps running from the trusted default-branch checkout. This is a deliberate security boundary: dispatch is exempt from the fork guard, so the PR's own code must not run/read from the primary checkout dir.
Fix
On the dispatch path, add a second checkout of HEAD_SHA into a separate dir and export REVIEW_CONTENT_ROOT pointing at it (mirroring the engine's documented pattern).
Severity
Low — only manual dispatch is affected, and only the explore-tool reads (diff/anchors are always correct). Deferred from #862 as a follow-up.
- Vorherrschende Sprache
- Python
- Sterne
- 236
- Forks
- 162
- Ø Merge
- 14 Std. 22 Min.
- Gemergte PRs (30 T.)
- 25
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/databricks-sql-python
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
databricks/databricks-sql-python#1012 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Token federation: `_exchange_token` raises KeyError('access_token') on error responses, discarding the real failure reasonEvtl. vergeben @TangoEnSkai hat das vor 82 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
databricks/databricks-sql-python#904 ·
Maintainer antworten meist innerhalb von 1 Tag
-
engineer-bot
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
databricks/databricks-sql-python#860 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Cursor.close() leaks server-side handle for async commands that were never fetchedEvtl. vergeben @nanookclaw hat das vor 177 Tagen übernommen. Offenbug engineer-bot
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
databricks/databricks-sql-python#791 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
engineer-bot
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
databricks/databricks-sql-python#786 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in databricks/databricks-sql-python
Ähnliche Issues
-
Unknown stop ID in slow zone data crashes post formatting and skips the rest of that day's postsOffenbackend bug tm-new-volunteer
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
transitmatters/mbta-slow-zone-bot#81 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
spacetelescope/rdmt-spire#49 ·
Maintainer antworten meist innerhalb von 1 Tag
-
AI bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
AUTO-MAS-Project/AUTO-MAS#1960 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
btclib-org/btclib-wallet#872 ·
Maintainer antworten meist innerhalb von 1 Tag