mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
fix(launch): back off build retries on GitHub limits, dedupe fetcher misses, no ad hoc render before first build
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -719,6 +719,20 @@ def test_query_override_without_params_uses_cached_composite(client):
|
||||
assert b"<svg>cached</svg>" in r.data
|
||||
|
||||
|
||||
def test_query_override_skips_adhoc_render_before_first_build(client):
|
||||
"""With no build landed yet the fetcher likely has no data, so an ad hoc
|
||||
render would start a GitHub fetch per request. Serve the building
|
||||
placeholder instead."""
|
||||
dbmod.enroll("alice", {"theme": "midnight"})
|
||||
|
||||
with patch("src.worker.render_composite_adhoc") as adhoc:
|
||||
r = client.get("/api/alice?theme=onyx&widgets=name,grade")
|
||||
assert adhoc.call_count == 0
|
||||
|
||||
assert r.status_code == 200
|
||||
assert r.headers["X-Widget-Status"] == "building"
|
||||
|
||||
|
||||
def test_query_override_ignores_unknown_params(client):
|
||||
"""Keys not in the allow-list are dropped by sanitize_settings_query so
|
||||
bogus query strings don't trigger the expensive ad-hoc path."""
|
||||
|
||||
Reference in New Issue
Block a user