Skip to content

feat(roadmap): comment releases from GitHub release webhooks #4416

Done

Description

@dan-petty

Problem or Motivation

The release_comments row (src/devops_cli/roadmap/release_comments.py, #2917) runs two passes over recent releases. Pass 1 posts Released in <tag> on each closed issue carried by the release. Pass 2 posts Live since <time> once the Service and runner image digests run in the cluster.

ADR 0009 originally listed release among the roadmap consumer's webhook events, but #1863 removed the old release-close job before #2917 added release_comments. Today, CONST_ROADMAP_WEBHOOK_EVENTS (src/devops_cli/config/constants.py:3545) omits "release", so release_comments runs only on an 11-minute timer (DEFAULT_ROADMAP_RELEASE_COMMENTS_INTERVAL_MINUTES). On idle repositories (#3672), release notifications wait up to 11 minutes even though release-please just published the GitHub release.

Proposed Solution & Architectural Design

  • Extend GitHubWebhookPayload (src/devops_cli/models/webhooks.py) with an optional release model (tag_name, html_url, body, draft, prerelease, published_at).
  • Add "release" to CONST_ROADMAP_WEBHOOK_EVENTS (src/devops_cli/config/constants.py).
  • Refuse release payloads in roadmap_consumer when action != "published" or when release.draft or release.prerelease is True.
  • Register a scoped ("release", "published") update on the status lane in src/devops_cli/roadmap/run.py.
  • Build ReleaseInfo from the payload, post Released in <tag> on its closed issues, and update release_comments.json.
  • Leave Pass 2 (Live since <time>) to the 11-minute poll, because image builds and Argo CD rollouts finish later.

Target Subsystem

SDLC, Git & PR Governance

Existing Tool Considered

@semantic-release/github comments on released issues in CI, whereas this repository uses release-please (RELEASE_CYCLE.md). src/devops_cli/roadmap/release_comments.py already maintains idempotent marker comments and ReleaseLedger for both Released in and Live since. Wiring ("release", "published") to release_comments.py costs about 80,000 tokens to build, maintain, and fix, and 1.5 hours of elapsed time.

Acceptance Criteria

  • CONST_ROADMAP_WEBHOOK_EVENTS includes "release", and k8s/README.md step 8 lists "release".
  • Draft releases, prereleases, and release actions other than "published" are ignored at payload refusal with zero GitHub API requests.
  • A release published webhook runs a scoped status update that posts Released in <tag> and updates release_comments.json.
  • The 11-minute release_comments poll continues to reconcile missed webhooks and post Live since <time> after cluster rollout.
  • Offline unit tests cover payload validation, draft/prerelease refusal, and scoped Released in <tag> commenting.

Standards Compliance

  • I confirm this proposal aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 5, zero bare exceptions, tests that cover the changed lines).
  • I am willing to submit a pull request implementing this feature with accompanying tests.

