feat(local): classify failing binary builds and pre-fill registry suggestions #116

Merged
pat-s merged 1 commit from t3code/missing-package-binaries into main 2026-07-14 14:45:25 +00:00
Owner

Implements steps 1 + 2 of #115: turn recorded build failures into triaged patch suggestions instead of hand-scraping Crow logs.

What this adds

A read-only reporting pipeline over the single_builds metadata table. It never writes to the DB or the registry.

  • local/failing-builds-classify.R — pure, DB-free helpers:
    • normalise_error() strips temp paths, version numbers, hex addresses, and the package name so the same root cause collapses to one fingerprint.
    • fingerprint_error() extracts the salient error line and normalises it.
    • classify_error() matches against a seed signature set; unmatched errors are never guessed at.
    • propose_registry_entry() renders a schema-valid registry.json entry.
  • local/failing-builds-report.R — entrypoint: queries single_builds WHERE error_occurred = TRUE AND removed = FALSE, groups by root cause (signature when classified, fingerprint otherwise), classifies each group, and prints a triaged report. Flags: --platform, --arch, --min, --json; PLATFORM/ARCH env fallbacks.
  • local/tests/test-failing-builds-classify.R — unit tests for the helpers.
  • local/patches/README.md — documents the workflow.

Seed signatures

Each rule carries a fix tier, confidence, and an auto/human-only flag:

Signature Fix Disposition
tbb/tbb_stddef.h: No such file makevars -DTBB_INTERFACE_NEW auto-proposable
RcppParallel bundled TBB (musl / new g++) curated disable-tbb.patch auto-proposable
system libuv.so link leak force vendored/static lib human triage (novel source diff)
unmatched none human triage

Guardrails honored

  • No autonomous novel source diffs: only known env/makevars levers and already-curated package patches are auto-proposable; anything needing a brand-new diff, and any unknown signature, is routed to human triage.
  • No DB or registry writes; no change to the public src/contrib index.
  • Reuses single_builds.error_text; no new failure-capture pipeline.

Verification

  • All helper unit tests pass under the Dockerized R 4.5.3 build env.
  • Pre-commit hooks pass (air-format, validate-patches, prettier, etc.).
  • Smoke-tested the full report path with a stubbed DB; generated proposals pass the real local/validate-patches.R.

Steps 3 (auto-open PRs) and 4 (feedback loop) are intentionally deferred, per the issue's suggestion to validate the signature set first.

Closes #115

Implements steps 1 + 2 of #115: turn recorded build failures into triaged patch suggestions instead of hand-scraping Crow logs. ## What this adds A **read-only** reporting pipeline over the `single_builds` metadata table. It never writes to the DB or the registry. - `local/failing-builds-classify.R` — pure, DB-free helpers: - `normalise_error()` strips temp paths, version numbers, hex addresses, and the package name so the same root cause collapses to one fingerprint. - `fingerprint_error()` extracts the salient error line and normalises it. - `classify_error()` matches against a seed signature set; unmatched errors are never guessed at. - `propose_registry_entry()` renders a schema-valid `registry.json` entry. - `local/failing-builds-report.R` — entrypoint: queries `single_builds WHERE error_occurred = TRUE AND removed = FALSE`, groups by root cause (signature when classified, fingerprint otherwise), classifies each group, and prints a triaged report. Flags: `--platform`, `--arch`, `--min`, `--json`; `PLATFORM`/`ARCH` env fallbacks. - `local/tests/test-failing-builds-classify.R` — unit tests for the helpers. - `local/patches/README.md` — documents the workflow. ## Seed signatures Each rule carries a fix tier, confidence, and an auto/human-only flag: | Signature | Fix | Disposition | | --- | --- | --- | | `tbb/tbb_stddef.h: No such file` | makevars `-DTBB_INTERFACE_NEW` | auto-proposable | | RcppParallel bundled TBB (musl / new g++) | curated `disable-tbb.patch` | auto-proposable | | system `libuv.so` link leak | force vendored/static lib | **human triage** (novel source diff) | | unmatched | none | **human triage** | ## Guardrails honored - No autonomous novel source diffs: only known env/makevars levers and already-curated package patches are auto-proposable; anything needing a brand-new diff, and any unknown signature, is routed to human triage. - No DB or registry writes; no change to the public `src/contrib` index. - Reuses `single_builds.error_text`; no new failure-capture pipeline. ## Verification - All helper unit tests pass under the Dockerized R 4.5.3 build env. - Pre-commit hooks pass (`air-format`, `validate-patches`, prettier, etc.). - Smoke-tested the full report path with a stubbed DB; generated proposals pass the real `local/validate-patches.R`. Steps 3 (auto-open PRs) and 4 (feedback loop) are intentionally deferred, per the issue's suggestion to validate the signature set first. Closes #115
Implement steps 1 + 2 of issue #115: turn recorded build failures into
triaged patch suggestions instead of hand-scraping Crow logs.

- add local/failing-builds-classify.R with pure, DB-free helpers to
  normalise error_text into a stable fingerprint and classify it against a
  seed signature set (removed tbb_stddef.h, RcppParallel bundled TBB,
  system libuv link leak), each carrying a fix tier, confidence, and an
  auto/human-only flag
- add local/failing-builds-report.R, a read-only entrypoint that queries
  single_builds WHERE error_occurred, groups by root cause, classifies
  each group, and prints (optionally emits JSON) a triaged report with a
  pre-filled registry.json entry for known, safe fix levers only
- keep novel source diffs and unknown signatures routed to human triage,
  per the issue guardrails; never write to the DB or the registry
- cover the helpers with local/tests/test-failing-builds-classify.R and
  document the workflow in local/patches/README.md
pat-s merged commit f11ba7172f into main 2026-07-14 14:45:25 +00:00
pat-s deleted branch t3code/missing-package-binaries 2026-07-14 14:45:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/build-cran-binaries!116
No description provided.