Commit graph build-cran-binaries/local/list-unsafe-flat-objects.R
Author SHA1 Message Date
fcbc4e8e92
fix(abi): do not error on the nothing-to-repair path
A slot with verdicts recorded but nothing unsafe died on its own success
message:

  Error in sprintf("%s/%s: %d objects recorded, none unsafe. Nothing to repair.", ...)

RPostgres returns count(*) as integer64, which %d rejects. The pipeline step
then failed for a slot that was in the best possible state, which is the wrong
signal entirely.
2026-09-09 10:45:59 +00:00
e3b7212eaf feat(abi): skip objects that already have the per-minor builds they need (#207)
Some checks failed
ci/crow/manual/repair-unsafe-flat-objects/7 Pipeline is pending
ci/crow/manual/repair-unsafe-flat-objects/9 Pipeline failed
ci/crow/manual/repair-unsafe-flat-objects/13 Pipeline failed
ci/crow/manual/repair-unsafe-flat-objects/15 Pipeline failed
ci/crow/manual/repair-unsafe-flat-objects/8 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/10 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/14 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/16 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/17 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/11 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/18 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/12 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/4 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/2 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/3 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/5 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/6 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/1 Pipeline was successful
## Why

The fleet repair (12410) was interrupted after 14 of 18 slots, having done:

```
2522 objects enumerated | 2568 uploads | 1451 symbol overrides
```

Resuming would repeat all of it. The verdict in `abi_flat_safety` describes the **flat** object, and building a per-minor copy does not change that object, so the repair list is identical on the next run. Roughly 2500 objects of duplicated compute.

## What changed

`list-unsafe-flat-objects.R` now drops rows that are already repaired: an object counts as repaired once a per-minor build exists for **every** minor that cannot load the flat one.

- The bucket is the source of truth, listed directly (it cannot be routed).
- Where `unsupported` is empty — unsafe without a recorded reason — a build under every minor the image carries is required, rather than assuming one suffices.
- It reports how many were skipped, so an unexpectedly short list is visible rather than silent.
- It **fails when the bucket cannot be listed**, because an empty listing would make every object look unrepaired and silently restore the full rebuild.

## Verification

The predicate, exercised directly:

```
Rcpp   needs[4.4,4.6]      -> SKIP (repaired)
Rcpp   needs[4.4,4.5,4.6]  -> REBUILD     (4.5 missing)
yaml   needs[4.4]          -> SKIP (repaired)
lobstr needs[]             -> REBUILD     (no recorded minors: all required)
```

## Note

~70 packages fail to build regardless — `glmmTMB`, `tmbstan`, `OpenMx`, `Cyclops`, `RSiena`, `pdftools`, `odbc` among them — all on `uvr sync --install-system-deps`. They keep their unsafe flat binaries and stay broken for the minors they cannot load under. That is a missing-system-dependency problem in the build images, not an ABI one, and needs separate attention.

Reviewed-on: #207
2026-09-09 10:33:41 +00:00
ee4562d44c feat(abi): repair from the recorded verdicts rather than an ad-hoc scan (#206)
Some checks failed
ci/crow/manual/repair-unsafe-flat-objects/13 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/14 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/15 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/16 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/17 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/18 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/6 Pipeline is pending
ci/crow/manual/repair-unsafe-flat-objects/4 Pipeline is pending
ci/crow/cron/process-updates/17 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/5 Pipeline failed
ci/crow/cron/process-updates/5 Pipeline was successful
ci/crow/manual/repair-unsafe-flat-objects/11 Pipeline failed
ci/crow/manual/repair-unsafe-flat-objects/1 Pipeline failed
ci/crow/manual/repair-unsafe-flat-objects/3 Pipeline failed
ci/crow/cron/process-updates/7 Pipeline was successful
ci/crow/cron/process-updates/1 Pipeline was successful
ci/crow/cron/process-updates/9 Pipeline was successful
ci/crow/cron/process-updates/3 Pipeline was successful
ci/crow/cron/process-updates/13 Pipeline was successful
ci/crow/cron/process-updates/12 Pipeline was successful
ci/crow/cron/process-updates/15 Pipeline was successful
ci/crow/cron/process-updates/8 Pipeline was successful
ci/crow/cron/process-updates/11 Pipeline was successful
ci/crow/cron/process-updates/2 Pipeline was successful
ci/crow/cron/process-updates/14 Pipeline was successful
ci/crow/cron/process-updates/10 Pipeline was successful
ci/crow/cron/process-updates/16 Pipeline was successful
ci/crow/cron/process-updates/4 Pipeline was successful
ci/crow/cron/process-updates/6 Pipeline was successful
ci/crow/cron/process-updates/18 Pipeline was successful
## Why

The reprex found 44 routed-path failures: `Rcpp`, `Matrix` and `RJSONIO` served to R 4.4 from 4.5 builds. Two causes, both now fixed (#205 here, #129 in bincraft) — but the repair itself also needs redoing, and the lists it ran from no longer exist.

Those lists came from a one-off local symbol scan, seeded from a candidate set derived on a single slot. That made them a lower bound by construction: the scan found 846 package-slot pairs, while inspecting every object found **4077** unsafe.

`abi_flat_safety` now holds the authoritative answer for every slot, written by the flat-safety backfill from the binaries themselves:

```
95418 inspected, 91325 safe, 4077 unsafe (4.3%)
```

against the 93% of compiled packages the source classifier suspects.

## What it does

- `local/list-unsafe-flat-objects.R` prints the objects recorded as unable to load under some minor, for one slot.
- The workflow rebuilds each under **every** R minor installed in the image, with **no `--sensitive-only` gate**. Since bincraft v5.3.0 the destination is decided by the built binary's symbols, so a package needing a per-minor slot lands there and a portable one lands in the flat slot. Gating on the source classifier is exactly what let `Rcpp` slip through.

## Safety

It **fails loudly when a slot has no verdicts at all**, rather than printing an empty list. An empty repair list is indistinguishable from "nothing to repair" and would read as success while doing nothing — the same shape of silent failure as the missing `PGPASS`.

`crow lint` passes.

## After this

Run it fleet-wide, re-index, then re-run the reprex. The routed paths are the ones that must come back clean; the `flat` form's failures are the separate prune question.

Reviewed-on: #206
2026-09-07 18:46:50 +00:00