build-cran-binaries/local
Repository files (latest commit first)
Filename Latest commit message Latest commit date
pat-s 1c297c01bf feat(local): auto-propose registry patches and track the feedback loop (#117)
Implements steps 3 + 4 of #115, building on the classifier merged in #116. Now that bincraft **v4.4.3** applies registry `patch`/`makevars`/`configure_args` to the *target* package build (previously deps-only), a trial patched build is a meaningful acceptance gate, so the "propose" half is viable.

## Step 3 — propose, do not apply

- **`local/propose-patches.R`** — for each classified, safe fix affecting a package with no current registry entry, emits a pre-filled `registry.json` entry and validates the candidate set against a *temporary* merged registry (the real one is never touched unless asked).
  - default: print candidates + validation, **take no action**
  - `--write`: append entries to `registry.json` + the proposals ledger (you commit + open the PR)
  - `--open-issue`: post/update a Forgejo tracking issue (reuses the weekly-audit `httr2` + `FORGEJO_TOKEN` pattern)
- **`local/trial-build-patch.R`** — isolated bincraft build of one package with the registry applied (no upload/archive/metadata; `patchhash` keeps it out of the real cache). Exit 0/1, so it gates a CI step or manual pre-merge check.

The human gate stays: nothing merges. Acceptance = `validate-patches.R` passes (checked automatically) **and** the trial build succeeds. Novel source diffs and unknown signatures are never proposed (they carry `auto = FALSE`).

## Step 4 — feedback loop

- **`local/proposal-tracking.R`** (read-only) — signature hit rate (builds/pkgs/addressed/open per signature), proposed-vs-merged (a proposal counts merged once its package is in the registry), and retirement candidates (registry entries whose package no longer fails, i.e. likely fixed upstream).
- **`local/proposal-tracking-lib.R`** — the pure metric/ledger helpers.

## Supporting changes

- Refactored the classify helpers to expose a pure `build_triage_report()` + a list-returning entry builder; `failing-builds-report.R` now renders from the shared function (no behaviour change).
- `validate-patches.R` gains optional `PATCH_DIR`/`REGISTRY_FILE` overrides (backward-compatible) so a candidate registry can be validated in isolation.
- Documented the propose/trial-build/tracking workflow in `local/patches/README.md`.

## Verification

- 71 unit tests pass (incl. new `test-proposal-tracking-lib.R`) under the Dockerized R 4.5.3 build env.
- All pre-commit hooks pass (`air-format`, `validate-patches`, prettier, etc.).
- Smoke-tested all three entrypoints end-to-end with a stubbed DB: dry-run, `--write` (produces a registry that passes the canonical validator + a valid ledger, then reverted), and the tracker.

Closes #115

Reviewed-on: #117
2026-07-14 15:03:24 +00:00
..
patches feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
tests feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
archive-missed-pkgs.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
build-all.R fix(ci): bound pkgcache _metadata growth to stop macmini disk-fill (#110) 2026-07-13 09:31:29 +00:00
build-one.R feat: patch registry + wiring for per-package patching (#103) 2026-06-30 08:50:19 +00:00
check-cdn-cache.sh add alpine321 to scripts 2024-12-29 10:18:55 +01:00
check-NA.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
debug-packages-writing.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
detect-duplicates.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
excluded-packages.json feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
failing-builds-classify.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
failing-builds-report.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
fetch-rebuild-packages-from-issue.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
find-R-api-packages.sh chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
install-bincraft.R chore: resolve latest bincraft release dynamically (no hardcoded pins) (#107) 2026-07-01 08:10:02 +00:00
label-removed-cran-packages.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
last-processed-by-platform.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
migrate-s3-hetzner-to-backblaze.sh chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
missing-cran-packages-db.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
missing-cran-packages.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
missing-packages-in-index.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
packages-to-build.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
packages-without-any-binary.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
proposal-tracking-lib.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
proposal-tracking.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
propose-patches.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
query-pkgs-without-old-versions.R chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
r-minor-helpers.R fix(ci): bound pkgcache _metadata growth to stop macmini disk-fill (#110) 2026-07-13 09:31:29 +00:00
test-package-loading.R chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
trial-build-patch.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
validate-patches.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
weekly-missing-binaries-audit.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00