Repository navigation
fix(managed): distinguish .NET Standard targets from runtimes - #1743
Conversation
Signed-off-by: AC <ac@fabtek.cn>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
N0zoM1z0
left a comment
There was a problem hiding this comment.
The producer correction and public CLI controls look sound. I am independently rebuilding this exact head and checking the genuine 50,984-byte Microsoft.Extensions.Primitives 10.0.10 netstandard2.0 DLL through CLI and SDK stdio MCP, including full metadata and Evidence authentication.
Please remove or Unity references from the new runtime-marker documentation example. A Unity API reference alone does not distinguish the selected Mono/IL2CPP backend; the existing Unity classifier is a separate question and should not gain a stronger documented claim in this fix. ReadyToRun is a sufficient example for this paragraph. This is a documentation correction; the focused .NET Standard implementation does not need to expand into Unity analysis.
Reference: https://docs.unity3d.com/kr/6000.0/Manual/scripting-backends-intro.html
N0zoM1z0
left a comment
There was a problem hiding this comment.
Verified the corrected head after a maintainer documentation amendment. Exact producer head passed 29 local tests including public CLI acceptance and MCP boundary coverage, plus the genuine 50,984-byte Microsoft.Extensions.Primitives 10.0.10 netstandard2.0 DLL through actual CLI and SDK stdio MCP. Entire normalized metadata matches the baseline except runtime classification and its explanation; both Evidence records authenticate, caller path parameters remain preserved, text/structured output matches, input bytes remain unchanged, and the MCP connection answers ping. The documentation now uses ReadyToRun as its independent marker example. Waiting for all checks on the amended exact head before merging.
Summary
Fixes #1736. Keep the runtime family unknown for an assembly whose only runtime-related marker is a .NET Standard target. Preserve the target framework and explain that it describes API compatibility across runtimes.
Problem and expected behavior
inspect-managed-artifactcurrently calls anetstandard2.0librarymodern-dotnetand says its TargetFrameworkAttribute names modern .NET. .NET Standard specifies APIs implemented by multiple runtimes, so that attribute alone cannot establish a runtime family.Reproduced through the built public CLI with the unmodified
lib/netstandard2.0/Microsoft.Extensions.Primitives.dllfrom Microsoft.Extensions.Primitives 8.0.0: 49,936 bytes, SHA-2566d492e7919789c7ab3d4afb5d2e5841cc0e2f28b07bf561bd1fcf8945e2170b3.Change and scope
Remove .NET Standard from the modern-.NET runtime predicate and retain an explanatory, source-located target-framework observation. Existing .NETCoreApp, .NET Framework, ReadyToRun, Unity and mixed-code precedence remains intact. Document the distinction.
Contract and boundary impact
runtime_familyand classification evidence.Evidence and regression coverage
A compiled CLI regression fails on base
844fa527(1 failed, 3 existing cases passed).After the fix, the CLI regression covers .NET Standard without a runtime marker, .NETCoreApp, and .NET Standard with an independent ReadyToRun marker.
The real NuGet assembly now returns
{"runtime_family":"unknown","implementation":"cil"}, retaining[".NETStandard,Version=v2.0"].The same package's genuine
net8.0andnet462assemblies still reportmodern-dotnetanddotnet-framework, respectively.Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
Linux arm64, Node 24.18.0 / npm 11.16.0:
npm run test:focused -- tests/acceptance/managedCliOutput.test.ts src/dotnet/ManagedArtifactInspector.test.ts tests/boundary/providers/managed/managedStaticProvider.test.ts tests/boundary/providers/managed/managedDirectAnalysis.test.ts— 28 passed.npm run check— all six tasks and architecture guards passed; lint reported warnings, no errors.npm run verify:managed— 11 portable fixture scenarios passed; optional operator-local manifest and ILSpy oracle were unconfigured.git diff --check— passed.Compatibility, safety, and release
No schema migration or package changes. Runtime classification becomes more conservative for .NET Standard-only evidence. Full repository tests, native Hopper/Ghidra, ILSpy, and non-Linux execution were not run; no claims are made about those workflows.
Review checklist
Prepared with OpenAI Codex assistance.