state-hub/api
tegwick 1ee0343f75 perf(doi): fingerprint-based DB cache for DoI results
Adds doi_cache table (migration k8f9a0b1c2d3). Results are stored after
each evaluation and reused on subsequent requests when the fingerprint
matches. Fingerprint covers repo.updated_at, latest TPSC snapshot_at,
latest goal updated_at, and mtime of SCOPE.md / CLAUDE.md / tpsc.yaml.

Behaviour:
- Summary (warm cache, nothing changed): ~0.4s (was 0.9s)
- Summary (one repo stale): ~0.9s (only stale repos recomputed)
- Single repo (cache hit): ~0.2s (was 40s for full check)
- Single repo ?force_refresh=true: ~2s (full C7/C13 subprocess check)

Total journey: 108s (original) → 6s → <1s → 0.2s (cached single repo)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 01:47:19 +01:00
..
models perf(doi): fingerprint-based DB cache for DoI results 2026-03-20 01:47:19 +01:00
routers perf(doi): fingerprint-based DB cache for DoI results 2026-03-20 01:47:19 +01:00
schemas feat(doi): Repository DoI automated gate and dashboard integration (CUST-WP-0024) 2026-03-20 01:08:18 +01:00
config.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
database.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
doi_engine.py perf(doi): fingerprint-based DB cache for DoI results 2026-03-20 01:47:19 +01:00
main.py feat(tpsc): Third-Party Services Catalog (CUST-WP-0023) 2026-03-20 00:15:26 +01:00