Skip to content

agents: add manual PR review queue plugin and security rules - #4510

Merged
rickeylev merged 5 commits into
bazel-contrib:mainfrom
rickeylev:manage_agent_config_files
Nov 15, 2026
Merged

rickeylev merged 5 commits into
bazel-contrib:mainfrom
rickeylev:manage_agent_config_files

Conversation

@rickeylev

@rickeylev rickeylev commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

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-queue IDE plugin, backed by an asyncio HTTP
sidecar split into fetch_pr_queue, state_store, git_worktree,
ls_client, and server modules. Explicit refreshes query GitHub
via gh and serve an adaptive side-panel UI (index.html). The
sidecar validates Host/Origin headers, sidecar tokens, and Git
inputs, provisions isolated PR head worktrees on demand, and launches
/review-code chats 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.

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
@rickeylev
rickeylev requested a review from aignas as a code owner November 15, 2026 21:01
@rickeylev

Copy link
Copy Markdown
Collaborator Author

AI assistance contributed to this pull request. The PR author reviews and
approves all agent-generated changes and replies before pushing updates
or posting responses here.

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.
@rickeylev
rickeylev merged commit ea4234e into bazel-contrib:main Nov 15, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant