Skip to content

refactor(domain): move the .NET metadata readers into src/domain/managed - #11544

Merged
morluto merged 2 commits into
mainfrom
refactor/managed-metadata-readers-domain
Nov 15, 2026
Merged

morluto merged 2 commits into
mainfrom
refactor/managed-metadata-readers-domain

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Moves the .NET (ECMA-335) metadata readers from src/dotnet/ into src/domain/managed/, using git mv and specifier rewrites. Each file's content is unchanged apart from its relative imports.

Moved (17 modules, renamed to the domain lower-camel convention; three tests move with their modules):

  • ManagedMetadataLayout, ManagedMetadataRowSizes, ManagedMetadataHeaps (+ test), ManagedMetadataInventory, ManagedMetadataInventoryRows;
  • ManagedTypeDefinitionRows, ManagedTypeMemberLists, ManagedTypeNesting, ManagedTypeReferences, ManagedSignatureTypeNames (+ test);
  • ManagedMemberInspectorCore, ManagedMemberOwnership, ManagedMemberPointers, ManagedMemberReferenceRows;
  • ManagedPeReader, ManagedDecodeBudget (+ test) and ManagedReaderFailure.

The set is the full closure of what the artifacts provider imports (DesktopFileInspection reads the CLI metadata layout, assembly reference names and the reader failure). Every file in it depends only on domain modules and on other files in the set. artifacts -> dotnet (3) leaves the crossProvider baseline.

Refs #11359. Part of plan W9. This was waiting for #10905, which has landed.

Problem and expected behavior

Artifacts read .NET metadata through the dotnet provider's internals. Expected: I/O-free format readers live in domain next to the other managed facts (domain/managed/), and both providers import them inward, as for native in #11482.

Change and scope

  • Pure moves; 62 importers rewritten. The dotnet provider files that stay (ManagedStaticProvider, snapshot, comparison and inspection adapters) import the readers from domain.
  • Baselines re-key cli-option-text-outside-cli and raw-buffer-read entries with the same counts. The parser-folder guards already cover src/domain/managed/.

Not included: other dotnet modules. Nothing outside dotnet imports them.

Contract and boundary impact

  • Semantic owner and earliest changed stage: the readers keep their code; their owner moves from the dotnet provider to src/domain/managed. No behaviour change.
  • Contribution scope fit and linked maintainer decision: [Design] Provider-to-provider import rule with declared exceptions #11359. No new capability.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: specifier updates only; three tests move with their modules.

  • Base reproduction or other evidence: node scripts/verify-module-boundaries.mjs --shrink-layer-baseline reported artifacts -> dotnet: 0, baseline 3.

  • User-visible CLI/MCP output (if applicable): none.

  • Remaining proof gaps: none.

  • 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

  • npm run check:fast: passed, including the architecture guards.
  • node scripts/verify-module-boundaries.mjs: passed after lowering the baseline.
  • npm run test:focused -- on the 22 changed test files: 747 passed, 1 skipped (13 s).
  • npm run test:focused -- tests/boundary/filesystem/desktopApplication.test.ts tests/conformance/formats/mzPeAdmission.test.ts: 94 passed, 1 skipped.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. These are internal modules.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: not applicable.

This is a pure move (git mv, specifier rewrites and baseline re-keys), so the squash commit goes in .git-blame-ignore-revs after merge.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T22:03:11.422810Z
We couldn’t complete this review. Comment @codex review to try again.
b430ec0 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Low impact] This refactor appears safe to merge.

Summary

Moves 17 .NET metadata readers and three tests into src/domain/managed/, so artifact and .NET inspection code share domain-owned readers.

  • Managed metadata readers now live in the shared domain.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Artifact inspection"] --> D["Shared domain readers"]
  N[".NET inspection adapters"] --> D
  D --> L["Metadata layout"]
  D --> B["Shared memory budget"]
  D --> F["Read failures and partial results"]
Loading

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

…ed-metadata-readers-domain

# Conflicts:
#	scripts/lib/module-layers.baseline.json
#	tests/conformance/providers/managed/managedNativeVerification.test.ts
@morluto
morluto merged commit 412d621 into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the refactor/managed-metadata-readers-domain branch November 15, 2026 22:45
morluto added a commit that referenced this pull request Nov 15, 2026
#11462, #11496, #11513, #11525 and #11544 moved files without changing their code (only import specifiers and path strings).
@morluto morluto added the area: domain Domain logic, errors, and pure functions label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant