Cuts how much of Tangled's API the helper uses, so it leaves more of the per-IP rate limit for your other tools. Before, every refresh re-listed every watched repo, about 47 requests to api.tangled.org. Most refreshes are triggered by a Jetstream event that names one repo, about 50 an hour on your watch list. In your live log that peaked at 135 requests a minute.
Two commits:
- Fewer refreshes. A push now counts only if it moves a branch an open PR targets, and a collaborator grant only if a watched account gains a repo, not when an agent is added to repos you already watch. Replaying 3 hours of your real Jetstream traffic, event-driven refreshes dropped from 54 to 42.
- Cheaper refreshes. A refresh an event asked for reuses every list the event didn't change (
Client.keptList). So a PR opened, revised or commented on in one repo re-lists that repo, not all 22. A changed list stays changed for 90 s, so the recheck after the event asks again too. The 15-minute poll, a manual refresh and a Jetstream reconnect still ask for everything, so nothing can drift for long.
Measured live for 6 minutes against permadeath.com and lance.blue: after the cold start, the two event-driven refreshes cost 9 requests and 1 request, against ~47 each before, with no 429s. For review: the engine's start effect gains fresh, and a new listsChanged effect names the lists an event changed. Tracked gains each repo's target branches with their known heads. Tests: tests/relevance.test.js and tests/kept-lists.test.js; 94 pass. This largely does #20, though a refresh still runs the whole pipeline over the reused lists.
🤖 Generated with Claude Code