Fix trimmed JSON extraction worker failures - #4710
Merged
Merged
Conversation
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.
Summary
JsonEncodedTextencodingJsonDocumentparsing while preserving malformed-surrogate fallback behaviorversion.json, Stryker configuration,package-lock.json, and JSON Schema inputsRoot cause and impact
Published trimmed builds disable reflection-based
System.Text.Jsonserialization. Two extraction-worker code paths serialized runtime property-name strings throughJsonSerializer, so valid keys such as$schemaandnode_modules/...could terminate isolated extraction and leave a rebuild partial. The replacement uses trim-safe primitives and preserves the existing bounded fallback contract for malformed large JSON.A successful published rebuild now finishes complete and stamps the current
index_writer_version; partial runs continue to preserve the previous successful writer stamp as designed.Validation
dotnet test CodeIndex.sln -c Release --no-build -p:UseSharedCompilation=false --logger "console;verbosity=quiet"— net8.0: 9,773 passed, 7 skipped; net9.0: 9,306 passed, 413 skippeddotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=falsedotnet build CodeIndex.sln -c Debug -p:UseSharedCompilation=falsemake lintdotnet run --project tools/CodeIndex.Changelog --no-restore -- checkstatus --check --jsonsmoke: complete index, no file errors, writer version1.39.3Documentation and changelog
TESTING_GUIDE.mdchangelog.d/unreleased/4709.fixed.mdFixes #4709