Pipeline for managing PR's in high volume GitHub repositories.
Scrapes PR, Issue and Contributor data in to a dataset, performs analysis and publishes a dashboard.
The pipeline stages are:
- Scrape - Collect data from the Github Repository
- Contributor Report - Look at contributors recent history.
- Analyze - Cluster PRs and Issues on
- Scope - Cluster PRs on overlapping repository areas.
- Dashboard Export - Export data in JSON format to populate a browsing dashboard
- Publish Dashboard - Build a dashboard and deploy it in a Hugging Face Space.
To run a scrape you need to configure:
- The GitHub Repository ID
- A valid GitHub PAT with API access.
uv run slop-farmer scrape --repo huggingface/diffusers --output-dir runs/diffusers/data
This scans the dataset for Contributors and provides a short profile of their recent public commit history and merged PR rate.
Cluster PRs and Issue Content. Choice of deterministic or LLM supplemented algorithm.
When ranking_backend=hybrid, analysis writes reusable LLM review cache entries under
<snapshot>/analysis-state/. If you enable YAML config setting
analysis.cached_analysis: true, analyze will automatically copy analysis-state/
forward from the previous snapshot when the new snapshot does not already have it, then
log a cache-hit summary for the run. This is useful for incremental scrapes where many
review units are unchanged and can safely reuse cached hybrid decisions.
To push that local cache back to the dataset repo for future remote-first runs, use either:
publish-analysis-artifacts --save-cacheduring canonical analysis publicationsave-cacheto uploadanalysis-state/on its own
Hybrid review execution is bounded-parallel. Use --hybrid-llm-concurrency N or
analysis.hybrid_llm_concurrency: N to cap concurrent review units. 1 keeps the
lowest provider pressure; higher values can reduce wall-clock time at the cost of more
provider pressure.
Cluster PRs by touched repository areas.
Export the report, and publish a dashboard.
uv run slop-farmer scrape \
--repo huggingface/transformers \
--output-dir data \
--max-issues 200 \
--max-prs 50To refresh the canonical dataset repo:
uv run slop-farmer --config configs/transformers.yaml refresh-datasetrefresh-dataset publishes raw tables plus cheap artifacts like:
new_contributors.parquetnew-contributors-report.jsonnew-contributors-report.mdpr-scope-clusters.json
To publish expensive hybrid analysis artifacts after a local analyze run:
uv run slop-farmer --config configs/transformers.yaml publish-analysis-artifacts \
--canonical \
--save-cacheThis writes an immutable archived run under
snapshots/<snapshot_id>/analysis-runs/<analysis_id>/... and, with --canonical,
updates the stable analysis/current/ alias. With --save-cache, it also uploads the
snapshot-local analysis-state/ directory to repo-root analysis-state/ as mutable
operational cache for future hybrid runs.
If --analysis-id is omitted, slop-farmer derives a stable default from the
analysis backend, model, and snapshot id.
To upload only the cache without publishing canonical analysis:
uv run slop-farmer --config configs/transformers.yaml save-cache \
--snapshot-dir runs/transformers-recent-60d/data/snapshots/20260418T170534ZThe scraper now stores a local watermark at data/state/watermark.json and resumes from it by default when --since is not provided.
uv run slop-farmer scrape \
--repo huggingface/transformers \
--output-dir data \
--fetch-timelineOn the first run, this creates a full snapshot. On later runs against the same --output-dir, it uses the last successful watermark, fetches only changed records, merges them into the previous snapshot locally, and writes a new full latest snapshot.
To ignore the watermark and force a fresh full run:
uv run slop-farmer scrape \
--repo huggingface/transformers \
--output-dir data \
--no-resumeAuthentication defaults:
- GitHub:
GITHUB_TOKEN, thengh auth token - Hugging Face:
HF_TOKEN, otherwise existinghf authlogin
dataset_id is the canonical latest dataset repo.
Use the remote-first writer:
uv run slop-farmer --config configs/transformers.yaml refresh-datasetOr submit the generic HF Job wrapper:
scripts/submit_dataset_job.shBy default this creates a scheduled HF Job that:
- reads
CONFIG_PATH(defaults toconfigs/transformers.yaml) - refreshes
dataset_idincrementally against the current Hub dataset state - regenerates the new contributor report
- uploads the updated snapshot back to the dataset repo
Useful overrides:
# fire once immediately instead of creating a schedule
MODE=run scripts/submit_dataset_job.sh
# change the cron schedule
SCHEDULE="0 */6 * * *" scripts/submit_dataset_job.sh
# optionally mount a writable HF bucket for temp files
SCRATCH_BUCKET=evalstate/slop-farmer-scratch \
scripts/submit_dataset_job.shBuckets are best treated here as optional scratch space via TMPDIR, not as the canonical
published dataset. The repo's local analysis and PR-scope tooling already knows how to
materialize versioned Hub dataset repos; it does not currently read HF buckets directly.
Compatibility wrappers remain available:
scripts/submit_transformers_dataset_job.shscripts/submit_diffusers_dataset_job.shscripts/submit_openclaw_dataset_job.shscripts/submit_transformers_analysis_job.shscripts/submit_openclaw_analysis_job.sh
For the current storage model and recommended modes, see
docs/data-architecture.md.
You can analyze the published Hugging Face dataset directly without scraping GitHub again:
uv run slop-farmer analyze \
--snapshot-dir eval_data/snapshots/gh-live-latest-1000x1000 \
--ranking-backend hybrid \
--model "gpt-5.4-mini?service_tier=flex" \
--output /tmp/gh-live-latest-1000x1000-hybrid.jsonThis materializes the dataset-viewer parquet export into a local snapshot cache under
eval_data/snapshots/ and writes a local analysis report next to it. Publishing
canonical hybrid analysis is a separate publish-analysis-artifacts step, and updating
the remote hybrid cache source is publish-analysis-artifacts --save-cache or
standalone save-cache.
Repo-local defaults for analyze can be stored in pyproject.toml under [tool.slop-farmer.analyze]. This repo currently defaults to:
dashboard-data.output-dir = "web/public/data"
For repo-specific remote-first analysis, prefer a YAML config with dataset_id, e.g.:
uv run slop-farmer --config configs/openclaw.yaml analyzeYou can also build holistic PR scope clusters from an existing snapshot:
uv run slop-farmer pr-scope \
--snapshot-dir data/snapshots/20260324T150154ZBy default this writes pr-scope-clusters.json next to the snapshot.
List only the duplicate PR clusters that pass the mergeability gate:
uv run slop-farmer duplicate-prs list \
--report eval_data/snapshots/gh-live-latest-1000x1000/analysis-report-hybrid.jsonThen synthesize and publish one minimal upstream PR from the top-ranked mergeable cluster:
uv run slop-farmer duplicate-prs merge \
--report eval_data/snapshots/gh-live-latest-1000x1000/analysis-report-hybrid.json \
--repo-dir /path/to/transformersIf your local checkout uses a fork as origin, point the merge flow at the upstream remote explicitly and relax the file policy when needed:
uv run slop-farmer duplicate-prs merge \
--report eval_data/snapshots/gh-live-latest-1000x1000/analysis-report-hybrid.json \
--repo-dir /path/to/transformers \
--upstream-repo huggingface/transformers \
--upstream-remote upstream \
--fork-repo YOURNAME/transformers-minimal \
--fork-remote origin \
--file-policy allow-docsIf an older dataset keeps its richest data under _checkpoints/<snapshot_id>/,
you can promote one of those checkpoints into a normal local snapshot:
uv run slop-farmer import-hf-checkpoint \
--source-repo-id burtenshaw/transformers-pr-slop-dataset \
--output-dir eval_dataBy default this selects the latest viable checkpoint, writes a clean snapshot
under eval_data/snapshots/, and regenerates links.parquet,
issue_comments.parquet, and pr_comments.parquet.
You can turn an existing analysis report into a human-readable markdown file without rerunning clustering:
uv run slop-farmer markdown-report \
--input eval_data/snapshots/hf-latest-100x100/analysis-report-hybrid.jsonBy default this writes analysis-report-hybrid.md next to the JSON and uses the JSON parent directory as the snapshot source for issue and PR titles, links, and latest-activity ordering.
You can also render a reviewer-facing markdown report for contributors who are still new to the repo snapshot:
uv run slop-farmer new-contributor-report \
--snapshot-dir data/snapshots/20260324T000000ZBy default this writes:
new_contributors.parquetnew-contributors-report.mdnew-contributors-report.json
next to the snapshot, including GitHub profile links, repo issue/PR search links, and example authored artifacts.
For canonical upkeep, prefer the explicit sequence:
refresh-datasetanalyzepublish-analysis-artifacts --save-cachedashboard-data- deploy dashboard and API if needed
Before committing or wiring new package moves into automation, run:
uv run python scripts/enforce_packaging.py
uv run python scripts/check_hf_cli_secrets.py
uv run --extra dev ruff format --check src tests scripts jobs
uv run --extra dev ruff check src tests scripts jobs
uv run --extra dev ty check src tests scripts jobs
uv run --extra dev pytest -qscripts/enforce_packaging.py verifies the coarse package boundaries:
datamust not importappdatamust not importreportsreportsmust not importapp
scripts/check_hf_cli_secrets.py rejects hf ... --secrets NAME=value so access
tokens cannot be exposed via process argv.
You can keep repo-specific pipeline defaults in a YAML file and apply them to all
commands with --config.
Example: configs/diffusers.yaml
repo: huggingface/diffusers
workspace: runs/diffusers
dataset_id: evalstate/diffusers-pr
pull-requests:
template_cleanup:
mode: merge_defaults
line_patterns:
- '^d(?:o not merge|ontmerge)\.?$'
cluster_suppression_rules:
- id: diffusers_post_release
title_patterns:
- '\bpost[- ]release\b'
dashboard:
space_id: evalstate/diffusers-dashboard
title: Diffusers Dashboard
window_days: 60
contributor_window_days: 60
contributor_max_authors: 0
analysis:
model: gpt-5.4-mini
ranking_backend: hybrid
cached_analysis: true
scrape:
fetch-timeline: trueThen commands stay aligned without repeating repo/workspace/window settings:
uv run slop-farmer --config configs/diffusers.yaml refresh-dataset
uv run slop-farmer --config configs/diffusers.yaml analyze
uv run slop-farmer --config configs/diffusers.yaml pr-scope
uv run slop-farmer --config configs/diffusers.yaml pr-search refresh
uv run slop-farmer --config configs/diffusers.yaml new-contributor-report
uv run slop-farmer --config configs/diffusers.yaml dashboard-data
uv run slop-farmer --config configs/diffusers.yaml deploy-dashboard --refresh-contributors
uv run slop-farmer --config configs/diffusers.yaml dataset-statusThose reader commands default to dataset_id when configured. Pass --snapshot-dir to force
an explicit local snapshot instead.
analysis-state/ is mutable operational cache only. You can upload it to the dataset
repo with save-cache or publish-analysis-artifacts --save-cache, but it is still not
the canonical analysis read surface.
You can export a slim JSON bundle for the React dashboard:
uv run slop-farmer dashboard-data \
--snapshot-dir data/snapshots/20260324T150154Z \
--output-dir web/public/data \
--window-days 14This writes:
summary.jsonclusters.jsonprs.jsoncontributors.json
The dashboard is intentionally summary-first and links out to GitHub for deep detail.
When --analysis-input is omitted, dashboard-data now prefers:
analysis/current/manifest.jsonanalysis/current/analysis-report-hybrid.json- snapshot-local fallback only when canonical current analysis is absent
If the canonical current manifest exists but the required artifact is missing, dashboard export fails loudly instead of silently drifting to snapshot-local analysis.
Use the generic deploy script:
SPACE_ID=evalstate/openclaw-pr-report \
PIPELINE_DATA_DIR=runs/openclaw/data \
SNAPSHOT_DIR=runs/openclaw/data/snapshots/20260324T233649Z \
SPACE_TITLE="OpenClaw PR Report" \
DATASET_ID=evalstate/openclaw-pr \
scripts/deploy_dashboard_space.shRepo-specific wrappers are also available:
scripts/deploy_transformers_dashboard_space.shscripts/deploy_openclaw_dashboard_space.sh
Or use the CLI wrapper with a YAML config:
uv run slop-farmer --config configs/diffusers.yaml deploy-dashboard --refresh-contributorsThe repo includes the FastAPI service for the read-oriented PR similarity surface.
The standalone pr-search client now lives in the downstream pr-search-cli
package.
Repo-specific wrappers are available for the current deployed APIs:
scripts/update_diffusers_pr_search_api.sh
scripts/update_transformers_pr_search_api.sh
scripts/update_openclaw_pr_search_api.shOr use the generic deploy script directly:
SPACE_ID=evalstate/transformers-pr-api \
SPACE_TITLE="Transformers PR API" \
DEFAULT_REPO=huggingface/transformers \
GHR_BASE_URL=https://ghreplica.dutiful.dev \
HF_REPO_ID=evalstate/transformers-pr \
BUCKET_ID=evalstate/transformers-pr-api-data \
scripts/deploy_pr_search_space.shThis deploy flow:
- creates or updates a Docker Space
- uploads a minimal app bundle with a generated Space
README.md - sets runtime variables for the API
- mounts the configured HF bucket at
/dataas mutable operational cache only
Serving defaults:
- dataset repo = canonical published state
- API materializes one self-consistent dataset view
- canonical
analysis/current/is the default analysis surface when present - archived analysis is selectable explicitly with
snapshot_id+analysis_id
After the Space is live, you can query it either through the in-repo admin CLI:
uv run slop-farmer pr-search status --repo huggingface/transformers
uv run slop-farmer pr-search similar 44940 --repo huggingface/transformersOr through the downstream pr-search-cli package, which owns the standalone
pr-search executable.
To move Transformers onto the current architecture:
CONFIG_PATH=configs/transformers.yaml \
LABEL=transformers-dataset-refresh \
SCHEDULE='@daily' \
scripts/submit_transformers_dataset_job.shThis is the canonical scheduled writer for raw/latest dataset state.
MODE=run scripts/submit_transformers_analysis_job.shThat sequence:
- refreshes the canonical dataset
- runs
analyzewith config-driven defaults - publishes canonical
analysis/current/ - saves repo-root
analysis-state/for future hybrid cache reuse - restarts the Transformers API Space so it materializes the newest published state
scripts/update_transformers_pr_search_api.shOptional runtime bucket:
- default wrapper bucket id:
evalstate/transformers-pr-api-data - treat it as mutable operational cache only, not canonical published storage