Alternatives check of 2026-11-19: in-use.
The repository already uses this tool.
Tool: semantic-release/github (https://github.com/semantic-release/github), MIT, last activity 2026-11-16, maintained.
Reason: Searches surfaced only @semantic-release/github, which does post success comments on the issues a release resolves, but it belongs to semantic-release, while this repository releases with release-please and keeps its own marker ledger and webhook refusal.

Covers:

  • Comments on issues and pull requests a release resolves
  • Configurable comment text with release tag and URL
  • Idempotent success comments on repeated runs

Lacks:

  • No support for the release-please flow the repository uses
  • No release webhook payload model or draft/prerelease refusal
  • No release ledger and no live-since pass after rollout

Proposed design

Problem statement

The release_comments row posts release comments only on an 11-minute timer because the roadmap webhook event set omits release. A published release can wait up to 11 minutes on an idle repository. The change subscribes the roadmap consumer to the release event, refuses draft, prerelease and non-published deliveries, and posts the Released in <tag> comment at once on the status lane. The 11-minute poll remains for Live since <time> and reconciliation.

Acceptance criteria

Requirement: Release event subscription

The roadmap consumer SHALL subscribe to the release event, so that CONST_ROADMAP_WEBHOOK_EVENTS holds "release".

Scenario: The event set holds release

  • WHEN a unit test imports CONST_ROADMAP_WEBHOOK_EVENTS from src/devops_cli/config/constants.py
  • THEN the test asserts that "release" is a member of the set.

Requirement: Release payload fields

GitHubWebhookPayload SHALL parse tag_name, html_url, body, draft, prerelease and published_at from an optional release object.

Scenario: A published release payload parses

  • WHEN a unit test validates a release payload with action published and the six release fields
  • THEN the test asserts that the payload release holds the tag, URL and body, and that draft and prerelease are false.

Requirement: Unwanted release delivery refused

The roadmap consumer SHALL refuse a release delivery when its action is not published, or when release.draft or release.prerelease is true, and MUST send no GitHub request for that delivery.

Scenario: An unwanted release is refused

  • WHEN a unit test sends a non-published action, a draft and a prerelease payload to the roadmap webhook refusal
  • THEN the test asserts that each refusal returns before any GitHub store call and the fake store records no comment or request.

Requirement: Scoped release update comments

The scoped ("release", "published") update SHALL run on the status lane and post Released in <tag> on each closed issue that the release body links.

Scenario: The scoped update comments the closed issue

  • WHEN a unit test runs the scoped release update with a fake store, release tag v1.2.3 and a release body that links issue 123
  • THEN the test asserts that the scoped update is registered on the status lane and that issue 123 holds one comment whose first line is the released marker for v1.2.3.

Requirement: Scoped update records ledger

The scoped release update SHALL set the released flag of the tag in release_comments.json, so that a second delivery posts no second comment.

Scenario: A second delivery posts no comment

  • WHEN a unit test runs the scoped release update twice for the same tag with a fake store
  • THEN the test asserts that issue 123 holds one released marker comment and the ledger holds released true for the tag.

Requirement: Webhook does not post live time

The scoped release update MUST NOT post the Live since <time> comment.

Scenario: The scoped update posts only the released marker

  • WHEN a unit test runs the scoped release update for a published release
  • THEN the test asserts that the fake store holds no comment whose first line is the live marker.

Requirement: Poll interval stays

The release_comments row SHALL keep its 11-minute interval.

Scenario: The default interval is 11 minutes

  • WHEN a unit test reads DEFAULT_ROADMAP_RELEASE_COMMENTS_INTERVAL_MINUTES from src/devops_cli/config/defaults.py
  • THEN the test asserts that the value is 11.

Requirement: Poll posts live time

The release_comments row MUST post Live since <time> after the Service and runner image digests run in the cluster.

Scenario: The poll posts the live comment

  • WHEN a unit test runs comment_releases with a fake feed, a fake roll result and a fake registry client after the digests run
  • THEN the test asserts that the issue holds a comment whose first line is the live marker of the tag.

Requirement: Offline tests cover the change

The change SHALL add offline unit tests for payload validation, payload refusal and the scoped Released in comment.

Scenario: The tests run with no network

  • WHEN the roadmap and webhook test modules run with network access blocked
  • THEN the tests pass and cover the refusal and the scoped comment.

Existing Tool Considered

The alternatives check in the issue body records semantic-release/github with verdict in-use: the repository already uses this tool, and the block gives the reason that it belongs to semantic-release while this repository releases with release-please and keeps its own marker ledger and webhook refusal. The proposal adds the release webhook payload model, the draft and prerelease refusal and a scoped call to the existing release_comments ledger, which are the gaps the block lists. The written cost to build, keep and fix the webhook wiring and refusal is about 80,000 tokens and 1.5 hours of elapsed time.

Key questions

  • Does CONST_ROADMAP_WEBHOOK_EVENTS hold release today?: No. The set at src/devops_cli/config/constants.py:3938 omits release, and step 8 of k8s/README.md lists the issue events. ADR 0009 records the roadmap consumer's event set. [sources: src/devops_cli/config/constants.py:3938, k8s/README.md, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md]
  • Which path carries a published release to the comment row?: Add release to CONST_ROADMAP_WEBHOOK_EVENTS and register a scoped ("release", "published") update on the status lane, as ADR 0017 requires. The 11-minute poll stays for reconciliation. (best practice) [sources: docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md, src/devops_cli/config/constants.py:3938, src/devops_cli/roadmap/run.py]
    • Chosen: Scoped release update. ADR 0017 says each subscribed event runs the update scoped to it at once.
    • Rejected: Poll only. A release then waits up to 11 minutes, which is the latency of feat(service): an idle repository polls less often #3672.
    • Rejected: Intake batch key. Intake decides issues, and a release delivery names no issue.
  • Which lane runs the scoped release update?: The status lane. The release_comments row is a status-lane row that calls no model, so the update must not wait behind a model round. (best practice) [sources: src/devops_cli/roadmap/run.py, CONTEXT.md, docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]
    • Chosen: Status lane. The release_comments row is a status-lane row, and the update calls no model.
    • Rejected: Model lane. The update calls no model, and it would wait behind a model round.
    • Rejected: Triage lane. That lane runs intake only.
  • Where does the consumer refuse a draft, a prerelease and an action other than published?: At payload refusal in the roadmap consumer, before any scoped update. The refusal then costs zero GitHub requests. (best practice) [sources: src/devops_cli/server/routes/webhooks.py, src/devops_cli/models/webhooks.py, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md]
    • Chosen: Refusal in the consumer. The body requires zero GitHub requests, and the refusal comes before any read.
    • Rejected: Refusal in the scoped runner. It costs requests, and a refusal would look like a failed job.
  • How does the scoped update carry the release tag when the delivery record needs an issue number?: Make the issue number optional and add an optional tag to the delivery record. The release update reads the tag, and the issue update keeps the number. (best practice) [sources: src/devops_cli/roadmap/run.py, src/devops_cli/server/service.py]
    • Chosen: Optional number and tag. One delivery type keeps one map of scoped updates and one code path.
    • Rejected: A second delivery type. Two types give two paths to the same map of scoped updates.
  • Does the scoped update reuse the release_comments code?: Yes. A small function in release_comments.py posts one release with marker, released_body, _comment_once and ReleaseLedger, and reads its closed issues with GitHubReleaseFeed.closed_issues. (best practice) [sources: src/devops_cli/roadmap/release_comments.py, src/devops_cli/roadmap/release_feed.py]
    • Chosen: Reuse release_comments.py. The marker, the body and the ledger stay in one module, so the two passes cannot drift.
    • Rejected: A new module for the webhook path. It copies the marker and ledger rules, and the two copies drift.
    • Rejected: Call comment_releases with no cluster or registry. It re-reads the 30 newest releases, so the update is not scoped to its delivery.
  • Can closed_issues read the closed issues of a ReleaseInfo that the payload builds?: Yes. It reads the pull requests that the release body links as ([#N](url)), and the body is one of the six payload fields. [sources: src/devops_cli/roadmap/release_feed.py, src/devops_cli/roadmap/release_comments.py]
  • Which release fields does the payload model declare?: The six fields that the Service reads: tag_name, html_url, body, draft, prerelease and published_at. ADR 0009 keeps one model for every event, with the fields that the Service reads. (best practice) [sources: docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md, src/devops_cli/models/webhooks.py]
    • Chosen: The six fields that the Service reads. ADR 0009 declares only the fields that the Service reads, and extra="ignore" drops the rest.
    • Rejected: The whole GitHub release object. It adds fields that no code reads, and the model then follows each change of GitHub.
  • Does the 11-minute poll stay?: Yes. Live since waits for the image builds and the Argo CD rollout, and the poll reconciles a lost delivery. (best practice) [sources: src/devops_cli/roadmap/release_comments.py, src/devops_cli/config/defaults.py:1150, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Chosen: Keep the poll. A missed webhook then only delays the live comment, and the poll reconciles.
    • Rejected: Remove the poll. A missed delivery would lose the Live since comment, and no later round would post it.
  • Does the code change wait on a repository webhook setting?: No. The 11-minute poll reconciles missed deliveries, so a repository administrator can add the release event after the merge without blocking the code. The setting changes only latency. [sources: src/devops_cli/roadmap/release_comments.py, src/devops_cli/config/defaults.py:1150, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The 11-minute poll still works as a fallback, so this is a latency improvement rather than a blocker.
    • Value: Medium. Release notifications drop from up to 11 minutes to near-instant, improving the developer experience on release day.
    • Effort: Medium. Requires a new payload model, refusal logic, scoped update registration, and offline tests, estimated at 1.5 hours of work.
    • Related: feat(roadmap): a release comments the version and the deploy time on each issue it carries #2917, which asks for a different change. Both concern the release_comments row, but #2917 created the two-pass commenting logic while the candidate adds a release-published webhook trigger to it.
  3. added
    priority/p2-medium
    on Nov 10, 2026
  4. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 1ca0133 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • Who adds the release event to each repository's webhook? (a person decides)
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The searches turned up @semantic-release/github as the only maintained tool that comments on the issues and pull requests a release resolves, which is the comment-posting half of this need. It cannot be wired to a GitHub release webhook, keeps no release ledger and posts no "Live since" comment, and it only runs inside semantic-release's own publish step, whereas this repository releases with release-please, so it covers only a part.

    Tool: semantic-release/github (https://github.com/semantic-release/github)

    • License: MIT
    • Last activity: 2026-11-11
    • Maintained: yes

    Covers:

    • Posts a configurable success comment on each issue and pull request resolved by a release (default text: this issue was resolved in version X, with the release URL)
    • Runs as part of publishing a release, so the comment is posted at release time rather than on a timer
    • Can add released labels to the resolved issues and pull requests
    • Skips the comment when the success comment option is disabled or its condition does not match

    Lacks:

    • No handler for GitHub release webhook deliveries: it reacts only to the release that semantic-release itself publishes, not to a release-please-published release
    • No idempotent marker comments or release_comments.json ledger state, so a repeated delivery would not be deduplicated by it
    • No second pass that posts Live since <time> after the Service and runner image digests run in the cluster
    • Adopting it means replacing the release toolchain, which the repository fixes to release-please
    • No roadmap consumer, status-lane scoped update or payload refusal logic

    Tools considered:

    Searches run:

    • @semantic-release/github plugin comments on released issues and pull requests, results: 5
    • release-please comment on released issues GitHub release webhook automation, results: 5
    • GitHub Action comment on closed issues when release is published, results: 5
    • tool comments "released in" on issues after GitHub release webhook, results: 5
    • "release" webhook "comment" issues npm package github release notifier, results: 5
    • probot app on release published comment closed issues release notes, results: 5
    • github release published action comment on issues closed by release marketplace, results: 5

    Sources:

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  6. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: partly, tool https://github.com/semantic-release/github. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • GitHub release webhook comment "Released in" on closed issues tool, results: 5
    • @semantic-release/github plugin success comment released issues, results: 5
    • semantic-release github npm package successComment released issues, results: 5
    • release-please github comment on released issues, results: 5
    • probot app comment released issues changelog, results: 5
    • tool that comments on GitHub issues when a release is published, results: 5
    • semantic-release, results: 5
    • release-please, results: 5
    • github webhook release event automation open source library python, results: 5
    • github action to comment on issues included in a release, results: 5

    Sources:

  7. added
    status/ready
    and removed
    status/new
    on Nov 20, 2026
  8. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  9. added
    owner/service
    on Nov 22, 2026
  10. 26 remaining items

  11. added
    status/in-progress
    status/in-review
    and removed
    status/in-progress
    on Nov 24, 2026
  12. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    The draft pull request #7003 holds the final title and body. In mode on of roadmap.fix_checks.mode, the watch row marks it ready when its checks pass, and a fix-checks Job repairs a failed check whose name gives the class test, lint or types. In each other case the watch row stops the item: another failed check, a cancelled check, a conflict, a fix-checks Job that ended with no repair, or another mode.

    Spend: 193 model requests, 16928608 input tokens, 69223 output tokens.

  13. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-implement-devops-cli-4416-9f2078 ended: succeeded.
    Image digest: sha256:7492c2a9d21e71a7eaec25710fcae6dec3ba3e53f71ad091733233b1a0c9c981

    The last lines of its log:

    (no log: the Job has no pod)

    Failure class: ci_infra.
    Action taken: none.
    Action left: retry: run the item again.

    The Job left this item without a result. The item is Blocked. When a retry can fix the class of the stop, the Service starts a new Job in the next round. The limit is roadmap.implement.continuations_per_item, and the comment of that round says so. If no continuation is left, fix the cause. Then comment implement: retry. A new runner image also clears the stop. This holds only if a retry can fix the class of the stop. The limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item must also allow it.

  14. added
    status/blocked
    status/planned
    and removed
    owner/service
    status/in-review
    status/blocked
    on Nov 24, 2026
  15. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at job by the rule continue: the runner Job devops-cli-implement-devops-cli-4416-9f2078 ended without a result. The class ci_infra of the stop is one that a new attempt can fix. This is continuation 1 of 4 for this item. The item is Planned again. The Service takes it in the next round. The new Job takes the branch from origin, so it keeps the work that the run pushed there.

  16. removed
    status/planned
    on Nov 24, 2026
  17. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor
  18. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-24 17:08 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions