Skip to content

feat(audit): performance mode always measures fonts (OSS-127) - #291

Merged
arzafran merged 1 commit into
mainfrom
franco/oss-127-audit-performance-always-checks-fonts-for-subsetting-and
Nov 4, 2026
Merged

arzafran merged 1 commit into
mainfrom
franco/oss-127-audit-performance-always-checks-fonts-for-subsetting-and

Conversation

@arzafran

@arzafran arzafran commented Nov 4, 2026

Copy link
Copy Markdown
Member

What this does

Fonts get checked at every performance audit instead of only when someone remembers to paste the subsetting prompt at project handoff. /audit performance now measures each self-hosted font and what the site actually uses. A font carrying characters, weights or features the site never uses, or one that's preloaded where nothing above the fold needs it, becomes a measured finding, and the subsetting procedure from #273 is the fix.

Linear: OSS-127

Summary

  • skills/audit/SKILL.md, Performance mode:
    • Phase 0: a web app that serves its own font files always gets a font surface in the measurement plan.
    • Phase 1 step 4 (new): per font file, bytes, glyphs, axes, OpenType features and hinting; per key route, font bytes and preloads. Compared against what the site uses, per step 2 of "Subsetting fonts without changing rendering" in docs/performance-reference.md. The finding's direction is that procedure, so pixel diffs and a person's sign-off on any visible change come with it. A repo with a subset script gets its --check run, and a missing CI step for it is a LOW finding.
  • src/lib/lint-skills.ts: the audit skill's line limit drops from 696 to 694, because the change made the file shorter.
  • evals/audit-perf-fonts: a Next app that can't be built, with a preloaded variable font, weights 400 and 650, ss01, accented characters and hyphens: auto. The audit has to plan the font measurements, tie them to what the site uses, and report no font numbers it couldn't measure.

Test Plan

  • bun run typecheck exits 0
  • bun run test: 3144 pass, 0 fail
  • bun run lint:skills: 0 errors
  • All 5 audit eval cases pass, including the new one ($1.24)
  • Next real perf audit on a client site reports its fonts

@arzafran
arzafran merged commit 3937ca2 into main Nov 4, 2026
11 checks passed
@arzafran
arzafran deleted the franco/oss-127-audit-performance-always-checks-fonts-for-subsetting-and branch November 4, 2026 17:41
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