Repository navigation
fix(test): take next 16.4.6 by fixing the hydration race it exposed - #1111
Merged
Merged
Conversation
The volume test was the only one in this file that interacted immediately
after goto(). #flow-volume is React-owned (interactive-story.tsx holds
volumePosition in useState), so a fill() landing before hydration sets the DOM
value and is then silently reverted when React mounts and re-renders from
DEFAULT_VOLUME_POSITION — the input reads back 9.95037190209989 and the
assertion sees "100,000 records per run".
So it was always racing, and won on timing until next 16.4.6 shifted hydration
later. Every other test in the file clicks something and asserts a state change
first, which incidentally proves hydration; this one did not.
Gated on "Inspect a record", which is disabled={!ready} where ready is set in
story-flow's mount effect — a pure hydration signal. Deliberately not
data-still, which also depends on reduced motion.
Reproduced and verified in the pinned Linux image, since macOS webkit passes
what Linux webkit fails and the spec passes when run ALONE even there — the
shard parallelism is part of the repro:
before --project=mobile-safari --shard=1/2 --workers=2 -> 1 failed, 95 passed
after same -> 96 passed
11 tasks done
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.
Closes #1105
next16.4.6 was held back by #1104 because carrying it failedplaywright functional tieron webkit. The cause was a racing test, not aNext regression, so the bump lands here with the race fixed.
What was actually wrong
#flow-volumeis a controlled input —interactive-story.tsxholdsvolumePositioninuseState(DEFAULT_VOLUME_POSITION). Afill()that landsbefore hydration sets the DOM value, and React then mounts, re-renders from its
own default, and silently reverts it. That is why the failure read
value="9.95037190209989"/"100,000 records per run": not arithmetic, not aflake — the default.
The volume test was the only test in this file that interacted immediately
after
goto(). Every other one clicks something and asserts a state changefirst, which incidentally proves hydration. So it had always been racing and
simply won on timing; 16.4.6 shifted hydration late enough to lose
consistently under load.
Gated on "Inspect a record", which is
disabled={!ready}wherereadyisset in
story-flow's mount effect — a pure hydration signal. Deliberately notdata-still, which also depends on reduced motion and would make the gateinert in the reduced-motion case.
How it was reproduced, which took three attempts
This is the part worth keeping, because two plausible loops prove nothing here:
make frontend(macOS)--shard=1/2 --workers=2So both the OS and the shard parallelism are part of the repro. The harness
copies the project into
mcr.microsoft.com/playwright:v1.63.0-jammyand runsCI's exact args, the same approach
scripts/frontend-dev/update-baselines.shtakes for visual baselines.
After the fix, same command, same image, same
next16.4.6:pnpm run checkalso passes locally: lint, prettier, tsc, all four BFF gates,922 unit tests.
A product observation, deliberately not acted on
The underlying behaviour is real and not test-only: a visitor who grabs that
slider during hydration has their input reverted. It is inherent to a
controlled input plus SSR, it is bounded by hydration time on a static
marketing page, and chasing it means changing the control to be
uncontrolled-until-hydrated — a real change to hand-rolled marketing code with
its own risk. Noted rather than smuggled into a dependency bump.
Post-merge ledger
Closed by: agent · session
f14bf995-5565-41eb-9658-d3746dc3188eonMac· 2026-11-17T07:45:00Zmainis green with this change on it — merge SHAc06b516fd3b9bf86835331bf4b42ba5726b6af3c. On that SHA:rust,frontend,infra,devcontainerandimagesallcompleted/success.imagesbuilt — thec06b516frun builter-weband skippeder-api, correct for afrontend/change.deployconverged — run44032634367,DEPLOY_SHAread from insidethe run is
c06b516fd3b9bf86835331bf4b42ba5726b6af3c. The run listlabelled it with the later
mainSHA9f905b1f, so the label alone wouldhave attributed this deploy to the wrong change. Proved by process-emitted
lines:
deployment "web-api-blue" successfully rolled out,er-api-preview /readyz -> 200,er-web-preview /api/healthz -> 200,ALB reports 2 expected pod targets healthy,public readiness stayed healthy for three minutes,traffic is verified on blue; old targets drained,retired green.deploygreen (above);kindgreen (dispatch44025072671,ALL PHASES PASS).driftis red, knowingly and for areason that is not this change: feat(obs): assert the alarm path terminates at a confirmed subscriber #1110 added an
alert pathjob thatcorrectly reports the unconfirmed SNS subscription (The er-alerts SNS email subscription has never been confirmed — 19 armed alarms reach nobody #1107). All four
Terraform drift legs are green.
CLOSEDthrough GitHub's closingreference.
in full rather than being held back, which was the point.
next-1646-webkit-range-inputrewritten: the cause was a hydration racein the test, not a Next regression, and the reproduction needs both
Linux webkit and the shard parallelism.
Specific to this change
verified per job rather than from the rollup:
playwright e2e (webkit 1/2),(webkit 2/2),(chromium 1/2),(chromium 2/2)allsuccess, plus theplaywright functional tierrollup. A rollup thatreports success with skipped shards would have proved nothing, and this
pull request's whole claim is about a shard-only failure.
nextis now at 16.4.6 with noignore:block anywhere in.github/dependabot.yml, so future releaseskeep being offered. Holding it back was explicitly rejected as the
resolution.