Skip to content

fix(roadmap): onboard counts a wildcard hook as missing events #6662

Not planned

Description

@dan-petty

Problem

Checked at main (0fb04e1).

  • devops roadmap onboard row 7 accepts a hook only when events <= set(hook.events) (src/devops_cli/roadmap/onboard.py:307, and the same test at :328 names the field events as wrong). events is CONST_ROADMAP_WEBHOOK_EVENTS, today {"issues"}.
  • GitHub stores a hook that sends all events as "events": ["*"]. The test {"issues"} <= {"*"} is false, so the row reports wrong (Wrong: ... events.) for such a hook.
  • On 2026-11-21 the hooks of two service repositories have ["*"] (checked with devops gh api repos/<owner>/<repo>/hooks --jq '.[0].events'). Both deliver: a ping to the new repository's hook returned 200 OK from the Service, and the other hook's last response is 200. The row still says wrong, so it reports a false defect and hides a real one.
  • The docstring at onboard.py:278 already says that a hook can send more events than the Service takes (fix(cloudflare): find the edge rule that answers 403 for the webhook route #5035).

Proposed remedy

  • Treat "*" in hook.events as a match for every event, in both the match test and _wrong_webhook_fields.

Acceptance criteria

  • A test with a hook whose events are ["*"] (active, json, the configured URL) gives row 7 present.
  • A test with a hook whose events are ["push"] still gives wrong with the field events.

Dependencies

None.

Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches found no open tool or library for treating GitHub's wildcard hook events as a match; the need is a two-line fix in the project's own onboard row 7, and the reply says the item duplicates #6431.

Lacks:

  • No library for GitHub hook event matching
  • Wildcard "*" treated as a subset of required events
  • Wrong field named by _wrong_webhook_fields

Proposed design

Problem statement

devops roadmap onboard row 7 reports wrong (Wrong: ... events.) for a GitHub hook whose events are ["*"]. GitHub stores that value for a hook that sends all events. The subset test events <= set(hook.events) is false for it, so the row reports a false defect and hides a real one. The change makes the wildcard count as a match in the row's check and in _wrong_webhook_fields.

Acceptance criteria

Requirement: A wildcard hook is present

Row 7 SHALL report present when one active hook has service.webhook_url, the content type json and the events ["*"].

Scenario: Wildcard hook events

  • WHEN the hooks list holds one active hook with service.webhook_url, the content type json and the events ["*"]
  • THEN uv run pytest tests/roadmap/test_roadmap_onboard.py passes and row 7 shows present

Requirement: A hook that misses an event is wrong

Row 7 MUST report wrong and name events when an active hook with service.webhook_url sends ["push"] and does not send each event of CONST_ROADMAP_WEBHOOK_EVENTS.

Scenario: Non-matching events

  • WHEN the hooks list holds one active hook with service.webhook_url, the content type json and the events ["push"]
  • THEN uv run pytest tests/roadmap/test_roadmap_onboard.py passes and row 7 shows wrong with the field events

Requirement: The wildcard keeps the other field checks

Row 7 SHALL report wrong when a hook with the events ["*"] has a URL other than service.webhook_url.

Scenario: Wildcard hook at another URL

  • WHEN the hooks list holds one active hook with the events ["*"] and a URL other than service.webhook_url
  • THEN uv run pytest tests/roadmap/test_roadmap_onboard.py passes and row 7 shows wrong and names no events field

Existing Tool Considered

The alternatives check of 2026-11-21 in the issue body gives the verdict none and names no tool: no open, maintained library matches GitHub hook events against a required set. The issue body holds what it lacks. The change keeps the project's own code in src/devops_cli/roadmap/onboard.py: one helper and two tests. Written cost: about 20k tokens to build, about 2k tokens a year to keep, and under 1 hour of elapsed time.

Key questions

  • How does the row treat a hook whose events are ["*"]?: Add one helper in src/devops_cli/roadmap/onboard.py that returns true when "*" is in hook.events or when the required events are a subset of hook.events. Use it at line 307 and in _wrong_webhook_fields at line 319. (best practice) [sources: src/devops_cli/roadmap/onboard.py:307, src/devops_cli/roadmap/onboard.py:319, src/devops_cli/roadmap/onboard.py:278, docs/roadmap/onboard.md:15, openspec/specs/roadmap-onboard/spec.md:118]
    • Chosen: One helper used by the match test and by _wrong_webhook_fields. The row and its wrong-field list must agree, or one hook is present and wrong at once. One function keeps one rule.
    • Rejected: Test "*" in hook.events at each of the two places. Two copies of one rule drift apart, and the repository keeps one copy of a rule.
    • Rejected: Replace hook.events with CONST_ROADMAP_WEBHOOK_EVENTS when it holds "*". It hides the events that the hook really sends, and the row prints them for a person.
  • Does the change update the spec and the document?: Yes. The change's spec delta amends the roadmap-onboard requirement A matching hook is present, and docs/roadmap/onboard.md line 15 states that the events ["*"] match each event of CONST_ROADMAP_WEBHOOK_EVENTS. (best practice) [sources: docs/roadmap/onboard.md:15, openspec/specs/roadmap-onboard/spec.md:118]
    • Chosen: Update the spec delta and the document. Both state the match rule, and each would name a rule that the code no longer follows.
    • Rejected: Change the code only. The spec and the document would stay false, and the next reader would revert the fix.
  • Is this item a duplicate of fix(roadmap): onboard counts a hook with every event as wrong #6431?: The reply of 2026-11-21 says yes and says that a person closes this item. Recommendation: a person confirms that fix(roadmap): onboard counts a hook with every event as wrong #6431 holds the same two acceptance criteria at the same lines and closes this item. Keep this item only when fix(roadmap): onboard counts a hook with every event as wrong #6431 does not deliver the wildcard match. (a person decides)

Open questions

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    on Nov 21, 2026
  2. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
    • Possible duplicate: fix(roadmap): onboard counts a hook with every event as wrong #6431, which may ask for the same change. The model names Treat the wildcard "*" in hook.events as matching all required events in the onboard webhook row 7 check as the change that both ask for. Both items fix the same logic error at onboard.py:307 where events <= set(hook.events) fails for a wildcard hook, and both require the same acceptance test for ["*"] giving present. A person closes one of the two if that is so.
  3. added
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 21, 2026
  4. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    Duplicate of #6431, which asks for the same change at the same lines. I filed this one in error: intake named #6431 as a possible duplicate. The evidence of this item is now a comment on #6431. A person closes this issue.

  5. devops-cli-service commented on Nov 21, 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 (3)

    Searches run:

    • GitHub webhook events wildcard "*" means all events API, results: 5
    • python library match GitHub webhook events wildcard subscription check, results: 5
    • docs.github.com create a repository webhook "events" array "*" wildcard, results: 5

    Sources:

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

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  7. 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.

  8. removed
    status/new
    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