2 Commits
Author SHA1 Message Date
Dario Gabriel LipicarandClaude Opus 5 890d9bde76 fix(variant): alias the architecture half, so a bundler-built .lgx installs on Intel Mac
nix-bundle-lgx writes darwin-amd64. This package manager computes
darwin-x86_64. The alias table bridged only the four linux- rows, so
darwin and windows fell through with no alias at all:

    Error: Package does not contain variant for platform:
    darwin-x86_64-dev (package provides: darwin-amd64-dev)

Fail-closed, at install, for every package the standard bundler builds.
Reproduced against real binaries with matched controls — the same payload
spelled darwin-x86_64 installs, and the same shape on linux installs
because that row happens to be bridged.

The two producers disagree with each other while the SECOND CONSUMES THE
FIRST: nix-bundle-logos-module-install bundles a .lgx that nix-bundle-lgx
named, then calls lgpm with the arch spelled its own way. That is why the
disagreement is absorbed here, in the consumer, rather than by picking a
winner in one producer and breaking every .lgx already published with the
other spelling.

The canonical vocabulary is the one logos-module-builder's resolvePlatforms
just pinned — os in {linux, darwin, windows}, architecture in
{x86_64, aarch64} — so the first entry of each row is canonical and the
rest are legacy spellings a producer actually writes. Reusing that
vocabulary rather than inventing a third table is the point: a third table
is how this bug got here.

Only the ARCHITECTURE half is aliased. The OS half stays verbatim on
purpose — aliasing it would weaken the fail-closed check that stops a
Windows package installing as a macOS one.

Why no test caught it: every doctest hand-rolls the LGPM spelling and none
uses the bundler's, so the two vocabularies never met in CI.

Worth recording — the published catalog carries zero darwin-amd64 and zero
darwin-x86_64 across all 15 packages and 49 versions. No Intel-Mac package
has ever shipped, which is consistent with one being dead on arrival.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 09:35:41 -03:00
Dario Lipicar e15beeac56 split logos-package-manager library (#3) 2026-03-26 10:42:27 -03:00