feat(pi): add Cloud Code Review mode and rename Cloud to Cloud PR#5577
feat(pi): add Cloud Code Review mode and rename Cloud to Cloud PR#5577BillLeoutsakosvl346 wants to merge 1 commit into
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR adds Cloud Code Review support for the Pi block. The main changes are:
Confidence Score: 4/5The Cloud Code Review submission path needs fixes before merging.
apps/sim/executor/handlers/pi/cloud-review-backend.ts Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Sim as Pi handler
participant GH as GitHub API tools
participant E2B as E2B sandbox
participant Pi as Pi CLI
Sim->>GH: Fetch PR metadata and files
GH-->>Sim: PR head SHA and diff context
Sim->>E2B: Clone and fetch PR head
E2B-->>Sim: Checked-out head SHA
Sim->>E2B: Write prompt and PR context
E2B->>Pi: Run review agent
Pi-->>E2B: Write pi-review.json
E2B-->>Sim: Return review JSON
Sim->>GH: Submit PR review with body and comments
GH-->>Sim: Review URL or creation error
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Sim as Pi handler
participant GH as GitHub API tools
participant E2B as E2B sandbox
participant Pi as Pi CLI
Sim->>GH: Fetch PR metadata and files
GH-->>Sim: PR head SHA and diff context
Sim->>E2B: Clone and fetch PR head
E2B-->>Sim: Checked-out head SHA
Sim->>E2B: Write prompt and PR context
E2B->>Pi: Run review agent
Pi-->>E2B: Write pi-review.json
E2B-->>Sim: Return review JSON
Sim->>GH: Submit PR review with body and comments
GH-->>Sim: Review URL or creation error
Reviews (1): Last reviewed commit: "feat(pi): add Cloud Code Review mode and..." | Re-trigger Greptile |
Introduce a third Pi mode that reviews an existing GitHub PR in an E2B sandbox and posts a structured review with optional inline comments. Keep the stored cloud id for backward compatibility, extend github_create_pr_review for inline comments, and harden review submission against stale SHAs and invalid comment payloads. Co-authored-by: Cursor <cursoragent@cursor.com>
2760fad to
c8d7b57
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c8d7b57. Configure here.
| const comment = item as Record<string, unknown> | ||
| if (typeof comment.path !== 'string' || !comment.path.trim()) continue | ||
| if (typeof comment.body !== 'string' || !comment.body.trim()) continue | ||
| if (!isPositiveInt(comment.line)) continue |
There was a problem hiding this comment.
String line numbers silently dropped
Low Severity
parseReviewFindings only accepts line values that are already JavaScript numbers. If the agent writes valid JSON with numeric strings (e.g. "line": "12"), those inline comments are skipped without error while the summary review still posts, so commentsPosted can be zero despite the agent believing it left inline notes.
Reviewed by Cursor Bugbot for commit c8d7b57. Configure here.
|
@BillLeoutsakosvl346 the goal is for the agent to leave comments on your PR in github directly since it has all the credentials and everything similar to Greptile or Bugbot |
|
Coding agent demo: Screen.Recording.2026-07-13.at.11.03.19.AM.mp4 |


Summary
cloudfor backward compatibility)github_create_pr_reviewto support an inlinecomments[]arraycloud-shared.tsfor Cloud PR and Cloud Code ReviewTest plan
NEXT_PUBLIC_E2B_ENABLEDis setMade with Cursor