Skip to content

Add bounded semantic MethodDef identity - #9874

Closed
richlander wants to merge 3 commits into
mainfrom
feature/semantic-method-identity
Closed

richlander wants to merge 3 commits into
mainfrom
feature/semantic-method-identity

Conversation

@richlander

Copy link
Copy Markdown
Owner

dotnet-inspect builds robust, capable inspection features that provide
foundational capabilities or compelling experiences and are conventionally
sound, delightfully new or unique, or both. This slice advances that mission by
replacing a legacy Library Body Analysis identity dependency with one bounded,
receipted Method Query Source capability.

Summary

  • add structural MethodSemanticIdentity independently from display identity
    and caller-safety ownership
  • publish semantic identity only for direct exact-MethodDef plans, with typed
    unavailable outcomes and independent work budgets
  • receipt semantic work through source coverage, aggregate execution receipts,
    and per-producer layer participation
  • preserve current MethodIdentity semantics across synthetic boundary cases
    and a sparse exact-method CoreLib gate

Design basis

Normative owner:
docs/design/method-query-source.md#semantic-methoddef-identity.

The capability intentionally rejects all-definition, exact-TypeDef, predicate,
and generated-body expansion plans. CallerUnsafeMode remains a separate
producer-owned prerequisite and must be supplied explicitly when composing the
legacy MethodIdentity shape.

Validation

  • dotnet build dotnet-inspect.slnx -c Release
  • dotnet run --project tests/ILInspector.Analysis.Tests -c Release --no-build --no-restore
    • 2,280 passed; 8 pinned-corpus tests skipped because the optional artifact
      is not installed
  • dotnet run --project tests/ILInspector.Analysis.Tests -c Release --no-build --no-restore -- --filter-class '*MethodRowGateTests'
    • 48 passed after merging current main
  • npx markdownlint-cli docs/design/method-query-source.md
  • git diff origin/main...HEAD --check

Closes #9830.
Advances #8965.


Authored with GitHub Copilot CLI.

richlander and others added 2 commits October 9, 2026 22:08
Publish structural method identity through exact Method Query Source plans with independent budgets, typed unavailable outcomes, and receipted work. Keep caller safety as a separate producer-owned fact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richlander

Copy link
Copy Markdown
Owner Author

Round 1 reconciliation is clean for exact head 5f2147066fa0b28bc39cdeba071ea42a5ef0073a.

GPT-6 Sol returned CLEAN with no qualifying findings or prior obligations. Current-head ci-required is successful, the PR remains mergeable, and the live main tip b63733a320121ce21c6b8c34c0a9a02b428bf490 forms a conflict-free test merge. The review-clean label is bound to this exact head; live-base interaction still requires carry-forward classification before merge preflight.


Authored with GitHub Copilot CLI.

@richlander richlander added the review-clean PR has met the adversarial review standard per AGENTS.md. label Oct 10, 2026
@richlander

Copy link
Copy Markdown
Owner Author

Carry-forward classification: no interaction.

  • Unchanged reviewed head: 5f2147066fa0b28bc39cdeba071ea42a5ef0073a
  • Previously recorded base tip: 0095a65ede129b83150069bc9099f5380185a4ce
  • Newly analyzed live main tip: b63733a320121ce21c6b8c34c0a9a02b428bf490
  • The landed range touches none of this PR’s changed files and does not alter TypeRefDecoder, Method Query Source execution, semantic-identity receipts, or the focused gates.
  • Adjacent movement adds Publish bounded semantic MethodDef identity from Method Query Source #9830 as a prerequisite for a future unsafe-census producer and changes an unrelated performance-export path; neither changes this candidate’s owned claim or behavior.
  • The non-mutating test merge is conflict-free.

The candidate head remains unchanged, no integration or new validation is required, and review-clean remains valid for this carry-forward lineage.


Authored with GitHub Copilot CLI.

@richlander richlander removed the review-clean PR has met the adversarial review standard per AGENTS.md. label Oct 10, 2026
Compose semantic identity with the newly landed memory-safety contract capability by preserving both receipts and producer participation layers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richlander

Copy link
Copy Markdown
Owner Author

Conflict recovery published a replacement candidate.

  • Superseded reviewed head: 5f2147066fa0b28bc39cdeba071ea42a5ef0073a
  • Integrated live base tip: 55877a5c24cea4b0ad7bc512de0133e16c523cd2
  • Recovery merge commit / new head: cf8085849aa128dcc1e3343de600b00e4ca9cedb
  • The overlap was with Receipt memory-safety contract support as a Method Query Source capability #9901 memory-safety contract support in the same Method Query Source capability surfaces.
  • Resolution preserves both independent layer bits (MemorySafetyContracts = 1024, SemanticIdentity = 2048), both source receipts, and both per-producer participation counters.
  • Focused combined gate: 80/80 MethodRowGateTests and MethodDefinitionRequestSetTests passed.

The previous review-clean evidence and merge authorization expired with the head change. Round 2 will review the exact recovery head after current-head CI is green.


Authored with GitHub Copilot CLI.

@richlander

Copy link
Copy Markdown
Owner Author

Round 2 reconciliation is clean for exact recovery head cf8085849aa128dcc1e3343de600b00e4ca9cedb.

GPT-6 Sol returned CLEAN with no blocking findings, non-blocking observations, scope proposals, or prior finding obligations. The review confirms the conflict resolution preserves independent semantic-identity and memory-safety layers, coverage, and participation receipts. The live base is conflict-free; ci-required remains pending, and newly observed base movement still requires carry-forward classification before merge readiness.

The review-clean label is bound to this exact head.


Authored with GitHub Copilot CLI.

@richlander richlander added the review-clean PR has met the adversarial review standard per AGENTS.md. label Oct 10, 2026
@richlander

Copy link
Copy Markdown
Owner Author

Carry-forward classification after round 2: no interaction.

  • Unchanged reviewed head: cf8085849aa128dcc1e3343de600b00e4ca9cedb
  • Integrated base tip: 55877a5c24cea4b0ad7bc512de0133e16c523cd2
  • Newly analyzed live main tip: 180823dd056007abc4d1d641716ff55b88a5054e
  • Landed commits: Use References for package relationships in Inspect Web #9900 and Design Fast Diff's Type and Member levels #9853.
  • The landed range touches none of this PR’s changed files and does not alter Method Query Source, TypeRefDecoder, semantic-identity work/receipts, memory-safety composition, or focused gates.
  • The non-mutating test merge is conflict-free.

The candidate remains unchanged; review-clean is preserved. No integration, validation, or review is restarted. Merge readiness still requires successful current-head ci-required and renewed authorization for this replacement head.


Authored with GitHub Copilot CLI.

@richlander

Copy link
Copy Markdown
Owner Author

Closing this in favor of #9970, at the operator's direction. Both PRs implement #9830. They differ in two ways that matter for retiring Library Body Analysis:

This PR also has independent work budgets with an exhausted outcome, which #9970 doesn't yet carry; #9970 relies on the existing per-method decode guards. If a request-level cap is wanted, it belongs as a follow-up on #9970.

Thanks for the work here. The branch is left in place.

🤖 Generated with Claude Code

@richlander richlander closed this Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-clean PR has met the adversarial review standard per AGENTS.md.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish bounded semantic MethodDef identity from Method Query Source

1 participant