Skip to content

fix(managed): distinguish .NET Standard targets from runtimes - #1743

Merged
N0zoM1z0 merged 2 commits into
morluto:mainfrom
ac1982:fix/managed-netstandard-runtime
Oct 11, 2026
Merged

N0zoM1z0 merged 2 commits into
morluto:mainfrom
ac1982:fix/managed-netstandard-runtime

Conversation

@ac1982

@ac1982 ac1982 commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

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-artifact currently calls a netstandard2.0 library modern-dotnet and 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.dll from Microsoft.Extensions.Primitives 8.0.0: 49,936 bytes, SHA-256 6d492e7919789c7ab3d4afb5d2e5841cc0e2f28b07bf561bd1fcf8945e2170b3.

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

  • Semantic owner and earliest changed stage: managed artifact runtime classification in the static byte inspector.
  • CLI and MCP/tool-catalog contract: existing fields and schemas; corrected runtime_family and classification evidence.
  • Provider, bridge, target-format, or platform compatibility: static PE/CLI inspection; no native-provider or runtime-execution changes.
  • Evidence, artifact, provenance, or reconstruction contract: original target framework, artifact identity and evidence offsets remain available.
  • Process execution, authorization, cleanup, or containment impact: none; inspected assemblies are not executed.
  • Generated metadata, package, or installation impact: none.

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.0 and net462 assemblies still report modern-dotnet and dotnet-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.
  • Public CLI inspection of the three real NuGet assemblies above — passed before/after controls.
  • 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

  • Concrete bug and one focused outcome; conventional title.
  • Related issue linked; searched open, closed and merged PRs for the issue number and .NET Standard classification.
  • Tests exercise public behavior and preserve independent runtime-marker controls.
  • Owning documentation updated; generated contracts unchanged.
  • Representative CLI behavior included.
  • Final diff reviewed for unrelated changes, credentials and unsupported claims.

Prepared with OpenAI Codex assistance.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T07:03:32.507514Z 13748f9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@N0zoM1z0 N0zoM1z0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 N0zoM1z0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@N0zoM1z0
N0zoM1z0 merged commit 81dc64e into morluto:main Oct 11, 2026
60 of 62 checks passed
@morluto morluto mentioned this pull request Oct 13, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(managed): distinguish .NET Standard API targets from runtime family

3 participants