Commit Graph
7 Commits
Author SHA1 Message Date
kacerrandClaude Opus 4.6 033349cafa refactor: code quality improvements across the backend
Deploy to K8s / deploy (push) Successful in 13s
Build and Push / build (push) Successful in 32s
- Remove insecure SSL verification bypass in attendance.py
- Add gunicorn as production WSGI server (Dockerfile + entrypoint)
- Fix silent data loss in reconciliation (log + surface unmatched members)
- Add required column validation in payment sheet parsing
- Add input validation on /qr route (account format, amount bounds, SPD injection)
- Centralize configuration into scripts/config.py
- Extract credentials path to env-configurable constant
- Hide unmatched transactions from reconcile-juniors page
- Fix test mocks to bypass cache layer (all 8 tests now pass reliably)
- Add pytest + pytest-cov dev dependencies
- Fix typo "Inffering" in infer_payments.py
- Update CLAUDE.md to reflect current project state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:40:32 +01:00
kacerr 0d0c2af778 Merge pull request 'google-documents-read-caching' (#2) from google-documents-read-caching into main
Deploy to K8s / deploy (push) Successful in 10s
Reviewed-on: #2
2026-03-11 10:13:18 +00:00
kacerrandClaude Opus 4.6 7170cd4d27 refactor: unify get_cached_exceptions into get_cached_data
Deploy to K8s / deploy (push) Successful in 12s
Build and Push / build (push) Successful in 8s
Add optional serialize/deserialize hooks to get_cached_data() so it
can handle the exceptions dict (tuple keys → JSON-safe lists) without
needing a separate function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:10:16 +01:00
kacerrandClaude Opus 4.6 251d7ba6b5 fix: properly debounce Drive API metadata checks in cache
Remove the file mtime check from the API debounce tier in
get_sheet_modified_time(). Previously, the debounce was defeated when
CACHE_TTL_SECONDS differed from CACHE_API_CHECK_TTL_SECONDS because
the file age check would fail even though the API was checked recently.

Also fix cache key mappings (attendance_juniors sheet ID,
payments_transactions rename) and add tmp/ to .gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:01:41 +01:00
kacerr 76cdcba424 docs: add caching outcomes summary to prompts directory 2026-03-11 01:18:00 +01:00
kacerr 8662cb4592 feat: implement caching for google sheets data
- Add cache_utils.py with JSON caching for Google Sheets
- Authenticate and cache Drive/Sheets API services globally to reuse tokens
- Use CACHE_SHEET_MAP dict to resolve cache names securely to Sheet IDs
- Change app.py data fetching to skip downloads if modifiedTime matches cache
- Replace global socket timeout with httplib2 to fix Werkzeug timeouts
- Add VS Code attach debugpy configurations to launch.json and Makefile
2026-03-11 01:16:00 +01:00
kacerr c8c145486f Merge pull request 'calculate-finance-for-juniors' (#1) from calculate-finance-for-juniors into main
Deploy to K8s / deploy (push) Successful in 12s
Reviewed-on: #1
2026-03-10 22:12:32 +00:00