feat(local): auto-propose registry patches and track the feedback loop #117
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/propose-patches-and-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements steps 3 + 4 of #115, building on the classifier merged in #116. Now that bincraft v4.4.3 applies registry
patch/makevars/configure_argsto 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-filledregistry.jsonentry and validates the candidate set against a temporary merged registry (the real one is never touched unless asked).--write: append entries toregistry.json+ the proposals ledger (you commit + open the PR)--open-issue: post/update a Forgejo tracking issue (reuses the weekly-audithttr2+FORGEJO_TOKENpattern)local/trial-build-patch.R— isolated bincraft build of one package with the registry applied (no upload/archive/metadata;patchhashkeeps 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.Rpasses (checked automatically) and the trial build succeeds. Novel source diffs and unknown signatures are never proposed (they carryauto = 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.Scheduled pipeline
.crow/weekly-patch-proposals.yaml— a single (non-matrix) job that runs both steps weekly: posts/updates the Forgejo tracking issue viapropose-patches.R --open-issue, then logs the step-4 metrics viaproposal-tracking.R. Clones read-only; the only write is the tracking issue. Register theweekly-patch-proposalscron in the crow UI, or trigger manually withtask=weekly-patch-proposals.Supporting changes
build_triage_report()+ a list-returning entry builder;failing-builds-report.Rnow renders from the shared function (no behaviour change).validate-patches.Rgains optionalPATCH_DIR/REGISTRY_FILEoverrides (backward-compatible) so a candidate registry can be validated in isolation.local/patches/README.md.Verification
test-proposal-tracking-lib.R) under the Dockerized R 4.5.3 build env.air-format,validate-patches,yamllint, prettier, etc.).--write(produces a registry that passes the canonical validator + a valid ledger, then reverted), and the tracker.Closes #115