Skip to content

feat: the gate proves the package's metadata - #8

Merged
tension-atoi merged 2 commits into
mainfrom
feat/gate-package-metadata
Oct 22, 2026
Merged

tension-atoi merged 2 commits into
mainfrom
feat/gate-package-metadata

Conversation

@tension-atoi

Copy link
Copy Markdown
Collaborator

The operator's decision: check the package's metadata, not its build. The package itself is the release's business and costs minutes; what it says is the gate's.

The gap

scripts/verify builds the Zig binaries and the Rust binaries. Nothing built the package — the artifact that ships — so a packaging defect surfaced only when the machine was asked to install it:

undefined symbol: wl_log_trampoline_to_rust_client

and the cause was three flags that makepkg inherits from the build machine (PR #7). The flags' cause is now covered by the build-flags step. What is still unproven is the package's own metadata: its file list, and the dependencies it names.

The step

package-metadata runs the package's own package() function against the tree the gate has built, in a scratch directory. A source that is not there makes install fail, so the file list is proven to exist rather than parsed and hoped for — and the loops in it (the icon sizes) are resolved by the package itself.

It then asks the question that matters: do the package's dependencies bring the libraries its binaries link?

The libraries come from the binaries' own NEEDED entries. The packages that provide them are looked for in the dependencies' closure, because a distribution may split a package — CachyOS splits libgcc_s out of gcc-libs — and the question is not whether the names match but whether the package works on a machine that installed its dependencies.

The Flatpak backend is the optional part, and its libraries belong to the optional dependency that switches it on.

It has teeth

Taking pacman out of the dependencies makes the step fail, naming pacman and libarchive — the library the CLI links, which came in through pacman:

package-metadata: calix needs libarchive, which the package's dependencies do not bring
package-metadata: calix-daemon needs pacman, which the package's dependencies do not bring

The gates

scripts/verify — PASSED, the step takes 5 s. scripts/ci-replay — PASSED, 109 s: in the container the step builds the release binary (it needs the artifact's NEEDED entries), which the later release-build step then reuses, so the total is unchanged.

The record: evidence/runs/gate-gaps-20261022/.

Syster-Agent added 2 commits October 22, 2026 07:25
The operator's decision: check the package's metadata, not its build.
The package itself is the release's business and costs minutes; what it
*says* is the gate's.

The new step, 'package-metadata', runs the package's own package()
function against the tree the gate has built, in a scratch directory.
A source that is not there makes install fail, so the file list is
proven to exist rather than parsed and hoped for — and the loops in it
(the icon sizes) are resolved by the package itself.

It then asks the question that matters: do the package's dependencies
bring the libraries its binaries link? The libraries come from the
binaries' own NEEDED entries, and the packages that provide them are
looked for in the dependencies' closure — because a distribution may
split a package (CachyOS splits libgcc_s out of gcc-libs), and the
question is not whether the names match but whether the package works
on a machine that installed its dependencies.

Measured: the check finds what it is meant to find. Taking 'pacman' out
of the dependencies makes it fail, naming pacman and libarchive — the
library the CLI links, which came in through pacman.

The Flatpak backend is the optional part, and its libraries belong to
the optional dependency that switches it on.
The lockfile's currency and the package's metadata: the gate covered the
paths that were easy to cover, and the paths that matter — the
artifact that ships, and the lockfile that names it — were outside it.
The record keeps the measurements, including the one that shows the
metadata check has teeth.
@tension-atoi
tension-atoi added this pull request to stack #10 October 22, 2026 12:19
@tension-atoi
tension-atoi merged commit 7da67be into main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant