ADR-025: Native Package Identity for Alias Installs

Status

Accepted

Related: ADR-019 (manifest is intent; explicit stamp untrack is the escape hatch), ADR-024 (npm version suffixes are not identity); tracked in issue #270.

Date

2026-11-15

Context

Stamp recorded the requested spec verbatim in the manifest. Native managers do not always install a package with that name. On Fedora:

> sudo dnf install -y yarn
...
Install nodejs-corepack-0:0.36.0-1.fc44.noarch User updates

dnf resolved yarn to nodejs-corepack (via provides / file-provides), exited 0, and stamp wrote yarn (dnf). remove, reinstall, and restore then target a name the native manager cannot uninstall or reinstall, and the entry only surfaces as a false “missing” or a no-op removal.

Reconcile could not produce this: DNF.ListInstalled reports RPM names.

Part 1 (stamp untrack, issue #270) added a supported way to clear such entries. This ADR covers the source fix: record what the manager installed.

Decision

Resolve native identity after a successful install or reinstall, through an optional adapter capability.

Alternatives Considered

Reject alias installs

Rejected: dnf accepts these specs and users rely on them; refusing removes a working capability to avoid a bookkeeping bug.

Pre-resolve the spec before installing

Rejected: the installed name cannot be known until the transaction runs, and dnf may resolve through provides that only become visible after the package is present.

Snapshot rpm -qa before and after and diff

Rejected: heavier, needs pre-install state, and the diff includes dependency packages; separating the requested package requires history parsing.

Parse dnf history info reason column

Rejected: locale-fragile table parsing.

Change Adapter.Install to return a name

Rejected: breaking change across every adapter for a capability only dnf needs today. The optional interface matches InstalledChecker/BatchInstaller.

Consequences