Skip to content

Score every date and write the feature-level interop CSVs - #296

Merged
yulunwu2 merged 1 commit into
mainfrom
feature-interop-cli
Sep 9, 2026
Merged

Score every date and write the feature-level interop CSVs#296
yulunwu2 merged 1 commit into
mainfrom
feature-interop-cli

Conversation

@yulunwu2

@yulunwu2 yulunwu2 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Each date is scored against the manifest from that date's own wpt revision, so
a run is never measured against a catalogue it did not run from. A build writes
one aggregate row per date plus that date's per-feature breakdown, rescoring
every date as browser-specific-failures.js does.

@yulunwu2
yulunwu2 force-pushed the feature-interop-cli branch from 9533159 to 9d9eb5c Compare September 3, 2026 23:50
@yulunwu2
yulunwu2 force-pushed the feature-interop-cli branch from 9d9eb5c to f040675 Compare September 4, 2026 00:02
@yulunwu2
yulunwu2 force-pushed the feature-interop-cli branch 3 times, most recently from 0f5cc78 to 338c5f1 Compare September 4, 2026 04:20
@yulunwu2
yulunwu2 requested a review from jcscottiii September 4, 2026 04:26

@DanielRyanSmith DanielRyanSmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A published row
is not rescored, so --force is the only way to correct one.

This from the PR description is incorrect, right? The scores are regenerated after every script run, and also there's no --force flag here

Comment thread lib/interop-csv.js Outdated
Comment on lines +44 to +45
csvRecord.push(csvField(scored.versions[i]));
csvRecord.push(formatScore(scored.scores.get(products[i])));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

browser scores are looked up by name (scored.scores.get(products[i])), but versions are indexed by array position (scored.versions[i]). I don't know if wpt.fyi guarantees that runs is sorted alphabetically by browser name, so version strings could end up under the wrong browser columns.

Maybe key versions by browser name rather than array index:

    const versions = new Map(runs.map(run => [run.browser_name, run.browser_version]));    

and look it up with scored.versions.get(products[i])

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, thank you for the review!

Comment thread lib/interop-csv.js Outdated
Comment on lines +5 to +6
* date, appended to the scores already published on gh-pages, and a
* for one date.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* date, appended to the scores already published on gh-pages, and a
* for one date.
* date, appended to the scores already published on gh-pages, and a
* feature breakdown for one date.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for catching this!

Base automatically changed from feature-interop-lib to main September 8, 2026 17:43
@yulunwu2
yulunwu2 force-pushed the feature-interop-cli branch from 338c5f1 to e269f99 Compare September 8, 2026 17:43
Each date is scored against the manifest from that date's own wpt revision, so
a run is never measured against a catalogue it did not run from. A build writes
one aggregate row per date plus that date's per-feature breakdown, rescoring
every date as browser-specific-failures.js does.
@yulunwu2
yulunwu2 merged commit f36b0b4 into main Sep 9, 2026
1 check passed
@yulunwu2
yulunwu2 deleted the feature-interop-cli branch September 9, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants