You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff916c8
Browse filesBrowse the repository at this point in the historyBrowse files
fix(feeds): retry a refused feed at its commit, and fail over fast when GitHub is unreachable
Three findings from a refuting review of the feed mirror and the signature
retry.
The retry after a signature refusal appended ?cb=<nanoTime>. Live headers
show raw.githubusercontent.com and jsDelivr both leave the query out of the
cache key (X-Cache: HIT, Source-Age continuing), so the retry re-read the same
stale body and signature, up to 16 MB for the database. It now asks GitHub
for the commit the branch points to (one small API call, Accept:
application/vnd.github.sha) and fetches both files at /<sha>/, a path whose
body and signature always come from one publish. A mirror gets no second try.
The test fake served a fresh copy to any URL with a "?", which is how the
no-op passed. It now ignores queries like the real CDN.
A blackholed GitHub cost about 90 s per file (the default-branch lookup, then
main and master at 30 s each) before the mirror was asked, so a 256-shard
sync could never finish. A network-level GitHub failure (timeout, refused or
unreachable connection, a name that won't resolve) now puts the mirror first
for ten minutes, a failed default-branch lookup isn't repeated for ten
minutes, and each call has a five-minute ceiling. An HTTP answer, a 404
included, doesn't count as unreachable.
FeedMirror was filled asynchronously at process start, so a worker in a cold
process could build its sources before the setting arrived and skip the
mirror. The app marks the setting as loading before it reads it, and a fetch
waits up to three seconds for it.
The Settings text, README and data README said GitHub is always tried first
and that a mirror "can't change what you get". Both are now accurate: GitHub
goes first except right after it couldn't be reached, and a mirror can't
alter the data but can hold back updates.
Tests: GitHubDataSourceFetchTest's two past-cache tests become commit-retry
tests, plus a refusal that stands when the commit can't be resolved, a mirror
copy that isn't retried, the outage window opening and closing, a 404 not
counting, the branch lookup not repeating, and a fetch waiting for the mirror
setting. FeedMirrorTest covers the wait, no wait when nothing loads, the
timeout, and a failed read. Eight mutants are each killed by name.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -558,7 +558,7 @@ by locale and message type without shipping personal data:
558
558
- Selective backup/restore for rules, non-secret settings, and opt-in logs, plus CSV log export and auto-cleanup (7/14/30/90 days)
559
559
- Database sync every 6 hours, a trending-feed check every 30 minutes, and a daily digest notification
560
560
- External blocklist subscriptions (Settings > External blocklists) take HTTPS CSV, TXT or JSON number lists of up to 1 MB and 20,000 rows. Each list is fetched again once a day, or on the interval it declares in its header (`# Expires: 12 hours`, or `"expires": "12h"` in JSON), never more often than every six hours and at least weekly. A download that comes back empty or with under half the list's numbers isn't applied in the background. The list keeps its last good copy and says why on its row. Each row shows the list's name, the host it comes from, how many numbers it holds and when it last updated, and TalkBack reads it as one item. Tap a row to switch its list off or on. Removing a list takes its numbers out straight away, and Undo puts both back without downloading the list again
561
-
- If GitHub is blocked where you live, Settings > Feed mirror takes a second address for the protection data. CallShield asks GitHub first, then the mirror, then falls back to the copy bundled with the app. One tap fills in jsDelivr (`https://cdn.jsdelivr.net/gh/SysAdminDoc/CallShield@master/`), which serves the same files and can run up to 12 hours behind. Mirrored files go through the same signature check, so a mirror can't change what you get. [data/README.md](data/README.md#mirrors-and-recovery) covers running your own
561
+
- If GitHub is blocked where you live, Settings > Feed mirror takes a second address for the protection data. CallShield asks GitHub first, then the mirror, then falls back to the copy bundled with the app. For ten minutes after GitHub couldn't be reached at all, the mirror goes first. One tap fills in jsDelivr (`https://cdn.jsdelivr.net/gh/SysAdminDoc/CallShield@master/`), which serves the same files and can run up to 12 hours behind. Mirrored files go through the same signature check, so a mirror can't alter the data, though it can hold back updates. [data/README.md](data/README.md#mirrors-and-recovery) covers running your own
562
562
- Quick Settings tile, app shortcuts, home screen widget
563
563
- Protection test validates all layers and permissions, including checker errors and deadline cutoffs
564
564
- Rules surface priority conflicts after sync and edits, with the winning rule and a review path
0 commit comments