Skip to content

Conversation

@foolip
Copy link
Collaborator

@foolip foolip commented Jun 12, 2025

web-features IDs are used by other projects, and there's no linting in
place to guarantee that only valid IDs are used. Invalid IDs can appear
becaues of typos, changes to web-features, or because an ID is used
speculatively with the expectation it will be added to web-features.

By reporting on the use of unknown IDs, we can catch these problems. If
it becomes too common we might consider some form of linting in the
monitored projects, but for now this is a lightweight approach that
allows for maximum flexibility early in the lifecycle of a feature.

@github-actions github-actions bot added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Jun 12, 2025
@foolip foolip force-pushed the audit-consumers branch from 6c05fe1 to c239ef4 Compare June 12, 2025 19:32
@foolip
Copy link
Collaborator Author

foolip commented Jun 12, 2025

Can't test this now because NPM is having issues: https://status.npmjs.org/

@foolip foolip force-pushed the audit-consumers branch 2 times, most recently from ef1d1b6 to 147d33f Compare June 13, 2025 10:05
@foolip
Copy link
Collaborator Author

foolip commented Jun 13, 2025

It works now, with this output:

Chromestatus entries

Source: chromestatus.com

Chromium use counters

  • ReferenceTarget (draft)
  • ScopedViewTransitions (draft)
  • WasmBranchHinting (draft)
  • ExplicitResourceManagement (draft)
  • WebAppManifestUpdate (draft)

Source: webdx_feature.mojom

web-platform-tests

  • canvas-text-baselines
  • revert
  • viewport
  • viewport-segments

Source: WEB_FEATURES_MANIFEST.json

@foolip foolip requested a review from ddbeck June 13, 2025 20:54
return {
heading: "web-platform-tests",
items,
trailer: `Source: [WEB_FEATURES_MANIFEST.json](${asset.browser_download_url})`,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link isn't especially useful, but linking directly to the WEB_FEATURES.yml file that has the reference would require fetching and parsing all of them, which I don't want to do.

const text = await chromiumSourceFile(
"tools/metrics/histograms/metadata/blink/enums.xml",
);
const $ = cheerio.load(text);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but I don't love it. It doesn't actually parse as XML it seems, the resulting tree has all of the <int> elements nested in another and it only works because I made the next line work regardless of tree shape.

Parsing webdx_feature.mojom directly is an option, but any difference in parsing from the Python code that parses it in Chromium would be a risk.

foolip added a commit to foolip/wpt that referenced this pull request Jun 13, 2025
This feature was removed in web-platform-dx/web-features#1500.

Discovered by auditing all features in WPT and elsewhere:
web-platform-dx/web-features#3051
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to give this a try. I'm not quite sure what the resolution will be for all items, so I expect I'll be @-ing you for the first few attempts. 😄

Please resolve the conflicts and my comments, and merge at your leisure.

// deduplicated by ID.
async function* chromeStatusFeatures() {
const num = 500;
for (let start = 0 /* nothing here */; ; start += num) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (let start = 0 /* nothing here */; ; start += num) {
for (let start = 0; /* nothing here */ ; start += num) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that Prettier required this style. I'll remove the comment, the result is OK enough to not try to work around.

@foolip foolip force-pushed the audit-consumers branch 3 times, most recently from 475846c to 48cb77b Compare June 30, 2025 13:41
web-features IDs are used by other projects, and there's no linting in
place to guarantee that only valid IDs are used. Invalid IDs can appear
becaues of typos, changes to web-features, or because an ID is used
speculatively with the expectation it will be added to web-features.

By reporting on the use of unknown IDs, we can catch these problems. If
it becomes too common we might consider some form of linting in the
monitored projects, but for now this is a lightweight approach that
allows for maximum flexibility early in the lifecycle of a feature.
@foolip foolip force-pushed the audit-consumers branch from 48cb77b to 1306828 Compare June 30, 2025 14:02
@foolip foolip merged commit 5a9922d into main Jun 30, 2025
3 checks passed
@foolip foolip deleted the audit-consumers branch June 30, 2025 14:03
@foolip
Copy link
Collaborator Author

foolip commented Jun 30, 2025

https://github.com/web-platform-dx/web-features/actions/runs/15975169650 is the first manual run of this. The output is still the same as in #3051 (comment).

Next step would be to automatically file or update an issue once in a while.

@foolip
Copy link
Collaborator Author

foolip commented Jun 30, 2025

I used the output to burn down a few problems, and now this is the output:

Chromestatus entries

Nothing to see here!
Source: chromestatus.com

Chromium use counters

  • ReferenceTarget (draft)
  • ScopedViewTransitions (draft)
  • WasmBranchHinting (draft)
  • ExplicitResourceManagement (draft)
  • WebAppManifestUpdate (draft)
    Source: webdx_feature.mojom

web-platform-tests

foolip added a commit to web-platform-tests/wpt that referenced this pull request Jul 1, 2025
This feature was removed in web-platform-dx/web-features#1500.

Discovered by auditing all features in WPT and elsewhere:
web-platform-dx/web-features#3051
lando-prod-mozilla bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jul 7, 2025
…feature, a=testonly

Automatic update from web-platform-tests
Remove web-features mapping for removed feature (#53133)

This feature was removed in web-platform-dx/web-features#1500.

Discovered by auditing all features in WPT and elsewhere:
web-platform-dx/web-features#3051
--

wpt-commits: a24bf87a2cddf65fbe96ee41d5a9b06edbf16d09
wpt-pr: 53133
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 8, 2025
…feature, a=testonly

Automatic update from web-platform-tests
Remove web-features mapping for removed feature (#53133)

This feature was removed in web-platform-dx/web-features#1500.

Discovered by auditing all features in WPT and elsewhere:
web-platform-dx/web-features#3051
--

wpt-commits: a24bf87a2cddf65fbe96ee41d5a9b06edbf16d09
wpt-pr: 53133
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jul 9, 2025
…feature, a=testonly

Automatic update from web-platform-tests
Remove web-features mapping for removed feature (#53133)

This feature was removed in web-platform-dx/web-features#1500.

Discovered by auditing all features in WPT and elsewhere:
web-platform-dx/web-features#3051
--

wpt-commits: a24bf87a2cddf65fbe96ee41d5a9b06edbf16d09
wpt-pr: 53133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants