- Drop the os.path.isfile pre-check in the SPA catch-all; let
send_from_directory be the only gatekeeper so raw user-supplied
path segments never reach os.path.isfile on a joined path.
- Reuse the first db.get_settings result in patch_settings so a
race-induced None doesn't raise an unhandled AttributeError.
Implements thin wrapper over fetcher's two main endpoints: GET /data/<user>
and POST /fetch. Used by worker.py (rebuilds), api.py (user lookups), and
cron.py (bulk refresh). Includes authentication via X-Internal-Token header.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds placeholder.py with building/rate_limited/not_found variants that use the same card_wrapper + theme system as real widgets, plus pytest coverage for all three variants and the unknown-variant error path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements generator/src/db.py with two WAL-mode SQLite databases (settings.db for
users/jobs/enrollments, widgets.db for SVG cache with current_widget pointer) and
generator/tests/test_db.py covering all 10 TDD scenarios.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>