Skip to content

fix(scoring): grade the score that is shown (extension 0.3.2) - #122

Merged
zordhalo merged 2 commits into
mainfrom
fix/grade-matches-shown-score
Nov 8, 2026
Merged

zordhalo merged 2 commits into
mainfrom
fix/grade-matches-shown-score

Conversation

@zordhalo

@zordhalo zordhalo commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Problem

aggregateScore returned overall: Math.round(overall) but grade: scoreToGrade(overall) on the unrounded value. Users saw a score and grade that disagree:

Site (extension 0.3.1, 2026-11-07) Shown Correct
amazon.com, adidas.com 60, grade F 60 is a D
microsoft.com, uber.com, ford.com 80, grade C 80 is a B

Fix

Round once in packages/scoring/src/engine.ts and grade the rounded number. The E-E-A-T scorer (eeat-rules.ts) already rounded before grading, so it is unchanged.

  • Regression test: weights giving 59.7 now return overall: 60, grade: 'D' (failed before the fix with expected 'F' to be 'D').
  • Changeset: @advance-labs/scoring patch.
  • Extension bumped to 0.3.2 (it is ignored by changesets, so bumped by hand).

Verified

  • pnpm turbo run test: 12 tasks, 280 tests across 8 packages, all pass. Typecheck clean.
  • Built 0.3.2 and re-ran it on amazon.com: now 60, grade D.

After merge

  • Upload 0.3.2 to the Chrome Web Store (manual). The Product Hunt gallery and demo video (launch Tue 11-17) show Amazon at 60 / D, so 0.3.2 needs to be live before then.
  • The hosted audit picks this up when aeo-platform bumps @advance-labs/scoring.

🤖 Generated with Claude Code

The engine rounded the overall score for display but graded the unrounded
value, so a raw 59.7 showed as 60 with grade F, and 79.6 showed as 80 with
grade C. Seen live in the extension on amazon.com and adidas.com (60, F) and
microsoft.com, uber.com and ford.com (80, C).

Round once and grade the rounded number. The E-E-A-T scorer already did this.
Adds a regression test (59.7 -> 60, D). Bumps the extension to 0.3.2.
@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
aeo-toolkit-docs Skipped Skipped Nov 8, 2026 2:38am UTC

Request Review

@zordhalo
zordhalo merged commit 6fedb90 into main Nov 8, 2026
3 checks passed
@zordhalo
zordhalo deleted the fix/grade-matches-shown-score branch November 8, 2026 02:39

This branch was previously deployed

1 inactive deployment
Preview — 01fe3ef1 Deployed Nov 8, 2026 by vercel[bot]
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