Repository navigation
Adopt focused exact-member Analysis in AssemblyContextMethodAnalysisQuery #9832
Description
Goal
Move AssemblyContextMethodAnalysisQuery to focused exact-member Analysis
results without wrapping or filtering LibraryBodyAnalysisBuilder.Build.
This is the first consumer-adoption successor beneath the hub drain in #8965.
Prerequisites
- Analysis level 2: method bodies as a QuerySpace source (breadth, depth, fused traversal, executors) #8577 Method Query Source exact breadth, layers, and receipts;
- Plan method-targeted direct-call populations and move call consumers off LibraryBodyIndex #8945 method-targeted direct-call population and identity tiers;
- Publish bounded semantic MethodDef identity from Method Query Source #9830 bounded semantic MethodDef identity;
- Receipt exact-member memory-safety contract association support #9831 receipted memory-safety contract/association support; and
- Publish typed same-module callee resolution on the Analysis call graph #8700 typed same-module callee resolution where exact call correspondence is
required.
Exact adoption
For one operation-subject-associated raw metadata token:
- Source admission distinguishes invalid token, valid bodiless method, and
valid body without table traversal. - Exact-target declaration publishes detached semantic identity.
- Direct-call production consumes the one physical
EvidenceMethodand the
Plan method-targeted direct-call populations and move call consumers off LibraryBodyIndex #8945 demand tier required by the query. - Selected-method safety publishes declaration, local, instruction,
UnsafetyOccurrence, and non-callUnsafeEvidencefacts. - Call safety composes typed same-image target resolution with the
memory-safety contract lookup and normalizes unsafe-call evidence. - The query returns its existing
AssemblyMethodAnalysisshape and exception
regions.
During this first mixed adoption, allocations, optimization opportunities, and
final MethodSignals composition remain explicitly on the old boundary. The
slice claims proportional migrated work, not proportional total query work.
Supported call-target fidelity
Preserve every current same-image resolver shape: MethodDef and peeled
MethodSpec; MemberRef parented by MethodDef, TypeDef, or constructed TypeSpec;
and local, module-alias, or assembly-alias TypeRefs. Cross-assembly callees keep
the current unset unsafe mode. All correspondence and contract-association work
is declared, bounded, and receipted; no target body is acquired.
Required evidence
- Complete public outcome equivalence for valid, bodiless, and invalid targets.
- Semantic identity equivalence, direct calls, local/non-call safety, call
safety, diagnostics, and exception regions. - Every supported same-image target shape and property/event inherited unsafe
contract. - Exact selected-body work plus separately receipted correspondence and
contract-association support. - Explicit provenance for retained legacy
MethodSignals, allocations, and
optimization opportunities. - Typed rejection outside exact-member admission with no silent fallback.
Retirement action
Update #8965's live drain map with the moved result and consumer. Delete legacy
surface only when its final consumer moves; this first adopter must not claim
that incidental computation inside the still-required old path is retired.
Non-goals
- Type-wide, predicate-scoped, or unscoped migration.
ILOffsetQuery; it is the next adopter after an owner can bind its prefetched
image without reopening by path.- Final
MethodSignals, allocation, or optimization producer migration. - Total-query performance claims while mixed execution remains.
Activity
richlander commentedon Oct 10, 2026
Operator requirement for the first production-caller adoption: include exact base/head NativeAOT performance analysis for the semantic MethodDef identity path. Run accepted measurements on one approved performance host through
perf-guard, and publish the evidence before merge readiness. This requirement begins with the first production consumer; prerequisite-only PR #9874 has no production caller to measure.Authored with GitHub Copilot CLI.
richlander commentedon Oct 13, 2026
Claimed for implementation on branch
feature/exact-method-analysisfrom exactmaintip4b3db3bd709198efa56d5b6bf653349c65f2ab5d.The first block will reconcile this issue with the landed broader semantic-identity (#9970), memory-safety (#9901), and same-module target (#9938) APIs, then move only the focused
AssemblyContextMethodAnalysisQueryresult while retaining explicit legacy provenance for signals, allocations, and optimization opportunities. Exact base/head NativeAOT performance throughperf-guardremains a merge-readiness gate.Authored with GitHub Copilot CLI.
richlander commentedon Oct 13, 2026
Audit result: this slice is blocked on #9868, so I am releasing the current implementation claim.
#8945 delivered discovery-native call counts and retained rich
DirectCallrows onLibraryCallGraphAnalysisResult; it did not add a Method Query Source Calls layer. The current source has exact-body admission plus semantic identity, same-module target, and memory-safety capabilities, but no owner-issued call/member/field/signature operand population. #9868 explicitly owns that missing layer, including the local-signature andcallifacts required by this query’s safety output.Implementing #9832 now would duplicate operand/signature decoding or route the new producer through the transitional Library Body Analysis lookup, both forbidden by the normative exact-member migration contract. Resume #9832 after #9868 lands and measure its first production adoption then.
🤖 Generated with GitHub Copilot CLI
richlander commentedon Oct 13, 2026
Reclaimed for implementation on branch
feature/exact-method-analysisfromexact
maintipbafc7ab38e71bd922c22a62e6126937d78df71f2.The released blocker is now resolved: #10031 merged the owner-issued Calls,
local-signature, field-operand, callee-identity, target, sharing, and receipt
capabilities required by this production consumer. The implementation will
resume the focused
AssemblyContextMethodAnalysisQueryadoption withoutwrapping or filtering the legacy aggregate, while retaining explicit legacy
provenance for allocations, optimization opportunities, and final
MethodSignals.Exact base/head NativeAOT production measurements through
perf-guardremain amerge-readiness gate. #9864 and #9865 are prerequisites for the later
unsafe-member census, not for this exact-member consumer slice.
🤖 Generated with GitHub Copilot
richlander commentedon Oct 18, 2026
Claimed for implementation on branch
feature/exact-method-analysisfrom exactmaintip159b2f3612e2ab045e7f1e98f3089eb923d9e18d.Normative owner:
docs/design/assembly-analysis-operation.md#exact-member-scoped-producers. This slice will move exact admission, semantic identity, direct calls, safety evidence, diagnostics, and exception regions to owner-issued Method Query Source execution. FinalMethodSignals, allocations, and optimization opportunities remain explicitly onLibraryBodyAnalysisService; no broad-builder wrapper, aggregate filtering, or second planner will be introduced.Exact base/head NativeAOT evidence through
perf-guardremains a merge-readiness gate.Authored by GitHub Copilot CLI.
richlander commentedon Oct 19, 2026
Implementation PR opened at #10275
Exact candidate:
2751cccee49373b8bcd00d1f21539ae70be0b284. The focused producer now owns identity, direct calls, safety, diagnostics, and exception regions; signals, allocations, and optimization remain explicitly legacy-owned. Exact NativeAOT output parity and performance evidence are recorded in the PR.Authored by GitHub Copilot CLI.