From 1b6e2b506ebdc989c590819e0faa4e30ac4c5f3f Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 14 Jul 2026 15:05:22 +0000 Subject: [PATCH] ci(crow): add weekly patch-proposal + feedback-loop pipeline Add `.crow/weekly-patch-proposals.yaml`, a single (non-matrix) job that runs the classifier over all of `single_builds` weekly: it posts/updates a Forgejo tracking issue with the auto-proposable registry entries via `propose-patches.R --open-issue`, then logs the step-4 metrics via `proposal-tracking.R`. Clones read-only; the only write is the issue. Register the `weekly-patch-proposals` cron in the crow UI, or trigger manually with `task=weekly-patch-proposals`. --- .crow/weekly-patch-proposals.yaml | 57 +++++++++++++++++++++++++++++++ local/patches/README.md | 5 +++ 2 files changed, 62 insertions(+) create mode 100644 .crow/weekly-patch-proposals.yaml diff --git a/.crow/weekly-patch-proposals.yaml b/.crow/weekly-patch-proposals.yaml new file mode 100644 index 0000000..8fa45df --- /dev/null +++ b/.crow/weekly-patch-proposals.yaml @@ -0,0 +1,57 @@ +# Weekly failure-triage proposals (issue #115, steps 3 + 4). +# Classifies the recorded `single_builds` failures and: +# 1. posts/updates a Forgejo tracking issue with the auto-proposable registry +# entries (human reviews, trial-builds, and opens the PR -- nothing merges), and +# 2. prints the feedback-loop metrics (signature hit rate, proposed-vs-merged, +# retirement candidates) to the run log. +# Global across platforms (the classifier groups over all of single_builds), so +# a single job -- no matrix. Clones read-only; the only write is the Forgejo +# issue via FORGEJO_TOKEN. +# +# Register the cron in the crow UI as `weekly-patch-proposals`, or run manually: +# woodpecker-cli pipeline create --var task=weekly-patch-proposals --branch=main 7 +when: + - event: manual + evaluate: 'task == "weekly-patch-proposals"' + - event: cron + cron: weekly-patch-proposals + +skip_clone: true + +labels: + group: rpkgs-amd64 + +steps: + - name: 'Propose registry patches + track feedback loop' + image: reg.devxy.io/rpkgs/build-env-alpine:3.24 + pull: true + environment: + PGPASS: + from_secret: PGPASS + REPO_RO_TOKEN: + from_secret: REPO_RO_TOKEN + FORGEJO_TOKEN: + from_secret: FORGEJO_TOKEN + R_VERSION: 4.5.3 + R_LIBS_USER: /mnt/cache/R-pkgs + commands: + - git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git . + - mkdir -p /mnt/cache/R-pkgs + - rm -rf /mnt/cache/R-pkgs/00LOCK-* + - /opt/R/$R_VERSION/bin/R -q -e 'pak::pak(c("httr2", "jsonlite"))' + - /opt/R/$R_VERSION/bin/Rscript local/propose-patches.R --open-issue + - /opt/R/$R_VERSION/bin/Rscript local/proposal-tracking.R + backend_options: + kubernetes: + resources: + requests: + memory: 1Gi + cpu: 2000m + limits: + memory: 2Gi + cpu: 2000m + tolerations: + - key: 'CI' + operator: 'Equal' + value: 'true' + effect: 'NoSchedule' diff --git a/local/patches/README.md b/local/patches/README.md index 7dd769c..e875217 100644 --- a/local/patches/README.md +++ b/local/patches/README.md @@ -93,3 +93,8 @@ PGPASS=... Rscript local/proposal-tracking.R --json metrics.json ``` The pure metric/ledger helpers live in `local/proposal-tracking-lib.R` and are covered by `local/tests/test-proposal-tracking-lib.R`. + +### Scheduled run + +`.crow/weekly-patch-proposals.yaml` runs both steps weekly (register the `weekly-patch-proposals` cron in the crow UI): it posts/updates a Forgejo tracking issue with the auto-proposable entries and logs the feedback-loop metrics. +It clones read-only; the only write is the tracking issue.