feat(local): detect dependency-cascade failures generally, not just RcppParallel

The first trial-build gate run correctly went red: the 10 auto-proposed
tbb-stddef packages (BFpack, BayesERtools, GMLTM, ...) all fail while building
their shared `rstan` dependency, not in their own code -- the `tbb/tbb_stddef.h`
error is in rstan's Module.cpp. So a per-package makevars entry is useless for
them; they are blocked on rstan (which already has an entry). This is the same
cascade the RcppParallel `applies_to` guard catches, but the tbb-stddef
signature is generic and had no such pin.

Add `failing_dependency(error_text, package)`: when the log shows a DIFFERENT
package failed to compile ("Failed to build source package X", "compilation
failed for package 'X'", ...), that package is the real cause. build_triage_report
now blocks any package whose every failing build is such a cascade -- reported
as blocked_on the dependency, never proposed a bogus entry. A package that fails
in its OWN compilation is still proposed. This unifies the applies_to and
data-driven cases into one `blocked_packages` / `blocked_on` model.

- report/proposer/blocked_summary now count the actually-blocked packages
- blocked note shows even when a group also has genuine proposals
- tests cover the rstan-cascade vs own-compile split (with the real log strings)
This commit is contained in:
Patrick Schratz 2026-07-15 21:33:54 +00:00
commit c98aaa548f
No known key found for this signature in database
GPG key ID: 62050D5BC68AB6DC

View file

@ -160,17 +160,22 @@ unclassified_summary <- function(report, max_groups = 30L, max_pkgs = 15L) {
)
}
# Groups blocked on a dependency (a package-specific fix pinned via `applies_to`
# whose dependents merely carry its error): report the dependency + how many
# dependents wait on it, so fixing it once is recognised as clearing the batch.
# Groups with packages blocked on a dependency (a package-specific fix pinned
# via `applies_to`, or a data-driven cascade where the package fails building a
# dependency): report the dependency + how many dependents wait on it, so fixing
# it once is recognised as clearing the batch.
blocked_summary <- function(report, max_pkgs = 15L) {
bl <- Filter(function(g) !is.null(g$blocked_on), report)
bl <- Filter(
function(g) length(g$blocked_packages %||% character(0L)) > 0L,
report
)
lapply(bl, function(g) {
pkgs <- g$blocked_packages
list(
blocked_on = g$blocked_on,
n_packages = length(g$packages),
packages = utils::head(g$packages, max_pkgs),
packages_truncated = length(g$packages) > max_pkgs
n_packages = length(pkgs),
packages = utils::head(pkgs, max_pkgs),
packages_truncated = length(pkgs) > max_pkgs
)
})
}