feat(local): report unclassified and dependency-blocked failures for discovery
The proposer issue only lists auto-proposable fixes (currently the TBB signatures), so every failure without a signature -- and every group blocked on a dependency build -- was invisible unless someone read the run log. That hid the classifier's blind spots and, with them, which new signatures are worth adding next. Extend the tracker to surface those blind spots and give them the same visibility as the proposals: - add pure `unclassified_summary()` (unknown-signature groups ranked by build count, capped with an explicit dropped count) and `blocked_summary()` helpers - print both sections in proposal-tracking.R and add a `--open-issue` mode that posts/updates a "Unclassified build failures (needs signatures)" Forgejo issue - run the tracker with --open-issue in the weekly crow pipeline (second issue) - cover the new helpers with tests and document the flow in the patches README
This commit is contained in:
parent
9bc4973159
commit
6ed17f3fb1
1 changed files with 278 additions and 15 deletions
|
|
@ -131,4 +131,48 @@ retirement_candidates <- function(registry_entries, failing_pkgs) {
|
|||
vapply(keep, function(e) as.character(e$package), character(1L))
|
||||
}
|
||||
|
||||
# Discovery view: the failure groups the classifier could NOT auto-propose, so
|
||||
# they get the same visibility as proposals. `report` is a build_triage_report
|
||||
# result. Returns the unclassified groups (unknown signature -> candidates for a
|
||||
# new signature) ranked by build count, capped to `max_groups`, each with up to
|
||||
# `max_pkgs` example packages. `dropped_groups`/`packages_truncated` record any
|
||||
# cap so nothing is silently hidden.
|
||||
unclassified_summary <- function(report, max_groups = 30L, max_pkgs = 15L) {
|
||||
un <- Filter(function(g) !isTRUE(g$matched), report)
|
||||
un <- un[order(-vapply(un, function(g) g$build_count, integer(1L)))]
|
||||
shown <- utils::head(un, max_groups)
|
||||
groups <- lapply(shown, function(g) {
|
||||
pkgs <- g$packages
|
||||
list(
|
||||
fingerprint = g$fingerprint,
|
||||
build_count = g$build_count,
|
||||
n_packages = length(pkgs),
|
||||
packages = utils::head(pkgs, max_pkgs),
|
||||
packages_truncated = length(pkgs) > max_pkgs,
|
||||
platforms = g$platforms
|
||||
)
|
||||
})
|
||||
list(
|
||||
groups = groups,
|
||||
total_groups = length(un),
|
||||
dropped_groups = max(0L, length(un) - length(shown)),
|
||||
total_builds = sum(vapply(un, function(g) g$build_count, integer(1L)))
|
||||
)
|
||||
}
|
||||
|
||||
# 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.
|
||||
blocked_summary <- function(report, max_pkgs = 15L) {
|
||||
bl <- Filter(function(g) !is.null(g$blocked_on), report)
|
||||
lapply(bl, function(g) {
|
||||
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
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
`%||%` <- function(a, b) if (is.null(a)) b else a
|
||||
|
|
|
|||
Loading…
Reference in a new issue