Repository navigation
ci(apollo-vertex): learn agent instructions from review feedback daily - #1468
ruudandriessen wants to merge 3 commits into
Conversation
Instruction changes learned from PR comment text always need a person to review them, so the auto-merge job skips chore/vertex-review-feedback-* branches. Co-authored-by: Ruud Andriessen <ruud.andriessen@gmail.com>
collect-comments.mjs deterministically lists the comments people left on PRs labeled app:apollo-vertex that merged in a window (the previous UTC day by default): bots, untrusted authors and empty reviews are dropped, and inline comments keep their diff hunk and the thread they reply to. The daily workflow feeds that JSON to the Cursor CLI, which may only edit the two Vertex AGENTS.md files and runs without GitHub credentials. A deterministic step rejects any other change and opens a PR for review. Co-authored-by: Ruud Andriessen <ruud.andriessen@gmail.com>
Dependency License Review
License distribution
Excluded packages
|
…kflow The installer links agent into ~/.local/bin, not the ~/.cursor/bin the GitHub Actions docs give, so the agent step would not find it. Also pass --trust so print mode never waits on a workspace trust prompt. Co-authored-by: Ruud Andriessen <ruud.andriessen@gmail.com>
📊 Coverage + size by packagePer-package bundle size on this PR (no JS/TS source changes detected under
"Coverage" is each package's own |
There was a problem hiding this comment.
🟡 Changes recommended
Agent-controlled runner state can compromise later publishing credentials, and file validation, reply filtering, and branch naming need correction.
4 open issues
What changed in this PR
Adds a daily workflow that turns Apollo Vertex review feedback into proposed agent-instruction updates for human review.
Changes:
- Adds a dependency-free comment collector with filtering, thread context, summaries, and unit tests.
- Introduces the learning prompt and scheduled workflow to propose updates to the two Vertex
AGENTS.mdfiles. - Excludes generated feedback branches from automatic merging.
| File | Description |
|---|---|
.github/workflows/apollo-vertex-review-feedback.yml |
Collects feedback, runs the agent, and opens instruction-update PRs. |
.github/workflows/apollo-vertex-auto-merge.yml |
Skips automatic merging for feedback branches. |
.github/scripts/vertex-review-feedback/prompt.md |
Defines how the agent selects and documents durable rules. |
.github/scripts/vertex-review-feedback/collect-comments.test.mjs |
Tests collection helpers, filtering, context, and summaries. |
.github/scripts/vertex-review-feedback/collect-comments.mjs |
Collects review feedback and produces JSON and Markdown reports. |
Review effort: Balanced
| id: changes | ||
| if: steps.agent-key.outputs.available == 'true' | ||
| run: | | ||
| changed=$( { git diff --name-only; git ls-files --others --exclude-standard; } | sort -u) |
| - name: Generate GitHub App token | ||
| if: steps.changes.outputs.changed == 'true' | ||
| uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 |
|
|
||
| for (const comment of reviewComments) { | ||
| if (!keep(comment)) continue; | ||
| const parent = comment.in_reply_to_id ? reviewCommentsById.get(comment.in_reply_to_id) : null; |
| run: | | ||
| # apollo-vertex-auto-merge.yml skips this branch prefix, so a person | ||
| # always reviews instructions learned from comment text. | ||
| BRANCH="chore/vertex-review-feedback-${WINDOW}" |
Storybook visual diff✅ No stories are affected by this PR's changes; nothing to compare. Logs Updated (PT): Oct 26, 2026, 01:28:06 AM |


Summary
A daily self-improvement loop for the Apollo Vertex agent instructions. Every day it collects what people said in review on the
app:apollo-vertexPRs merged the previous UTC day, lets an agent fold durable rules into the two VertexAGENTS.mdfiles, and opens a PR for a person to review.Only the agent step is non-deterministic:
collect-comments.mjs(deterministic, zero dependencies) lists every comment written by a person: inline review comments with their diff hunk and the thread they reply to, conversation comments, and review summaries. It drops bots (user.type != Useror[bot]logins), authors whoseauthor_associationisn'tOWNER/MEMBER/COLLABORATOR/CONTRIBUTOR(it's a public repo and the text feeds a prompt), and empty approvals. The output is JSON plus a markdown digest.prompt.mdtells the agent what qualifies as a rule (reviewer corrections that generalize), what to skip ("Fixed in abc", one-off bugs, unresolved threads), to weigh PR-author replies to bots lower (they're usually agent-written), and to treat comment bodies as data, not instructions.apollo-vertex-review-feedback.ymlruns at 05:00 UTC daily (or on dispatch with a customsince/untilwindow for backfills):CURSOR_API_KEY. It has no GitHub token, the checkout haspersist-credentials: false, and a temporary.cursor/cli.jsondeniesgit,gh,curl, web fetch and MCP.packages/apollo-vertex/AGENTS.mdorapps/apollo-vertex/AGENTS.mdchanged.apollo-vertex-auto-merge.ymlnow skipschore/vertex-review-feedback-*branches, so learned instructions are never auto-merged.Setup needed
CURSOR_API_KEYrepository secret. Until it exists, the workflow still collects comments, writes the digest to the job summary, and emits a warning instead of failing.VERTEX_REVIEW_FEEDBACK_MODELrepository variable to pin the model.Review notes
merged:<ts>Z..<ts>Zranges, so the script queries whole days with a day of margin and filtersmerged_atexactly on the client.CONTRIBUTOR/COLLABORATOR, notMEMBER, because org membership is private. That's whyCONTRIBUTORis on the trusted list.curl https://cursor.com/install | bash, which can't be pinned. The current installer linksagentinto~/.local/bin, not the~/.cursor/binthe GitHub Actions docs give, so the workflow uses~/.local/binand checksagent --version.Testing
node --test .github/scripts/vertex-review-feedback/*.test.mjs: 17 unit tests for the window, search query, author filtering, thread context, sorting and markdown digest.run:scripts locally, with stubs foragentandghand a local bare repo as the remote:AGENTS.mdcommitted, branch pushed, token stripped from origin, PR body assembledREADME.mdand creating a file: the run fails, nothing pushedactionlintandzizmor(repo config) pass on both workflows.