Support for creating new web-feature bugs#2900
Open
jgraham wants to merge 2 commits into
Open
Conversation
…nent This is useful for filing new bugs for incoming feature requests where we might have one or more spec URLs and want to make an initial guess as to where the bug should live. The initial lookup tree was built using Claude to map web-feature bugs with a known spec URL to the relevant component. This means it's likely to be reliable for future features that exist in existing specs but may be wrong for new specs which don't cleanly fit onto existing patterns. Ultimately it might make more sense to store this data somewhere outside of bugbot so that it's more easily kept up to date.
Initially create new bugs only for web-features which are: * Supported in both Chrome and Safari * Not supported in Firefox In practice there shouldn't be any of these, although there are a couple of false positives (features that are incorrectly marked as unsupported in Firefox) that make it a useful test case. The plan is to extend this to file bugs more cases in the future.
e49f5a3 to
007aff9
Compare
suhaibmujahid
approved these changes
Jun 14, 2026
suhaibmujahid
left a comment
Member
There was a problem hiding this comment.
Other than the CI failure, LGTM! Thank you!
There was a problem hiding this comment.
Pull request overview
This PR adds initial support to the web_platform_features rule for creating new Bugzilla bugs for web-features that appear supported in other browsers but not in Firefox, including mapping spec URLs to a plausible Bugzilla product/component.
Changes:
- Introduces a spec URL → (product, component) mapping system (
SpecMapper) backed by a YAML rules file. - Extends the web-platform-features rule to generate and (optionally) create new Bugzilla bugs, and to include these “create” actions in reporting output.
- Updates the HTML email template and adds tests for the spec mapping and creation path.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
bugbot/spec_mapping.py |
Adds the URL mapping implementation (rules + matcher). |
bugbot/spec_mapping.yml |
Provides initial host/path → Bugzilla product/component mapping rules. |
bugbot/rules/web_platform_features.py |
Adds new-bug creation structures + BigQuery-based create rule + reporting plumbing. |
templates/web_platform_features.html |
Renders both “update” and new “create” change types in the email output. |
tests/test_spec_mapping.py |
Adds tests for URL→product/component selection behavior. |
tests/rules/test_web_platform_features.py |
Adds/updates tests for the new create path and change_type wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+782
to
+787
| "id": bug_id, | ||
| "summary": bug.summary, | ||
| "url": bug.url, | ||
| "see_also": bug.component, | ||
| "keywords": bug.keywords, | ||
| "whiteboard": bug.whiteboard, |
Comment on lines
+766
to
+768
| logger.info( | ||
| f"A bug '{bug.summary}` would be created with:\n{bug.to_json()}", | ||
| ) |
Comment on lines
+68
to
71
| {% endfor %} | ||
| </p> | ||
| </p> | ||
| </li> |
Comment on lines
+101
to
+104
| <p> | ||
| Created bug: | ||
| <ul> | ||
| <li> |
Comment on lines
+115
to
+121
| {% if changes.url is not none %} | ||
| <li> | ||
| <p> | ||
| url: <code>{{ changes.url | e }}</code> | ||
| </p> | ||
| </li> | ||
| {% endif %} |
| "id": 0, | ||
| "summary": bug.summary, | ||
| "url": bug.url, | ||
| "see_also": bug.component, |
Comment on lines
+43
to
+49
| def __init__( | ||
| self, | ||
| component: ProductComponent | None = None, | ||
| paths: Sequence["Rule"] = (), | ||
| ): | ||
| self.component = component | ||
| self.order = next(_order) |
Comment on lines
+59
to
+63
| def __init__( | ||
| self, | ||
| component: ProductComponent | None, | ||
| paths: Sequence["PathRule"] = (), | ||
| ): |
Comment on lines
+80
to
+86
| def __init__( | ||
| self, | ||
| path: str | None, | ||
| component: ProductComponent, | ||
| ): | ||
| self.path = re.compile(path) if path is not None else None | ||
| super().__init__(component) |
Comment on lines
+102
to
+105
| class SpecMapper: | ||
| def __init__(self, rules: dict[str, HostRule], default: ProductComponent): | ||
| self.rules = rules | ||
| self.default = default |
ksy36
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial support for creating new bugs for web-features which we aren't currently tracking.
Initially this just looks for features which are marked as supported in Chrome and Safari but not in Firefox, since those seems like important feature gaps. Right now there are two of those which turn out to be a longstanding bug in the browser compatibility data.
Checklist
to-be-announcedtag added if this is worth announcing