Prefer codex build for agents; add scripts/codex-build.sh and constructed-type debugging
#1100
+695
−75
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.
Motivation
ravc/Raven.Core.dllin a safe sequence.Description
scripts/codex-build.shthat runs generators, buildsRaven.CodeAnalysis, buildsRaven.CompilerwithoutRaven.Core, emitsRaven.Core.dllviaravc(and ensures the output directory exists withmkdir -p), then rebuildsRaven.Compilerwith the core DLL.AGENTS.mdto mark the codex build procedure as preferred for agents and add three investigation docs underdocs/investigations/describing recent sample build/run results.ConstructedNamedTypeSymbolto introduce aCreatefactory with optional caching, add substitution tracing and re-entrancy protections, addConstructedNamedTypeDebuggingandCompilationDebugginghelpers driven byRAVEN_DEBUG_*env vars, and update call sites (includingPENamedTypeSymbol,SourceNamedTypeSymbol, and synthesized state machine usage).test/Raven.CodeAnalysis.Tests/Symbols/ConstructedNamedTypeSymbolTests.csto cover caching, substitution comparer behavior, synthesized state-machine member refresh, and recursive field substitutions; and make minor formatting/clarity edits inAsyncLowererandSynthesizedAsyncStateMachineTypeSymbol.Testing
scripts/codex-build.sh, which completed successfully and emittedRaven.Core.dllandravc.RAVEN_CORE=../src/Raven.Core/bin/Debug/net9.0/net9.0/Raven.Core.dll bash build.sh, which compiled 62 of 78 samples and produced an investigation log of the 16 failures.OUTPUT_DIR=output bash run.sh, which ran 53 assemblies successfully and reported 23 runtime failures (categories summarized in the investigation doc).Codex Task