Repository navigation
Make the ad network niche sorter recover from bad batches and run daily - #84
Merged
Merged
Conversation
RaviTejaKNTS
temporarily deployed
to
production
October 23, 2026 11:13 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The homelab niche sorter failed every run since Oct 21. One bad model answer or a dropped domain stopped the whole run, and the weekly cadence (3,000 sites a run) can't keep up with new sites from the hourly checks and Tuesday discovery.
What changes
scripts/ad-networks/niche-sort.mjs: bounded retry and batch splitting (100 → 50 → 25). Partial imports are kept, unresolved sites are counted, and the run reportspartial. No retry on an operator stop, database failure, login failure, or usage limit. Abort checks before lock retries, updates, and commit. CLI errors carry only sanitized stderr, never model output.stack127_docs/monitoring.jsonand the maintenance docs updated to match.Review
Sol reviewed 815fa0c (pass with two fixes: abort during import, stdout in errors) and re-reviewed c9459ca (pass). 24 focused tests and
npm run quality(116 tests) pass.After merge
Update the homelab checkout and reinstall the timer. The backlog run waits for the Claude CLI login on homelab to be restored.
🤖 Generated with Claude Code