Skip to content

fix(roadmap): onboard counts a hook with every event as wrong #6431

Not planned

Description

@dan-petty

Problem

devops roadmap onboard -R dan-petty/devtools --plan reports row 7 as wrong (url, events), but the hook of that repository works: a ping of hook 714050412 got 200, and the Service log shows "Webhook delivery handled" for dan-petty/devtools on 2026-11-19. The hook sends the event list ["*"] (GitHub: every event). src/devops_cli/roadmap/onboard.py:307 tests events <= set(hook.events), so {"issues"} <= {"*"} is false, and the row calls a hook that sends every event wrong.

Expected

  • A hook with the events ["*"] counts as a hook that sends each event of CONST_ROADMAP_WEBHOOK_EVENTS (test first: the row is present for an active JSON hook with the Service URL and ["*"]).
  • The step text of the row still names the events that the Service needs.

Alternatives check of 2026-11-19: none.
Tool: none found.
Reason: Searches found only GitHub's webhook documentation and generic Python webhook frameworks that receive or verify payloads; none provides a predicate that a hook's event list covers the required events, with * as every event, so the fix belongs in the project's own code.

Lacks:

  • No library checks a hook's event list against required events
  • No library treats * as every event in a subset comparison
  • Generic frameworks receive webhooks, they do not inspect stored hook settings

Proposed design

Problem statement

Change the webhook row so that a hook with the event list ["*"] counts as present. The onboard command now reports that working hook as wrong (url, events), because the subset test at src/devops_cli/roadmap/onboard.py:307 does not know the wildcard. The step text keeps the names of the events that the Service needs.

Acceptance criteria

Requirement: Wildcard hook is present

The webhook row SHALL report present for an active JSON hook with the Service webhook URL and an event list that holds *.

Scenario: Wildcard hook matches the Service

  • WHEN the fake GitHub API returns one active hook with content type json, the Service webhook URL and events ["*"], and the test runs devops roadmap onboard --repo example/roadmap --plan
  • THEN the test in tests/roadmap/test_roadmap_onboard.py asserts exit code 0 and the line 7. The repository webhook posts the roadmap events to the Service: present

Requirement: Hook without the wildcard needs each event

The webhook row SHALL report wrong and name events when an active JSON hook has the Service URL, no *, and not each event of CONST_ROADMAP_WEBHOOK_EVENTS.

Scenario: Hook omits a required event

  • WHEN the hook has the Service URL and the events ["pull_request", "release"], while CONST_ROADMAP_WEBHOOK_EVENTS is frozenset({"issues"})
  • THEN the test in tests/roadmap/test_roadmap_onboard.py asserts that row 7 is wrong and that the output holds Wrong: events.

Requirement: Wildcard does not excuse the URL

The webhook row SHALL report wrong and name url when an active JSON hook with * in its events has a URL other than the Service webhook URL.

Scenario: Wildcard hook with another URL

  • WHEN the hook is active, its content type is json, its events are ["*"] and its URL is https://other.example.com/hook
  • THEN the test in tests/roadmap/test_roadmap_onboard.py asserts that row 7 is wrong and that the output holds url

Requirement: Step text names the required events

The webhook step text SHALL name each event of CONST_ROADMAP_WEBHOOK_EVENTS.

Scenario: Missing hook step text

  • WHEN the fake GitHub API returns no hook, so row 7 is missing
  • THEN the test in tests/roadmap/test_roadmap_onboard.py asserts that the step text holds each event name of CONST_ROADMAP_WEBHOOK_EVENTS

Existing Tool Considered

The alternatives check of 2026-11-19 in the issue body gives the verdict none and names no tool. The check found only the GitHub webhook documentation and generic Python webhook frameworks. The issue body lists what such a tool lacks: no library checks a hook's event list against required events, none treats * as every event, and the frameworks receive webhooks but do not read stored hook settings. The change keeps the project's own predicate at src/devops_cli/roadmap/onboard.py:307. Cost to build, keep and fix that code: one condition (about 40 tokens), one regression test (about 400 tokens) and about 10 minutes of elapsed time. It adds no dependency to update.

