Skip to content

feat(tool_github): add pr_review_context one-shot PR review preset - #2019

Closed
bhanuaravind9549 wants to merge 1 commit into
rocketride-org:developfrom
bhanuaravind9549:feat/RR-1852-pr-review-context
Closed

bhanuaravind9549 wants to merge 1 commit into
rocketride-org:developfrom
bhanuaravind9549:feat/RR-1852-pr-review-context

Conversation

@bhanuaravind9549

@bhanuaravind9549 bhanuaravind9549 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add pr_review_context(pr_number) on tool_github that returns PR metadata, changed files, unified diff, and related open PRs/issues in one call
  • Match related items by ticket IDs (#N, Fixes/Closes/Refs) and overlapping changed-file basenames
  • Truncate diffs over 100k characters; extend github_client.call with accept= / raw=

Fixes #1852

Test plan

  • pytest nodes/test/tool_github/test_pr_review_context.py -v --noconftest
  • Against a real repo: call pr_review_context and confirm diff + files + related issues populate

Summary by CodeRabbit

  • New Features

    • Added a GitHub pull request review context tool.
    • View pull request metadata, changed files, and a bounded unified diff in one result.
    • Discover related open pull requests and issues using ticket references and changed-file names.
    • Excludes the current pull request and pull requests from issue-related results.
    • Available in read-only mode.
  • Documentation

    • Added the new tool to the GitHub integration’s available tools and usage documentation.

Return PR metadata, changed files, unified diff, and related open PRs/issues
(matched by ticket IDs and file basenames) in a single tool call for review agents.

Fixes rocketride-org#1852
@github-actions github-actions Bot added docs Documentation module:nodes Python pipeline nodes labels Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Failed to post review comments.

GitHub was unavailable or timed out while CodeRabbit was posting the review. Please request a new review later if the pull request still needs one. This happened while posting 3 inline comments. Use @coderabbitai full review to retry the review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8dd7f115-027d-4ef8-8825-149a62c72db4

📥 Commits

Reviewing files that changed from the base of the PR and between 662ec40 and 8b48f1a.

📒 Files selected for processing (4)
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/src/nodes/tool_github/README.md
  • nodes/src/nodes/tool_github/github_client.py
  • nodes/test/tool_github/test_pr_review_context.py

Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review.

🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (.cursorrules)

Verify code follows documented patterns in ROCKETRIDE_python_API.md before submitting Python Rocket Ride client code

Files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
nodes/**/*.py

⚙️ CodeRabbit configuration file

nodes/**/*.py: Python pipeline nodes: use single quotes, ruff for linting/formatting,
PEP 257 docstrings, target Python 3.10+.

Files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
nodes/src/nodes/*/README.md

📄 CodeRabbit inference engine (AGENTS.md)

Documentation must be co-located with the code it documents in nodes/src/nodes/<name>/README.md for node inputs, outputs, and config schemas; do not hand-edit content between <!-- ROCKETRIDE:GENERATED:PARAMS START --> and <!-- ROCKETRIDE:GENERATED:PARAMS END --> as it is regenerated by nodes:docs-generate

Files:

  • nodes/src/nodes/tool_github/README.md
🧠 Learnings (29)
📓 Common learnings
Learnt from: CR
Repo: rocketride-org/rocketride-server PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-06-12T23:22:53.251Z
Learning: Documentation changes must be included in the same change that alters a public contract; verify with `builder docs:build` before committing
📚 Learning: 2026-03-24T21:28:07.433Z
Learnt from: asclearuc
Repo: rocketride-org/rocketride-server PR: 417
File: nodes/src/nodes/llm_vision_ollama/__init__.py:28-32
Timestamp: 2026-03-24T21:28:07.433Z
Learning: For Python pipeline node files under `nodes/**/*.py`, follow the repo’s string/docstring quoting conventions: use single quotes for regular string literals, and require PEP 257-style docstrings to use triple double quotes (`"""..."""`). Do not recommend changing docstring quotes from `"""..."""` to `'''...'''`.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-03-25T16:11:50.206Z
Learnt from: KaushikSiva
Repo: rocketride-org/rocketride-server PR: 386
File: nodes/src/nodes/search_exa/IInstance.py:31-32
Timestamp: 2026-03-25T16:11:50.206Z
Learning: In nodes/**/*.py, treat `self.instance.writeAnswers(...)` as accepting a single `Answer` object (not `List[Answer]`). In reviews, do not flag calls where a single `Answer` is passed to `writeAnswers` as type mismatches. If the abstract base class (e.g., `filters.py`) still declares `List[Answer]`, consider updating that type annotation to match the actual runtime/override usage, since concrete implementations (e.g., `response/IInstance.py`, `extract_data/IInstance.py`, `dictionary/IInstance.py`, `db_instance_base.py`) and all call sites pass a single `Answer`.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-03-27T23:31:51.042Z
Learnt from: asclearuc
Repo: rocketride-org/rocketride-server PR: 456
File: nodes/src/nodes/db_neo4j/IInstance.py:98-100
Timestamp: 2026-03-27T23:31:51.042Z
Learning: In this project’s Python lifecycle stubs under `nodes/` (e.g., empty lifecycle methods like `endInstance`), it may be intentional to include an explicit `pass` statement even if the method already contains a docstring. When reviewing, do not flag this as redundant (Ruff `PIE790`) for these empty stub lifecycle methods when the `pass` is used to clearly mark the body as intentionally empty.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-03-30T21:57:11.296Z
Learnt from: chinesepowered
Repo: rocketride-org/rocketride-server PR: 518
File: nodes/src/nodes/llm_openai_api/openai_client.py:25-32
Timestamp: 2026-03-30T21:57:11.296Z
Learning: In Python LLM node implementations under `nodes/**/*.py`, it’s an established pattern that `ChatBase.__init__` may not store all configuration on the instance. Subclasses may intentionally call `Config.getNodeConfig(provider, connConfig)` again inside their own `__init__` to read provider-specific fields (e.g., `apikey`, `base_url`). During code review, do not flag this as a redundant duplicate call when it’s used to obtain provider-specific configuration for the subclass.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-03-30T22:18:48.072Z
Learnt from: chinesepowered
Repo: rocketride-org/rocketride-server PR: 518
File: nodes/src/nodes/llm_openai_api/IGlobal.py:11-81
Timestamp: 2026-03-30T22:18:48.072Z
Learning: In this repository’s Python LLM node implementation files under `nodes/**/*.py`, follow the established `validateConfig` style: use the existing “monolithic probe + error-formatting” approach for provider-first exceptions to keep behavior consistent. When linting flags require suppression, prefer the smallest/most targeted Ruff `# noqa` usage (e.g., `PLR0912`/`PLR0915`) and add specific justification comments for any targeted `BLE001`/similar codes rather than refactoring into multiple helper functions solely to satisfy linting. Only refactor the exception/validation pattern if you can update it consistently across all similar nodes.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-02T13:09:51.916Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 583
File: nodes/src/nodes/audio_tts/IGlobal.py:236-264
Timestamp: 2026-04-02T13:09:51.916Z
Learning: In RocketRide, filter node code (e.g., implementations under `nodes/**/*.py`) should assume `IGlobal.synthesize()` and filter node methods are executed sequentially per pipeline instance: one document is processed through the filter at a time. Concurrent access to the same `IGlobal` instance is not an expected runtime scenario. Therefore, do not raise review findings about missing synchronization/locks (e.g., missing mutex/atomic protections) for shared `IGlobal` state in filter node implementations unless there is explicit evidence of concurrent access beyond the framework’s pipeline execution model.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-03T04:00:08.250Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 599
File: nodes/src/nodes/tool_firecrawl/IInstance.py:103-103
Timestamp: 2026-04-03T04:00:08.250Z
Learning: When reviewing Python files under `nodes/**/*.py`, do not flag Ruff Q000 (single-quote style) violations for double-quoted string literals if the content contains a single quote/apostrophe (e.g., `"Map a website's structure..."`). In such cases, double quotes are intentional to avoid backslash escapes and are considered correct under Ruff’s Q000 behavior.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-03T05:20:16.219Z
Learnt from: nihalnihalani
Repo: rocketride-org/rocketride-server PR: 525
File: nodes/src/nodes/router_llm/IInstance.py:0-0
Timestamp: 2026-04-03T05:20:16.219Z
Learning: When reviewing Python code under the `nodes/` package, treat the `IInstanceBase.open()` lifecycle method’s parameter named `obj: Entry` as the correct engine Python-bridge interface convention. Do not flag `obj` as a non-standard parameter name. This convention exists specifically because the earlier parameter name `object` (which shadowed the Python builtin) was replaced with `obj`.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-03T18:31:22.345Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 599
File: nodes/src/nodes/memory_internal/IInstance.py:33-35
Timestamp: 2026-04-03T18:31:22.345Z
Learning: In RocketRide pipeline engine nodes (nodes/**/*.py), rely on the lifecycle invariant: `beginInstance()` is guaranteed to complete successfully before `open()` runs, and if `beginInstance()` throws, the engine aborts and `open()` is never called. Therefore, during code review, do not flag instance fields that are initialized in `beginInstance()` (e.g., `self._store`) as potentially `None`/uninitialized when they are referenced in `open()`. This is safe because the framework lifecycle enforces it.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-03T18:31:20.227Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 599
File: nodes/src/nodes/llm_base/IInstance.py:36-50
Timestamp: 2026-04-03T18:31:20.227Z
Learning: In Python pipeline node files under `nodes/**/*.py` (including `nodes/src/nodes/llm_base/IInstance.py`), do not flag missing PEP 257 docstrings for trivial one-liner methods decorated with `invoke_function` (or similar decorator-based invocation). Skip the docstring requirement when the method’s name and return value/behavior make the contract self-evident (e.g., `getContextLength`, `getOutputLength`, `getTokenCounter`, `ask`), because the decorator plus the method name already communicate intent clearly.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-03T18:31:34.956Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 599
File: nodes/src/nodes/tool_firecrawl/IInstance.py:67-69
Timestamp: 2026-04-03T18:31:34.956Z
Learning: For Python tools implemented with rocketlib’s `tool_function` decorator, the framework validates the declared `input_schema` at `tool.invoke` before entering the tool method body. Therefore, do not require (or flag) redundant runtime type checks inside the tool (e.g., `isinstance(url, str)` when the schema declares `url` as a string). Instead, only add lightweight value guards for schema-compatible edge cases (e.g., `if not url:` to handle the empty-string case) and avoid duplicating schema-based type validation logic.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-08T07:11:59.835Z
Learnt from: charliegillet
Repo: rocketride-org/rocketride-server PR: 509
File: nodes/src/nodes/tool_exa_search/exa_driver.py:146-198
Timestamp: 2026-04-08T07:11:59.835Z
Learning: In RocketRide tool driver implementations under nodes/**/*.py that use ToolsBase, ensure _tool_validate normalizes inputs exactly the same way as _tool_invoke (via a shared _normalize_tool_input helper). This must allow inputs consistently when ToolsBase.handle_invoke triggers validation directly—specifically, JSON strings, Pydantic-like models, and wrapped payloads like {"input": ...} should be accepted and normalized prior to validation.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-23T09:43:35.158Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 662
File: nodes/src/nodes/audio_tts/IInstance.py:41-43
Timestamp: 2026-04-23T09:43:35.158Z
Learning: In rocketride-server pipeline node code under nodes/**/*.py, treat writeAudio(AVI_ACTION.BEGIN, mimeType) and writeAudio(AVI_ACTION.END, mimeType) as an intentional established pattern: they should be called with exactly two arguments (no buffer parameter). Only AVI_ACTION.WRITE calls should include the buffer. Do not raise a review issue for a missing buffer argument on BEGIN/END writeAudio calls, as this matches the existing codebase behavior.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-05-18T11:51:47.483Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 889
File: nodes/src/nodes/llm_vision_mistral/mistral_vision.py:250-252
Timestamp: 2026-05-18T11:51:47.483Z
Learning: In OpenAI-compatible provider implementations (including nodes/src/nodes/llm_vision_mistral/mistral_vision.py and other provider files under nodes/), do not flag `chat_response.choices[0]` as missing a guard after a successful SDK call (e.g., after a 2xx response). These SDKs populate `choices` on success, and any unexpected `IndexError` would be caught by the surrounding `except Exception` retry/error-handling chain (which passes through `_shouldRetry` and formats via `_format_user_error`). Only raise an issue if the code reaches `choices[0]` without having established the successful-response/error-handling assumptions that the existing retry wrapper relies on.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-05-20T14:02:50.466Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 690
File: nodes/src/nodes/flow_base/IInstance.py:122-129
Timestamp: 2026-05-20T14:02:50.466Z
Learning: In rocketride-server Python pipeline node implementations under `nodes/**/*.py`, the AVI streaming inbound handler methods `writeImage`, `writeAudio`, and `writeVideo` are invoked by the C++ engine trampoline (e.g., `python-instance.avi.cpp`) and must use the required 3-parameter signature: `def writeImage(self, action: int, mimeType: str, buffer: bytes) -> None` (and analogous signatures for the other methods). For `BEGIN` and `END` actions, `buffer` is still passed and is an empty bytes value (`b''`) rather than being omitted. When reviewing similar inbound handlers in sibling node modules (e.g., `ocr`, `thumbnail`, `llm_vision_*`, `embedding_image`, `accessibility_describe`, `image_cleanup`, `flow_base`), do not flag the required `buffer` parameter as inconsistent with outbound call sites like `pipe.writeImage(AVI_ACTION.BEGIN, mime)`, since those are different outbound write APIs and are not the same as inbound handler call signatures.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-06-13T07:37:27.809Z
Learnt from: asclearuc
Repo: rocketride-org/rocketride-server PR: 1267
File: nodes/src/nodes/landing_ai/parse/IInstance.py:42-42
Timestamp: 2026-06-13T07:37:27.809Z
Learning: When reviewing Python code in nodes/**/*.py, do not flag double-quoted string literals that occur inside f-string expression slots (the `{...}` portion). For example, `f'... {hasattr(obj, "fileName")}...'` is acceptable: using double quotes inside the expression is idiomatic and does not conflict with any single-quote convention that only applies to the outer f-string/overall string delimiter.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-02T20:29:16.277Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 599
File: nodes/src/nodes/db_neo4j/IInstance.py:158-163
Timestamp: 2026-04-02T20:29:16.277Z
Learning: When reviewing Python code in this repository, do not treat Ruff rule RET505 ("Unnecessary elif after return statement") as a review finding. Maintainers consider this nitpick unnecessary, and it is acceptable to keep elif/else branching even immediately after a return.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-06-05T22:02:43.464Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 1138
File: packages/ai/src/ai/web/server.py:266-275
Timestamp: 2026-06-05T22:02:43.464Z
Learning: Use `debug()` imported from `rocketlib` (e.g., `from rocketlib import debug`) as the standard logging utility for diagnostic output in this codebase (including warnings and misconfiguration notices). Do not recommend replacing existing `debug()` calls with Python’s built-in `logging` (e.g., `logger.warning()` / `logging.warning()`) since maintainers intentionally rely on `rocketlib.debug` for these messages.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-08-06T00:22:29.283Z
Learnt from: madhumitha-chandrasekaran-1
Repo: rocketride-org/rocketride-server PR: 1855
File: nodes/test/agent_crewai/test_manager_synthesis.py:71-72
Timestamp: 2026-08-06T00:22:29.283Z
Learning: In this repository, pyproject.toml configures Ruff to ignore missing-docstring rules D100–D107. Do not report missing module, class, method, function, package, nested-class, magic-method, or __init__ docstrings as required lint fixes. In particular, test files under nodes/test/agent_crewai/ do not require docstrings on every test declaration because their local convention is inconsistent.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-04-15T00:13:11.455Z
Learnt from: ryan-t-christensen
Repo: rocketride-org/rocketride-server PR: 673
File: nodes/src/nodes/llm_vision_anthropic/IInstance.py:91-92
Timestamp: 2026-04-15T00:13:11.455Z
Learning: In the rocketride-server pipeline, the Image document producers (frame_grabber, thumbnail, embedding_image) normalize produced image outputs to PNG via ImageProcessor. Therefore, when building image data URIs from Doc.page_content in any nodes Python code, it is correct and intentional to hardcode the MIME type to `image/png`. Do not raise/flag a potential MIME type mismatch for this specific PNG-normalized flow.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
📚 Learning: 2026-05-18T11:51:47.483Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 889
File: nodes/src/nodes/llm_vision_mistral/mistral_vision.py:250-252
Timestamp: 2026-05-18T11:51:47.483Z
Learning: When reviewing these OpenAI-compatible LLM vision/provider node implementations, do not flag direct access to `chat_response.choices[0]` after a successful SDK call as missing an empty-list guard. The relevant SDKs are expected to populate `choices` on 2xx responses, while 4xx/5xx/rate limit/auth failures raise exceptions before reaching `choices[0]`. If `choices` were unexpectedly empty, any resulting `IndexError` should be handled by the surrounding `except Exception` retry flow, which routes through `_shouldRetry` (returning False) and then `_format_user_error`, allowing the error to propagate cleanly to the pipeline. If cross-provider hardening is later required, implement it in a dedicated PR using a shared helper applied uniformly across provider nodes rather than adding ad-hoc guards per file.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
📚 Learning: 2026-05-20T14:18:46.136Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 690
File: nodes/src/nodes/flow_llm/IInstance.py:72-75
Timestamp: 2026-05-20T14:18:46.136Z
Learning: When calling LLMs from Python nodes in this repo, do not expect or add per-call timeout parameters to `IInvokeLLM.Ask` or `instance.invoke(...)` (these APIs carry only fields like `lane`, `op`, `question`, and do not provide a `timeout` argument). Instead, rely on the wired LLM provider node to enforce request timeouts. If Python-side timeout behavior is required for an LLM call, implement it by running `instance.invoke(...)` in a separate worker (e.g., `threading.Thread` with `join(timeout=...)`) and treating a non-finished join as a timeout, rather than trying to pass a timeout via the LLM API.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
📚 Learning: 2026-06-15T16:17:16.443Z
Learnt from: Rod-Christensen
Repo: rocketride-org/rocketride-server PR: 1278
File: nodes/test/test_vectordb_tool_mixin.py:380-380
Timestamp: 2026-06-15T16:17:16.443Z
Learning: In rocketride-server, for any pipeline node class methods decorated with `tool_function` under `nodes/**/*.py` and `packages/ai/**/*.py`, require that the tool method name is a bare method name (e.g., `search`, `upsert`, `delete`, `objdir`, `get`, `stats`) rather than a self-namespaced string. The agent framework will automatically namespace tools with a node-ID prefix at tool-discovery time (e.g., `<nodeId>.search`), so reviewers should not flag these bare names or suggest naming methods like `<serverName>.search` (or otherwise adding prefixes inside the node class itself).

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-07-13T03:20:23.329Z
Learnt from: kgarg2468
Repo: rocketride-org/rocketride-server PR: 1551
File: nodes/src/nodes/tool_calendar/calendar_client.py:313-332
Timestamp: 2026-07-13T03:20:23.329Z
Learning: When reviewing Python Google Workspace tool client code (e.g., retry helpers) under `nodes/src/nodes/tool_*/**/*_client.py`, treat the 429/5xx exponential-backoff retry shape as intentionally shared across the tool family. Do not request or apply node-specific modifications that would diverge from the shared retry pattern within an individual node PR (such as adding idempotency-aware write-retry handling for write operations like `events.insert`, `quickAdd`, `calendars.insert`, or `acl.insert`). If idempotency-aware changes to write retries are needed, record them as a family-wide follow-up issue targeted at the shared client pattern (the maintainer `kgarg2468` prefers this over per-node PR changes).

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
📚 Learning: 2026-07-19T23:37:30.816Z
Learnt from: kgarg2468
Repo: rocketride-org/rocketride-server PR: 1493
File: nodes/src/nodes/chroma/chroma.py:74-74
Timestamp: 2026-07-19T23:37:30.816Z
Learning: In Python vector-store node provider files, `self.threshold_search` should be treated as an inherited `DocumentStoreBase` contract (used by `DocumentStoreBase._addDoc` to filter data-lane documents by score). If a provider (e.g., Chroma/Qdrant/Pinecone) sets `self.threshold_search` during initialization from `config.get('score', 0.5)` and that value is only referenced in the base class, do NOT flag the assignment as “unused” based solely on searching within the individual provider file—trace the usage to `DocumentStoreBase`.

Applied to files:

  • nodes/src/nodes/tool_github/github_client.py
  • nodes/src/nodes/tool_github/IInstance.py
📚 Learning: 2026-04-10T16:35:23.430Z
Learnt from: ryan-t-christensen
Repo: rocketride-org/rocketride-server PR: 650
File: nodes/src/nodes/webhook/webhook/README.md:19-21
Timestamp: 2026-04-10T16:35:23.430Z
Learning: When reviewing node documentation under `nodes/**/README.md` (e.g., webhook docs), use the user-facing lane name `data`/`Data` as shown in the UI. The underlying configuration may use `tags`, but the UI maps lane `tags` to display name `Data` via `renameLanes` (see `packages/shared-ui/src/modules/flow/util/helpers.tsx`, `case 'tags': return 'Data'`). Therefore, do not flag documentation as incorrect when it refers to `data`/`Data` even if the backing `services.json` uses `tags`.

Applied to files:

  • nodes/src/nodes/tool_github/README.md
📚 Learning: 2026-06-02T14:51:49.020Z
Learnt from: dsapandora
Repo: rocketride-org/rocketride-server PR: 1065
File: nodes/test/tool_xtrace_memory/test_tools.py:36-104
Timestamp: 2026-06-02T14:51:49.020Z
Learning: For Python test files under `nodes/test/`, do not require PEP 257 docstrings for small, self-explanatory test-only stub helper functions when the function name and body clearly communicate intent (e.g., helpers like `_tool_function`, `_ensure_rocketlib`, `_passthrough`, `_ensure_pkg`). If a helper is non-trivial, obscures behavior, or is likely to be confusing to future readers, expect a docstring per project standards instead.

Applied to files:

  • nodes/test/tool_github/test_pr_review_context.py
📚 Learning: 2026-07-30T01:20:00.423Z
Learnt from: joshuadarron
Repo: rocketride-org/rocketride-server PR: 1687
File: nodes/test/tool_pipedrive/test_pipedrive.py:406-420
Timestamp: 2026-07-30T01:20:00.423Z
Learning: In Python pytest test functions/methods that combine `unittest.mock.patch` decorators with `pytest.mark.parametrize`, keep the positional ordering of the `patch`-injected mock parameters consistent with the decorator stacking. For methods, keep `self` first; then place mock arguments in the signature in the same positional order as the patch decorators inject them—specifically, the innermost `patch(...)` decorator should supply the first mock argument after `self`, with outer patches supplying subsequent mock arguments. Since `pytest.mark.parametrize` resolves values by parameter name, you do not need to reorder or move parametrized arguments in the signature relative to the injected mock arguments as long as the names match the `parametrize` configuration.

Applied to files:

  • nodes/test/tool_github/test_pr_review_context.py
📝 Walkthrough

Walkthrough

Changes

The GitHub tool adds pr_review_context, which combines pull request metadata, changed-file summaries, a bounded unified diff, ticket references, and related open pull requests and issues. The GitHub client now supports raw responses and custom Accept headers. Tests and documentation cover the new behavior.

GitHub PR review context

Layer / File(s) Summary
Raw GitHub response support
nodes/src/nodes/tool_github/github_client.py
call accepts an Accept header override and a raw option. Raw text is returned for successful and 204 responses when requested.
PR review context assembly
nodes/src/nodes/tool_github/IInstance.py
pr_review_context retrieves PR metadata, changed files, and a bounded diff. It matches related open pull requests and issues by ticket references and changed-file basenames.
Review context validation and discovery
nodes/test/tool_github/test_pr_review_context.py, nodes/src/nodes/tool_github/README.md
Tests cover extraction, matching, raw diff handling, context assembly, and truncation. The README documents the tool and read-only access.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to 8b48f

The new one-shot review context can omit files or related work beyond the first page and can report unrelated pull requests when filenames merely appear in their text, resulting in incomplete or misleading review context. These correctness issues should be fixed before merging.

Sequence Diagram(s)

sequenceDiagram
  participant ReviewAgent
  participant pr_review_context
  participant github_client.call
  participant GitHub_API
  ReviewAgent->>pr_review_context: request PR review context
  pr_review_context->>github_client.call: retrieve PR metadata and files
  github_client.call->>GitHub_API: fetch PR data
  pr_review_context->>github_client.call: retrieve raw unified diff
  github_client.call->>GitHub_API: fetch diff with diff Accept header
  pr_review_context->>github_client.call: retrieve open PRs and issues
  github_client.call->>GitHub_API: fetch related candidates
  pr_review_context-->>ReviewAgent: return assembled review context
Loading

Suggested reviewers: jmaionchi, rod-christensen, stepmikhaylov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: adding the pr_review_context preset to tool_github.
Linked Issues check ✅ Passed The PR adds the requested one-call PR review context with diff, changed files, and related PRs/issues matched by tickets and filenames [#1852].
Out of Scope Changes check ✅ Passed The client extension, documentation, and tests directly support the new pr_review_context functionality and remain within issue scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@nihalnihalani

Copy link
Copy Markdown
Collaborator

Two process things and one behavioural one.

  • CI has produced no Build, Ruff or CI OK result here — the only checks are Auto-label, a pending CodeRabbit and the Discord notifier, so pytest nodes/test/tool_github/test_pr_review_context.py has never run upstream. Looking at the workflow runs for this SHA, check-externals has been queued since 2026-08-17 and no CI run was created at all; on other fork PRs here the equivalent runs sit at action_required, waiting on a maintainer to approve a fork run. Worth asking for that rather than re-pushing.
  • The related-item sweep is single-page: /repos/{repo}/pulls and /repos/{repo}/issues are both called with per_page=100 and no page cursor loop, and the matching runs over just that page. On this repo that is already short — there are over 160 open PRs — so related.prs would quietly miss most candidates rather than report that it truncated. Either paginate, or push the match down to /search/issues using the ticket ids and file basenames.
  • feat(tool_github): add GitHub App installation-token auth #2113 changes the same three files (github_client.py, README.md, IInstance.py) and its github_client.py insertion lands a few lines above your call() signature change, so whichever merges second will need a rebase. Worth a note between the two threads about ordering.

@dylan-savage

Copy link
Copy Markdown
Collaborator

@bhanuaravind9549 thanks for the work on this, but we're going to close it.

The reason is design direction rather than anything wrong with the implementation. We want the GitHub tool catalog to stay a set of small tools that each do one job well, instead of adding larger tools that combine existing ones. pr_review_context bundles calls we already have (PR metadata, changed files, the diff, related issue search), so it
repackages what's already reachable rather than adding anything new, and it adds permanent public tool surface we then have to document and maintain.

The underlying issue (#1852) also hadn't been approved or prioritized before the work started, which is on us rather than on you. Sorry for the wasted time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation module:nodes Python pipeline nodes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A GitHub tool preset purpose-built for PR review (diff + changed files + related PRs/issues in one call)

3 participants