Skip to content

Make the ad network niche sorter recover from bad batches and run daily - #84

Merged
RaviTejaKNTS merged 2 commits into
mainfrom
feat/ad-network-eligibility-finder
Oct 23, 2026
Merged

RaviTejaKNTS merged 2 commits into
mainfrom
feat/ad-network-eligibility-finder

Conversation

@RaviTejaKNTS

Copy link
Copy Markdown
Collaborator

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 reports partial. 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.
  • Timer moves from weekly to daily at 11:30 IST, with stack127_docs/monitoring.json and 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

@RaviTejaKNTS
RaviTejaKNTS merged commit cc3bc99 into main Oct 23, 2026
4 checks passed

This branch was previously deployed

1 inactive deployment
production — c9459ca5 Deployed Oct 23, 2026 by RaviTejaKNTS via verify-production-build #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant