Repository navigation
agents: add manual PR review queue plugin and security rules - #4510
Merged
rickeylev merged 5 commits intoNov 15, 2026
Merged
Conversation
Maintainers need a quick view of open GitHub PRs awaiting attention without triggering automatic background polling or reviews. Adds an Antigravity side-panel plugin backed by an asyncio HTTP sidecar that invokes `gh` on explicit refresh, displays membership and review state, creates an isolated PR head worktree on demand, and launches a workspace-bound `/review-code` conversation.
The initial pr-queue plugin relied on permissive input/HTML/LS parsing, lacked Bazel test targets, and omitted security guidelines for sidecars, web UIs, and agent prompt construction. Tighten validation, DOM/CSP/CORS/loopback boundaries, prompt fencing, and SQLite escaping across the sidecar and tests, add a co-located BUILD.bazel target, and record these security rules in `.agents/rules/` and `.agents/skills/review-code/`.
Address pre-PR review findings across the `pr-queue` plugin, tests, and agent guidelines. Hardening local HTTP, DOM, CSP, SQLite, and Git ref boundaries while removing the self-signed HTTPS Language Server path keeps RPC traffic strictly over loopback `http://`. Split `server.py` into `state_store.py`, `git_worktree.py`, and `ls_client.py`, enforced `X-Sidecar-Token` and `Content-Type` across all API routes, excluded `base_repo` from HTTP config writes, moved unit tests under `tests/agents/pr_queue/`, replaced unsafe DOM injection with node builders and nonced styles, fixed PR age backfilling on stale cache entries, dropped `typing.Any` and test-only DI parameters, and codified timeout/retry/cap review criteria in `.agents/rules/`.
…_files # Conflicts: # .agents/rules/code-style.md # .agents/skills/review-code/review-code-style-prompt.md # .agents/skills/review-code/review-justification-auditor-prompt.md
Collaborator
Author
|
AI assistance contributed to this pull request. The PR author reviews and This is an automatically generated agent comment. |
Tests for .agents scripts belong next to the code under .agents/ rather than in tests/ so `//.agents/...` covers them. Move the pr-queue unit tests and Bazel test targets back into the sidecar package and remove the `tests/agents/pr_queue` package.
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.
Maintainers need a quick view of open GitHub PRs awaiting attention
without background polling or automatic reviews. Agent rules and
review prompts also lacked explicit guardrails for local HTTP
sidecars, web UI DOM/CSP hygiene, prompt-injection fencing, and
timeout or retry caps.
Add the manual
pr-queueIDE plugin, backed by an asyncio HTTPsidecar split into
fetch_pr_queue,state_store,git_worktree,ls_client, andservermodules. Explicit refreshes query GitHubvia
ghand serve an adaptive side-panel UI (index.html). Thesidecar validates
Host/Originheaders, sidecar tokens, and Gitinputs, provisions isolated PR head worktrees on demand, and launches
/review-codechats over loopback HTTP Language Server RPCs.Package the sidecar modules and co-located unit tests as Bazel targets
under
.agents/plugins/pr-queue/sidecars/pr_queue/. Update.agents/rules/and.agents/skills/review-code/to codify web UI,sidecar, SQLite, CLI, and prompt-boundary security checks plus
conservative timeout, retry, and resource-cap review criteria.