Skip to content

docs(reviewing): add ALGORITHM_VERSION bump guidelines - #681

Open
caugner wants to merge 1 commit into
mainfrom
algorithm-version-guidelines
Open

caugner wants to merge 1 commit into
mainfrom
algorithm-version-guidelines

Conversation

@caugner

@caugner caugner commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Description

Add guidelines to REVIEWING.md for when to increment ALGORITHM_VERSION.

  • Add a comment above the constant in src/constants.js pointing to the guidelines.
  • Remove the unused, stale ALGORITHM_VERSION = 4 export from src/types.js.
  • Update the example responses in README.md to version 6 with 12 tests.

Motivation

Make it easier to decide, when writing or reviewing a scoring change, whether it needs a version bump.

  • The version is stored with every scan and returned by the API, but nothing documents what it stands for.
  • It was bumped for the X-Frame-Options re-score (4 to 5) and for the COOP and COEP tests (5 to 6), but not for bug fixes that changed results for some sites (duplicate CORP headers, CSP policy splitting, HTTPS redirect chain).

Additional details

The guidelines write down the practice so far: the version identifies the scoring rubric, not the implementation. The decisions below are open for discussion in this review.

1. How to treat bug fixes that change scores for some sites

  • No bump (proposed): matches past practice, and keeps bumps rare and meaningful as rubric markers.
  • Bump if widespread: no bump for edge cases, but bump when a fix is expected to shift scores for a significant share of sites. Needs a judgment call per fix.
  • Always bump: any change that can alter any site's score bumps the version. Strictly reproducible, but the number increments often and stops marking rubric changes.

2. Where to record the guidelines

  • REVIEWING.md plus a pointer comment (proposed): reviewers are the ones who need to catch a missing bump.
  • Doc comment above the constant only: closest to the code, but has to stay short.

Related issues and pull requests

The version labels the scoring rubric a scan was graded under, so it
should change on deliberate scoring changes only, not on bug fixes or
copy changes.

Also remove the unused `ALGORITHM_VERSION` export from `src/types.js`,
and update the README example responses to version 6 with 12 tests.
@caugner
caugner marked this pull request as ready for review November 25, 2026 12:56
@caugner
caugner requested a review from a team as a code owner November 25, 2026 12:56
@caugner
caugner requested a review from LeoMcA November 25, 2026 12:56

This branch has not been deployed

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

1 participant