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:
shay
2026-11-30 09:11:03 -08:00
co-authored by Claude Opus 5.5
parent d907815f19
commit d4b4a8bc52
8 changed files with 147 additions and 4 deletions
+14
View File
@@ -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."""