Pin SDK to the 10.0.3xx feature band - #3720
Merged
Merged
Conversation
global.json floated to any 10.x SDK, so CI picked up 10.0.400 as soon as it
was released on 2026-08-11. Every SupportUi.EndToEndTests run since has
failed.
The Razor compiler in 10.0.400 no longer emits UrlResolutionTagHelper for
elements whose only matching tag helper is that one, so
`<link href="~/app.css">` and `<script src="~/htmx.min.js">` in the SupportUi
layout compile to `WriteLiteral("~/app.css")` instead of a resolved,
fingerprinted URL. The browser resolves those relative to the current page,
so /routes/add/~/Components/accessible-autocomplete.min.js 404s,
accessibleAutocomplete is undefined and the <select> is never enhanced into
input#{id} - failing every E2E test that touches an autocomplete field. Same
class of bug as dotnet/razor#8884.
10.0.303 is on the same 10.0.11 runtime as 10.0.400, so pinning the feature
band costs nothing but the SDK band.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gunndabad
marked this pull request as ready for review
August 13, 2026 08:56
MrKevJoy
approved these changes
Aug 13, 2026
4 tasks
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.
Context
Every
Tests (SupportUi.EndToEndTests)run on CI has failed since 2026-08-11 20:40. It looks like flakiness — 13 of 142 tests fail, the rest pass — but the split is deterministic: the failures are exactly the tests that touch an accessible-autocomplete field (all 6 inAddRouteToProfessionalStatusTests, the 5 autocomplete ones inEditRouteToProfessionalStatusTests, plusAddMqandEditMqProvider).global.jsonpinned"version": "10", which floats to any 10.x SDK, so CI started using SDK 10.0.400 the day it was released (2026-08-11) — exactly when the failures began.Root cause (upstream): on 10.0.400, only the first tag-helper element inside a
@sectionblock is bound. Every subsequent element in that section is emitted as literal markup, so~/is never resolved. The build succeeds with no warning.In
SupportUi/Pages/Shared/_Layout.cshtml,@section Headopens with<meta name="htmx-config" …>— that one binds, and everything after it does not:CreateTagHelper<UrlResolutionTagHelper>()<link href="/app.657ritalq7.css">WriteLiteral("~/app.css")<link href="~/app.css">The browser resolves the literal
~/…relative to the current page, so/routes/add/~/Components/accessible-autocomplete.min.js404s,accessibleAutocompleteis undefined, the page'swindow.onloadhandler throws, and the<select>is never enhanced intoinput#{id}— which is what the tests wait for.Upstream tracking: dotnet/razor#13216, #13217, #13218 — all closed as fixed by dotnet/roslyn#84771, backported to the 10.0.4xx band in dotnet/roslyn#84782. The fix has not shipped yet — 10.0.400 is still the only 10.0.4xx SDK released.
Changes proposed in this pull request
Pin
global.jsonto the 10.0.3xx feature band:{ "sdk": { "version": "10.0.300", "rollForward": "latestPatch" } }10.0.303 shipped the same day as 10.0.400 on the same 10.0.11 runtime, so this costs nothing but the SDK feature band — we stay on the current runtime and keep getting patch updates within 10.0.3xx.
Since the upstream fix is already merged and backported, this pin should be short-lived: drop it once a 10.0.4xx containing roslyn#84782 is released.
Guidance to review
Exact blast radius. I built both web projects under 10.0.400 with
EmitCompilerGeneratedFilesand grepped the generated code. Affected: 5 URLs, all inSupportUi/Pages/Shared/_Layout.cshtml(app.css, bothaccessible-autocomplete.min.*,moj-frontend-9.0.0.min.css,htmx.min.js). AuthorizeAccess is not affected — in both of its@sectionblocks the~/element happens to be the first tag helper, so it still binds. Noasp-*attributes leak anywhere in either project.This is a production bug, not just a test bug. SupportUi built with 10.0.400 serves a page with no CSS and no working JS. We're only safe today because the
Dockerfilepins the SDK image by digest (unchanged since June, so still 10.0.3xx). When dependabot next bumps that digest past 10.0.400, the build would have silently shipped broken assets — with this pin it fails loudly at build time instead.Narrower fixes were tried and rejected:
asp-append-version="true"to force a tag-helper binding — no effect, because the element still isn't the first tag helper in the section. This is what ruled out a per-element workaround.~/to/— works, but loses static-asset fingerprinting, and would need re-checking against every future SDK.Verification
AddRouteToProfessionalStatusTestsfailed with the identical Playwright errors seen on CI.just build— 0 errors.SupportUi.EndToEndTestspass.just format-changed— no changes.Checklist
🤖 Generated with Claude Code