Key questions

  • Which events does the Service need now?: CONST_ROADMAP_WEBHOOK_EVENTS is frozenset({"issues"}), and the document test asserts that value. [sources: src/devops_cli/config/constants.py:3910, tests/roadmap/test_roadmap_onboard.py:540]
  • How does the webhook row treat a hook that sends ["*"]?: Treat * as covering each event of CONST_ROADMAP_WEBHOOK_EVENTS. The condition at src/devops_cli/roadmap/onboard.py:307 adds "*" in hook.events as an alternative to the subset test. (best practice) [sources: src/devops_cli/roadmap/onboard.py:307]
    • Rejected: Literal subset check. It rejects * and reports a working hook as wrong (url, events).
    • Chosen: Accept * as every event. GitHub defines * as every event, and the predicate stays one condition.
    • Rejected: Expand * into the required events before the comparison. It adds a normalization step for the same result and hides the event list that GitHub stores.
  • Does the step text change when the hook sends *?: No. The step text keeps each event of CONST_ROADMAP_WEBHOOK_EVENTS, because a person reads it to set up the hook and GitHub shows each event name. (best practice) [sources: docs/CLUSTER.md, tests/roadmap/test_roadmap_onboard.py, openspec/specs/roadmap-onboard/spec.md]
    • Chosen: Keep the event names in the step text. The document and the row must name the same events, and a test asserts it.
    • Rejected: Replace the event names with *. It hides which events the Service takes and breaks the document test.
  • Where do the fix and its regression test go?: Change the predicate of the webhook row in src/devops_cli/roadmap/onboard.py and add the regression test in tests/roadmap/test_roadmap_onboard.py. (best practice) [sources: src/devops_cli/roadmap/onboard.py:307, tests/roadmap/test_roadmap_onboard.py]
    • Chosen: Change the predicate in place. The defect is one condition of the function that decides the row.
    • Rejected: Add a normalization helper. It adds code and tests for no behavior that the predicate needs.
    • Rejected: Expand * in the caller. It moves the rule away from the field comparison and makes a second code path.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    effort/low
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  5. 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: no check. A person decides what the new result means for the item.

    Searches (2)

    Searches run:

    • GitHub webhook events wildcard "*" match all events, results: 5
    • python library validate GitHub webhook events list subset, results: 5

    Sources:

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

    @devops-cli-service
    Contributor

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

  8. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    More evidence, 2026-11-21: the new service repository dan-petty/infra has a hook with "events": ["*"]. A ping to it returned 200 OK from the Service, and the hook of dan-petty/danielpetty.com (also ["*"]) has last response 200. Row 7 of devops roadmap onboard still reports wrong (Wrong: url, events.) for both. The events part is this item (onboard.py:307 and :328, {"issues"} <= {"*"} is false). The url part came from a placeholder service.webhook_url in the local config, not from the code.

  9. added
    owner/agent
    on Nov 23, 2026
  10. dan-petty commented on Nov 23, 2026

    @dan-petty
    OwnerAuthor

    Newer code in #6806 (#6773, commit 0197537) replaces devops roadmap onboard with devops repos onboard. src/devops_cli/roadmap/onboard.py and its tests are deleted. The new implementation in src/devops_cli/github/onboard/service_rows.py already accepts wildcard hooks (_ALL_EVENTS in hook.events or set(CONST_ROADMAP_WEBHOOK_EVENTS) <= set(hook.events)), and openspec/specs/repos-onboard/spec.md row 12 verifies this behavior. Returning item because newer code already resolved it.

  11. added
    status/new
    and removed
    status/ready
    on Nov 23, 2026
  12. dan-petty commented on Nov 24, 2026

    @dan-petty
    OwnerAuthor

    Newer code and issues replaced this command. Commit 0197537 (#6806, closing #6773) replaced devops roadmap onboard with devops repos onboard. In src/devops_cli/github/onboard/service_rows.py, function _sends_events at line 180 accepts _ALL_EVENTS ("*") in hook.events. The tests tests/github/onboard/test_onboard_rows.py and tests/commands/test_repos_onboard.py verify that a hook with "events": ["*"] evaluates as present.

  13. removed
    status/new
    owner/agent
    on Nov 24, 2026
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/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions