Repository navigation
V5.8.8: pattern gives the right answer under native AOT, and every build checks its AOT profile - #1066
Merged
Conversation
…ild checks its profile there With the static profiles that 5.8.0 to 5.8.5 shipped, the native AOT compiler compiled Corvus.Regex.Ecma262's automaton wrongly, and patterns it answers matched nothing (the jsonschema-benchmark's corvus-net-optcold failed cspell, jsconfig, krakend, ui5 and ui5-manifest). Corvus.Regex.Ecma262 1.0.15 removes the interface call the compiler devirtualised wrongly. The VerifyAotProfile task publishes the cold runner with native AOT and the profile the build just recorded, and runs its new verify mode over the 37 corpora: every instance must evaluate as valid, or the build fails. Locally, with 5.8.5's profile it fails on the five corpora (1,253 instances), and with the fixed regex library all 35,407 instances are valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3
Contributor
Code Coverage Summary Report - Linux (net10.0)Summary
CoverageCorvus.Json.CodeGeneration - 80.6%
Corvus.Json.CodeGeneration.CSharp - 83.5%
Corvus.Json.ExtendedTypes - 80.1%
Corvus.Json.JsonReference - 76.4%
Corvus.Text.Json - 91.9%
Corvus.Text.Json.AsyncApi - 71%
Corvus.Text.Json.AsyncApi.Amqp - 0.2%
Corvus.Text.Json.AsyncApi.AzureServiceBus - 0%
Corvus.Text.Json.AsyncApi.CodeGeneration - 93.5%
Corvus.Text.Json.AsyncApi.Kafka - 0.2%
Corvus.Text.Json.AsyncApi.Mqtt - 0.4%
Corvus.Text.Json.AsyncApi.Nats - 0.2%
Corvus.Text.Json.AsyncApi.Polly - 57.8%
Corvus.Text.Json.AsyncApi.Testing - 96.2%
Corvus.Text.Json.AsyncApi.WebSocket - 0.6%
Corvus.Text.Json.CodeGeneration - 89.8%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.6%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.5%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 94.7%
|
Contributor
Test Results 48 files 48 suites 9m 2s ⏱️ Results for commit a412ff4. ♻️ This comment has been updated with latest results. |
Contributor
Code Coverage Summary Report - Windows (net10.0)Summary
CoverageCorvus.Json.CodeGeneration - 80.6%
Corvus.Json.CodeGeneration.CSharp - 83.5%
Corvus.Json.ExtendedTypes - 80.1%
Corvus.Json.JsonReference - 76.6%
Corvus.Text.Json - 91.8%
Corvus.Text.Json.AsyncApi - 71%
Corvus.Text.Json.AsyncApi.Amqp - 0.2%
Corvus.Text.Json.AsyncApi.AzureServiceBus - 0%
Corvus.Text.Json.AsyncApi.CodeGeneration - 93.5%
Corvus.Text.Json.AsyncApi.Kafka - 0.2%
Corvus.Text.Json.AsyncApi.Mqtt - 0.4%
Corvus.Text.Json.AsyncApi.Nats - 0.2%
Corvus.Text.Json.AsyncApi.Polly - 57.8%
Corvus.Text.Json.AsyncApi.Testing - 96.2%
Corvus.Text.Json.AsyncApi.WebSocket - 0.6%
Corvus.Text.Json.CodeGeneration - 89.8%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.6%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.5%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 94.7%
|
Contributor
Code Coverage Summary Report - Windows (net481)Summary
CoverageCorvus.Json.CodeGeneration - 78.9%
Corvus.Json.CodeGeneration.CSharp - 83.2%
Corvus.Json.ExtendedTypes - 78.2%
Corvus.Json.JsonReference - 73.6%
Corvus.Text.Json - 91%
Corvus.Text.Json.CodeGeneration - 64.3%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.8%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.6%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 95%
Corvus.Text.Json.JsonPath.CodeGeneration - 96.1%
Corvus.Text.Json.Patch - 96.6%
Corvus.Text.Json.Toon - 88.2%
Corvus.Text.Json.Validator - 93.7%
Corvus.Text.Json.Yaml - 90.8%
Corvus.Toon.SystemTextJson - 90%
|
Contributor
|
The documentation preview for this pull request has been removed. |
This was referenced Nov 8, 2026
Merged
This was referenced Nov 15, 2026
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.
The bug
corvus-net-optcold, the jsonschema-benchmark's native AOT harness, refused valid instances of cspell, jsconfig, krakend, ui5 and ui5-manifest from V5.8.0 to V5.8.5. The JIT harness (corvus-net-optwarm) was right.The package hands the AOT compiler a static profile (
profiles/Corvus.Text.Json.mibc, throughbuildTransitive/Corvus.Text.Json.targets). CI records it again on every build. With the profiles that V5.8.0 to V5.8.5 shipped, the compiler compiled Corvus.Regex.Ecma262's automaton wrongly. Patterns that the automaton answers matched nothing, for example^[0-9]+(ns|ms|us|µs|s|m|h)$on30s. Publishing with-p:CorvusTextJsonUseProfile=falsewas right. V5.8.7's profile happened not to trigger it. 5.8.7's code with 5.8.5's profile fails the same way.The faulty method is
Dfa.DfaBuilder.Closure, which enumerated anint[]throughIEnumerable<int>. Corvus.Regex.Ecma262 1.0.15 removes that interface call (corvus-dotnet/Corvus.Regex.Ecma262#58). The compiler fault is reported as dotnet/runtime#137063.Changes
Directory.Packages.props: Corvus.Regex.Ecma262 and its source package move to 1.0.15. The three lock files that pin it follow..zf/config.ps1):VerifyAotProfileruns afterGenerateAotProfile, where it runs (CI's compile phase, Linux). It publishes the cold runner with native AOT and the profile just recorded, with the same identity check onCorvus.Text.Json.dll. Then it runs the runner's newverifymode over the 37 corpora. Every instance must evaluate as valid, as the benchmark requires, or the build fails. The identity helpers the two tasks share moved to script level.verify(benchmarks/.../ColdRunner/Verify.cs): evaluates every instance of each corpus named, withformatnot asserted, and reports the ones that come out not valid.docs/ReleaseProcess.md: the check, and why a profile that passed once proves nothing about the next.VERSIONHISTORY.md: V5.8.8.Verification
VerifyAotProfilefails the build: cspell 111, jsconfig 364, krakend 30, ui5 138 and ui5-manifest 610 instances refused. These are the same instances the benchmark reported. With regex 1.0.15, all 35,407 instances are valid even under 5.8.5's profile.GenerateAotProfilethenVerifyAotProfileon this branch records a fresh profile (2,824 methods) and gives 35,407 of 35,407 valid.Labelled
pending_release: merging releases V5.8.8.🤖 Generated with Claude Code
https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3