Repository navigation
Acquire standalone API coordinate-match endpoints through PackageHouse #9941
Description
Owner and role
- Normative owner:
docs/design/package-house.md - Supporting consumer:
docs/design/portable-coordinate-replacement.mdidentifies Acquisition as the owner of package realization, while standaloneApiCoordinateMatchQueryis the existing host-neutral exact-endpoint producer used bytype/member --match.
Problem
ApiCoordinateMatchQuery accepts IPackageRootPayloadProvider, asks it for two complete package payloads, and constructs both PackageRootBinding values itself. The CLI provider implements that capability with DesktopPackageSourceComposition.AcquirePinnedAsync, an in-memory package store, and complete archive access.
The query consumes neither package-wide files nor arbitrary archive content. It realizes the exact source and destination package coordinates for one requested TFM, admits their selected compile surface and corresponding implementation roles into one Workspace, and performs API correspondence. The destination must remain on the exact producer selected for the source endpoint.
This leaves a host-neutral production API outside PackageHouse demand and makes the host choose complete payload access rather than declaring compile realization.
Focused claim
Standalone API coordinate matching constructs one exact PackageHouse compile-realization request per endpoint with SurfaceAndImplementation demand. The host supplies a PackageHouse executor, package-store and transport policy, and source-operation lifetime. After the source settles, the destination execution is constrained to the source acquisition's typed producer identity.
The query consumes the House-issued compile realization to create each exact Package Root contribution. It does not recreate compile selection from a raw payload, choose ranged versus complete transfer, or weaken producer affinity.
Real asset
The existing production witness is:
dotnet-inspect type Avalonia.Data.MultiBinding \
--package Avalonia@11.3.14..12.1.2 \
--tfm net8.0 \
--matchAvalonia.Data.MultiBinding moves from Avalonia.Markup to Avalonia.Base through an explicit type forwarder. Both package endpoints contain substantially more content than the selected net8.0 compile and implementation roles required by the operation.
Required behavior
- Source and destination are exact
PackageHouseDemand.Exactrequests with compile realization for the requested target. - Both requests declare
PackageAssetDemand.SurfaceAndImplementation; PackageHouse alone chooses cache, ranged entries, or complete fallback. - The destination host execution receives the source settlement's typed producer identity as a required producer.
- A House settlement is accepted only for the exact request instance constructed by the query.
- Root creation consumes the House compile-selection receipt and acquired payload generation; the query does not rerun package asset selection.
- Existing direction, source selection, forwarding, declaration correspondence, completion, cancellation, cleanup, and envelope behavior remain unchanged.
- Missing producer authorization, missing package, source failure, invalid realization, and unrepresentable Root coordinates remain visible acquisition failures at the correct endpoint.
Evidence
Add Release gates proving:
- both exact endpoints execute through House Realize requests with compile selection and
SurfaceAndImplementation; - destination execution receives the exact source producer identity;
- cached fixture archives preserve the existing Avalonia forwarder and System.Text.Json declaration-correspondence outcomes;
- a foreign or unavailable required producer fails at the destination without falling back to another configured source;
- an unrelated House settlement is rejected rather than accepted by shape;
- the production CLI no longer constructs
ConfiguredPackageRootPayloadProviderfor--match; and - a real command receipt reports House-selected content while preserving the current semantic result.
Non-goals
- No Browser coordinate-control adoption.
- No portable Workspace coordinate-replacement migration.
- No exact-Library selection change.
- No change to correspondence, forwarder, selector, Workspace, or presentation semantics.
- No migration of the deprecated
PackageAssemblyQuerycompatibility adapter, which remains tracked for retirement by Retire literal-specific package assembly query adapters #6797 after Adopt bounded assembly-semantic Find in the CLI #6795.
Activity
richlander commentedon Oct 12, 2026
Implementation evidence refined the focused demand: standalone coordinate correspondence reads the selected API surface—declarations, assembly identities, references, and type forwarders—but does not inspect implementation bodies. Packages without a separate reference surface already expose
lib/as the compile surface.PR #9945 candidate 2 therefore requests exact
Surfacerealization rather than eagerly materializing separate implementations. Its full 13-case semantic suite remains green, including Avalonia forwarding and System.Text.Json member correspondence. Exact NativeAOT evidence improves from the initial +30.8% latency/+21.8% RSS miss to +3.6% latency/-4.1% RSS, while transfer falls 81.251% versus the old complete-payload path.#9945
— Authored with GitHub Copilot CLI