Repository navigation
feat: tell stale sessions to reload, skip unclearable challenges and block pages - #21
Merged
Merged
Conversation
…lock pages From a month of real usage: most failed reads came from a session still running refetch 0.3.0 days after 0.5.0 was installed, so the Wayback step never ran; headless Chrome spent 13 s on each of 5 challenges that never cleared; and a few rows were misclassified. - Stale sessions: the SessionStart note, fetch_page errors and doctor say when a newer refetch is installed next to the running one, and to run /reload-plugins or restart Claude Code. events.db records the refetch version on every row (schema v2, upgraded in place), and stats splits fetches by version when more than one shows up. - Challenges: headless Chrome gives a challenge 8 s to clear instead of the whole render timeout, and stops at once on a block page. - Block pages: Cloudflare's "you have been blocked", Imperva's incident page, F5 BIG-IP's rejection (served with HTTP 200) and Akamai's Access Denied are refusals, not challenges or pages: they skip headless Chrome and go to the Wayback Machine, and a snapshot of one is not a read. - Hook: Claude Code's own errors (usage limits, the auto mode classifier, a declined permission) are recorded as denied and get no nudge; a tiny reply from an API address is no longer "page needs JavaScript". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
==========================================
+ Coverage 92.62% 92.66% +0.03%
==========================================
Files 43 44 +1
Lines 3933 3994 +61
==========================================
+ Hits 3643 3701 +58
- Misses 288 291 +3
Partials 2 2
🚀 New features to boost your workflow:
|
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
A month of real usage (30 Oct – 29 Nov) showed refetch resolving only 5 of 12 failed reads it picked up. Checking each failure against the events DB, the transcripts and a replay through 0.5.0 found:
api.phpJSON replies were flagged as "page needs JavaScript".What changes
fetch_pageresults andrefetch doctorsay when a newer refetch is installed next to the running one, and to run/reload-pluginsor restart Claude Code. events.db records the refetch version on every row (schema v2, upgraded in place; older binaries keep writing to it).refetch statssplits fetches by version when more than one shows up.deniedand get no nudge. A tiny reply from an API address is no longer "page needs JavaScript".Verified
make test,make cover-check(92.5%) andmake lintpass. New tests cover block pages, the challenge cap (real Chrome), the v1→v2 migration with concurrent opens, the stale-plugin check and the hook cases.🤖 Generated with Claude Code