Repository navigation
Description
Problem
Owner direction of 2026-11-22: investigate how the Service App devops-cli-service handles a mention in a comment and the review of a pull request.
- The Service takes only
issueswebhook events: opened, reopened, edited, labeled and unlabeled (CONST_ROADMAP_INTAKE_BATCH_KEYS,src/devops_cli/config/constants.py:4013-4027). It gets noissue_comment,pull_request,pull_request_revieworpull_request_review_commentevent. - GitHub requests a review only from a user or a team. The App cannot be a requested reviewer, but it can submit a review with pull request write access. A mention of the App bot sends the App no notification: only a webhook with the comment text shows it.
- ci(release): ask dan-petty to review release pull requests #6770, ci: ask dan-petty to review each pull request with CODEOWNERS infra#34 and ci: ask dan-petty to review each pull request with CODEOWNERS devtools#39 make the Service App approve release pull requests from a workflow. A Service that reads review events could take that job later.
- Comment text is untrusted input: a mention must not let any author start work or steer an agent.
Proposed remedy
A study, with no product change. It answers, with evidence and a recommendation:
- Which webhook events and actions the Service takes for a mention (
issue_commentcreated,pull_request_review_commentcreated) and for reviews (pull_requestopened or synchronize,pull_request_reviewsubmitted), and how they enter the job lanes of the re-architecture refactor(roadmap): re-architect stage and implement on Coder #6519. - Who may start work with a mention (the owner and the collaborators with write access), and how the Service ignores bots, its own comments and repeated events.
- What a mention may start (an answer, a step of a roadmap item again, a review of a pull request), and the limits of cost and rate.
- How the Service reviews a pull request: when (a label, a mention, or each release pull request), with which review event (COMMENT, APPROVE, REQUEST_CHANGES), and how that relates to the approval of release pull requests.
- Which open tool covers it first, for example
anthropics/claude-code-action(mention triggers and pull request reviews in GitHub Actions) or Probot, against a Service job.
The result is a decision record or a design section, and one follow-up issue for each part that is built.
Acceptance criteria
- A document answers the 5 questions with sources and a recommendation, and names the threat of comment text and its controls.
- Each part that is built has its own follow-up issue.
Person steps
- The owner decides the recommendation.
Dependencies
None. Related: #6519 (re-architecture), #6770.
Alternatives check of 2026-11-22: not-applicable.
Class: docs, no search.
Tool: none found.
Proposed design
Problem statement
The Service App takes only issues webhook events. A mention in a comment therefore reaches no job. The owner direction of 2026-11-22 asks for a study of a mention and of a pull request review. The study must record the events, the permissions, the cost limits and the review design, with sources and a recommendation. Comment text is untrusted input, so the study must name its controls.
Acceptance criteria
Requirement: The study answers the five questions with sources
The repository SHALL hold the study at docs/roadmap/service-mentions-and-reviews.md, with one section for each of the five questions of the item and at least one source in each section.
Scenario: Each question has its section and its sources
- WHEN an offline test reads the study at the head of the change
- THEN the test finds one heading for each of the five questions, and at least one repository path or URL in each section.
Requirement: The threat of comment text and its controls
The study SHALL name the threat of untrusted comment text and each control that bounds it.
Scenario: The threat section names each control
- WHEN an offline test reads the threat section of the study
- THEN the section names the author association check, the bot and own-account check, the delivery id check and the closed set of commands.
Requirement: The review design of a release pull request
The study MUST state when the Service reviews a release pull request, which review event it submits, and how that review names the head commit.
Scenario: The review section states the trigger and the review event
- WHEN an offline test reads the review section of the study
- THEN the section names
check_suitecompleted andpull_requestsynchronize, the passing check runs of the head commit, and one review event of COMMENT, APPROVE or REQUEST_CHANGES with thecommit_idof that head.
Requirement: The comparison of the tools
The study SHALL compare anthropics/claude-code-action, Probot and a consumer of the webhook router, and MUST recommend one with its reason and its source.
Scenario: The comparison names each option and the recommendation
- WHEN an offline test reads the tool section of the study
- THEN the section names the three options, marks one as the recommendation, and gives the reason with a source.
Requirement: The follow-up parts
The study SHALL name each part that a follow-up issue must cover, with the Conventional Commit title of that issue.
Scenario: The follow-up section lists a title for each part
- WHEN an offline test reads the follow-up section of the study
- THEN the section lists one title of the form
<type>(<scope>): <summary>for each part that it names.
Requirement: The docs checks accept the study
The study MUST pass the docs checks of the repository and MUST be a page of the documentation site.
Scenario: The docs row and the site build accept the new page
- WHEN the change adds
docs/roadmap/service-mentions-and-reviews.mdand the docs checks run - THEN
uv run devops ci --check --only docsexits 0, anduv run devops docs site buildstages the page atdocs/roadmap/service-mentions-and-reviews.md.
Requirement: Pending a person after the merge
The owner MUST record the acceptance or the refusal of the recommendation on the issue after the merge.
Scenario: The owner records the decision
- WHEN the study merges into the default branch
- THEN the issue holds a comment of the owner that accepts or refuses the recommendation.
Existing Tool Considered
The alternatives check of 2026-11-22 recorded not-applicable for this item, class docs with no search, and named no tool; its block is in the issue body. No open tool covers a study document, and this change builds no code, so the written cost is zero tokens and zero elapsed time. The study compares anthropics/claude-code-action, Probot and a consumer of the webhook router for the follow-up work, and records the license and the last activity of each.
Key questions
- Which webhook events does the Service take today, and which events must a mention and a review add?: The router names
issues,issue_comment,pull_requestandcheck_suite.check_suiteis a model ofsrc/devops_cli/models/webhooks.py. The intake batch row takes only theissuesactions ofCONST_ROADMAP_INTAKE_BATCH_KEYS. A mention needsissue_commentcreated andpull_request_review_commentcreated. A review needspull_request_reviewsubmitted, andpull_requestis already a subscribed event. refactor(roadmap): re-architect stage and implement on Coder #6519 defines the job lanes that each event enters. [sources: src/devops_cli/config/constants.py:4260, src/devops_cli/models/webhooks.py:136, src/devops_cli/server/routes/webhooks.py, tests/server/routes/test_roadmap_consumer_comment_events.py, tests/server/routes/test_roadmap_consumer_pull_events.py, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md] - Who may start work with a mention, and how does the Service ignore bots, its own comments and repeated deliveries?: Only an author with write access starts work: the author association is OWNER, MEMBER or COLLABORATOR. The Service drops a comment of a bot and a comment of its own App account. It also drops a delivery id or a comment id that it already holds. (best practice) [sources: src/devops_cli/server/routes/webhooks.py, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
- Chosen: The author association OWNER, MEMBER or COLLABORATOR. GitHub gives the association in each payload, and it needs no list of logins to keep.
- Rejected: Any author of a comment. Any person could then start work and spend tokens on the installation.
- Rejected: A list of logins in the configuration. The list goes stale, and the association already names write access.
- What may a mention start, and which cost and rate limits bound it?: A mention starts only the job that the state of the item already allows, one run for each accepted mention. The claim and the Status gate each job, and the request budget of the Service bounds the GitHub calls. (best practice) [sources: CONTEXT.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
- Chosen: The job that the state of the item already allows, one run for each accepted mention. The claim and the Status already gate each job, and the Service already holds the request budget.
- Rejected: Any roadmap job that the author names in the comment. The comment text is untrusted, so an author could spend tokens or steer an agent.
- Rejected: A fixed answer with no job. It gives no step of a roadmap item again, which the owner direction asks the study to cover.
- Which event and which review event does the Service use to review a release pull request?: The Service acts on
check_suitecompleted and onpull_requestsynchronize. It reads the check runs of the head commit, and submits an APPROVE review with thecommit_idof that head when each check run passed. The GitHub client already carries acommit_id, so the review names the head commit. (best practice) [sources: src/devops_cli/models/webhooks.py:136, src/devops_cli/github/client.py:378, src/devops_cli/github/pr_monitor.py:464, CONTEXT.md]- Chosen: The Service approves from the cluster after the checks of the head commit pass. The Service already holds the App key, and the review follows the checks of the head commit.
- Rejected: A workflow of each repository approves the release pull request. It puts a Service credential in each repository, and the Service holds the key already.
- Rejected: The release pull request requests the review of a person only. It keeps a person in each release, which the owner direction asks to remove.
- Which tool covers the mention and the review first:
anthropics/claude-code-action, Probot, or a consumer of the webhook router?: The study recommends a consumer of the webhook router. The Service holds the App key in the cluster, and the router delivers each event to the consumers that subscribe to it. The action runs in GitHub Actions and cannot use that key. Probot is a second GitHub App with its own key and deployment. (best practice) [sources: docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, docs/CLUSTER.md]- Chosen: A consumer of the webhook router in the Service. The Service holds the App key, and the router delivers each event to the consumers that subscribe to it.
- Rejected:
anthropics/claude-code-action. It runs in GitHub Actions and cannot use the key that the Service holds in the cluster. - Rejected: Probot. It is a second GitHub App with its own key and deployment, outside the Service.
- Which controls keep the comment text untrusted?: The Service parses the comment against a closed set of commands and drops the rest, so no comment text reaches a model as an instruction. It authorizes by the author association, drops bots and its own account, and reads the comment id and the delivery id. The command
implement: retryis the precedent of a closed command. (best practice) [sources: CONTEXT.md, src/devops_cli/server/routes/webhooks.py, docs/ROADMAP_WORKFLOW.md]- Chosen: Parse the comment against a closed set of commands and drop the rest. The Service keeps the text as data, and the set of actions stays fixed.
- Rejected: Pass the comment text to a model as an instruction. The author of any comment could then steer an agent or start work.
- Rejected: Read no comment at all. The owner direction asks the study to design a mention, so the path must exist.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 22, 2026
Both concern the Service reviewing pull requests, but the candidate produces a study document while #6770 implements the approval behaviour.dan-petty commentedon Nov 22, 2026
Owner decision of 2026-11-22: the Service approves release pull requests, in the cluster, with the key that it already holds. No repository gets a key of the Service App, and no workflow approves. Until this study leads to a built follow-up, release pull requests only request the review of dan-petty (#6770, dan-petty/infra#34, dan-petty/devtools#39). Question 4 of this study must design the approval of a release pull request: the events (for example
check_suitecompleted orpull_requestsynchronize of a branchrelease-please--*), the check that every check run of the head commit passed, and an APPROVE review withcommit_idof that commit.devops-cli-service commentedon Nov 23, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 27, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.