Show the Core Web Vitals evidence instead of asserting it - #5
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/fris a large Astro site whose French pages this pipeline built. Against the English original the markup is byte-identical:Nothing structural moved, so there is nothing for the browser to lay out differently. Ten seconds to check:
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.mdtells 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-150and 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.mjsafter 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
npm run checkand all 32 contract tests pass