Skip to content

Show the Core Web Vitals evidence instead of asserting it - #5

Merged
alexburan merged 1 commit into
mainfrom
feat/cwv-evidence
Aug 25, 2026
Merged

Show the Core Web Vitals evidence instead of asserting it#5
alexburan merged 1 commit into
mainfrom
feat/cwv-evidence

Conversation

@alexburan

Copy link
Copy Markdown
Contributor

Why

The whole pitch is that locale pages keep the source language's performance. Until now that was a claim with nothing behind it.

The evidence

doctranslator.com/fr is a large Astro site whose French pages this pipeline built. Against the English original the markup is byte-identical:

2,743 tags, in identical sequence
2,031 class attributes, all matching
+0.74% page weight — only because French is longer

Nothing structural moved, so there is nothing for the browser to lay out differently. Ten seconds to check:

curl -s https://doctranslator.com/   | grep -o 'class="[^"]*"' > en.txt
curl -s https://doctranslator.com/fr | grep -o 'class="[^"]*"' > fr.txt
diff en.txt fr.txt && echo "markup identical — only the text changed"

PageSpeed performance, measured 2026-08-25: desktop 100 vs 100, mobile 98 vs 98. Accessibility, best practices and SEO were 100 on every run of both pages, both strategies.

Published as medians, with the spread stated

Five consecutive runs of the same English mobile page returned 98, 98, 88, 98, 98, LCP swinging 1.8s → 3.2s. That is network and CDN variance, not page quality.

A reader who measures once and sees 91 should have been told why in advance, so the caveat is on the page rather than buried. SKILL.md tells the agent to quote the markup identity first, because that is the part that reproduces.

New failure mode: locale pages built from a stale source build

Found live while gathering the above, and worth the entry in references/failure-modes.md.

The two DocTranslator pages disagree about their inlined critical CSS despite identical markup — because the source was rebuilt three hours after the locale pages were generated, and critical-CSS extraction is not stable across builds. The later build gained .bg-sky-500, .bg-slate-100, .object-cover, .scale-150 and lost .aspect-video; neither build's CSS correctly matched its own markup.

That is the same instability that makes per-locale re-rendering a bad idea, surfacing somewhere else. Fix: re-run build-locales.mjs after any rebuild that changes markup — nearly free, since the memory is keyed by source text and nothing gets re-translated.

How to spot it: substitution never touches <style> contents, so if those differ between a page and its locale twin, the twin came from a different snapshot.

Verification

  • Every figure re-verified against the live pages immediately before writing it down
  • npm run check and all 32 contract tests pass

The whole pitch is that locale pages keep the source language's performance,
and until now that has been a claim with nothing behind it.

doctranslator.com/fr is a large Astro site whose French pages this pipeline
built. Against the English original the markup is byte-identical: 2,743 tags
in identical sequence, all 2,031 class attributes matching, page weight up
0.74% because French is longer. Nothing structural moved, so there is nothing
for the browser to lay out differently. README and SKILL.md now carry those
numbers plus the two-line diff anyone can run to check them.

Scores, measured 2026-08-25: desktop 100 vs 100, mobile 98 vs 98,
accessibility/best-practices/SEO 100 on every run of both pages.

Published as medians, with the spread stated. Five consecutive runs of the
same English mobile page returned 98, 98, 88, 98, 98, LCP swinging 1.8s to
3.2s — network and CDN variance, not page quality. A reader who measures once
and sees 91 should have been told why in advance, and SKILL.md tells the agent
to quote the markup identity first because that is the part that reproduces.

New failure mode: locale pages built from a stale source build
Found live while gathering the above. The two DocTranslator pages disagree
about their inlined critical CSS despite identical markup, because the source
was rebuilt three hours after the locale pages were generated and
critical-CSS extraction is not stable across builds — the later build gained
four Tailwind utilities and lost one, and neither build's CSS correctly
matched its own markup.

That is the same instability that makes per-locale re-rendering a bad idea,
surfacing somewhere else. The fix is to re-run build-locales.mjs after any
rebuild that changes markup, which is nearly free because the memory is keyed
by source text and nothing gets re-translated. Documented with how to spot it:
substitution never touches <style> contents, so if those differ between a page
and its locale twin, the twin came from a different snapshot.

Every figure re-verified against the live pages immediately before writing it
down. npm run check and all 32 contract tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alexburan
alexburan merged commit e5b0886 into main Aug 25, 2026
1 check passed
@alexburan
alexburan deleted the feat/cwv-evidence branch August 25, 2026 18:33
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