Skip to content

Acquire standalone API coordinate-match endpoints through PackageHouse #9941

Closed

Description

@richlander

Owner and role

  • Normative owner: docs/design/package-house.md
  • Supporting consumer: docs/design/portable-coordinate-replacement.md identifies Acquisition as the owner of package realization, while standalone ApiCoordinateMatchQuery is the existing host-neutral exact-endpoint producer used by type/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 \
  --match

Avalonia.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

  1. Source and destination are exact PackageHouseDemand.Exact requests with compile realization for the requested target.
  2. Both requests declare PackageAssetDemand.SurfaceAndImplementation; PackageHouse alone chooses cache, ranged entries, or complete fallback.
  3. The destination host execution receives the source settlement's typed producer identity as a required producer.
  4. A House settlement is accepted only for the exact request instance constructed by the query.
  5. Root creation consumes the House compile-selection receipt and acquired payload generation; the query does not rerun package asset selection.
  6. Existing direction, source selection, forwarding, declaration correspondence, completion, cancellation, cleanup, and envelope behavior remain unchanged.
  7. 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 ConfiguredPackageRootPayloadProvider for --match; and
  • a real command receipt reports House-selected content while preserving the current semantic result.

Non-goals

Activity

  1. richlander commented on Oct 12, 2026

    @richlander
    OwnerAuthor

    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 Surface realization 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions