fix(abi): prune the objects recorded broken, not every risky package #211

Merged
pat-s merged 1 commit from fix/prune-from-recorded-verdicts into main 2026-09-09 15:01:22 +00:00

2026-09-09

fix(abi): prune the objects recorded broken, not every risky package
The prune selected its targets with `abi_cache_risky_packages()`, the source
classifier. A dry run on ubuntu-2404-amd64 reports what that costs:

    Dry run: 3013 object(s) left in place.

The classifier calls 93% of compiled packages risky; the binaries' own symbols
say 4.3%. Applying it would have deleted roughly 3000 working flat objects to
fix about 230 broken ones, turning every one of them into a source fallback for
clients that cannot be routed.

Select from `abi_flat_safety` instead, matching the object rather than the
package name: a package can have a safe flat binary at one version and an
unsafe one at another, and deleting both throws away a working binary. This is
the same correction #129 made to the index writer; the prune was written before
the verdicts existed and never followed.

The refusal guard moves with it. An empty result now means the slot's
flat-safety backfill never ran, which is exactly the state rhel8 was found in,
and pruning nothing while reporting success would have hidden it.
2026-09-09 13:06:05 +00:00