Skip to content

feat(precheck): cache identical allow decisions#30

Merged
Shaivpidadi merged 2 commits intodevfrom
feat/2.7a-redis-allow-cache
Apr 24, 2026
Merged

feat(precheck): cache identical allow decisions#30
Shaivpidadi merged 2 commits intodevfrom
feat/2.7a-redis-allow-cache

Conversation

@Shaivpidadi
Copy link
Copy Markdown
Member

@Shaivpidadi Shaivpidadi commented Apr 23, 2026

Summary

  • add a Redis-first allow-decision cache for identical precheck inputs with configurable TTL and in-memory fallback
  • return X-Cache: HIT|MISS on /api/v1/precheck and only cache plain allow responses
  • add regression tests for cache hits, non-cacheable transform decisions, and TTL expiry

GovernsAI Tracker issue

GOV-565 (77df8824-f4b8-4160-8570-9a9ac16d1fa1)

Reviewers

Tagging Nexus (code quality) and Cipher (security/arch) — both approvals required.

Test plan

  • PATH="$PWD/.venv/bin:$PATH" .venv/bin/python -m pytest tests/ -v

Refs: 77df8824-f4b8-4160-8570-9a9ac16d1fa1
Refs: 77df8824-f4b8-4160-8570-9a9ac16d1fa1
@Shaivpidadi Shaivpidadi merged commit 676dbae into dev Apr 24, 2026
5 checks passed
@Shaivpidadi Shaivpidadi deleted the feat/2.7a-redis-allow-cache branch April 24, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant