The Backend of LuckTrainingRoadmaps

Jurisdiction Transfer Gateway Decision Flow (Chapter 27b)

Jurisdiction Transfer Gateway Decision Flow (Chapter 27b) A workflow diagram generated by Archify. 01 / Caller 02 / Jurisdiction Gateway EX / Fail-safe Intake Evaluate Respond Evaluate Request · POST /v1/evaluate · Caller › Intake Evaluate Request POST /v1/evaluate Allow / Deny Response · decision_id returned · Caller › Respond Allow / Deny Response decision_id returned Session Cache Check · Redis TTL 1800s · Jurisdiction Gateway › Intake Session Cache Check Redis TTL 1800s Rule Lookup · Redis jgw:rule:<tuple> · Jurisdiction Gateway › Evaluate Rule Lookup Redis jgw:rule:<tuple> Evaluate Mechanism · adequacy / SCC / DPF · Jurisdiction Gateway › Evaluate Evaluate Mechanism adequacy / SCC / DPF Audit Log · SQLite + JSONL · Jurisdiction Gateway › Respond Audit Log SQLite + JSONL Redis Unreachable · fail-safe DENY · Fail-safe › Evaluate Redis Unreachable fail-safe DENY No Rule Matched · mechanism: no-rule · Fail-safe › Evaluate No Rule Matched mechanism: no-rule 200 allowed, mechanism, reasoning INSERT decision row no rule matched fail-safe DENY logged check jgw:sess:<session>:<tuple> rule present, check expires_at Redis unreachable cache hit, 200 cached:true cache miss Legend Caller Gateway stage Decision / control Storage

Fail-Safe Is Deny

  • • A Redis outage fails the readiness probe and denies every transfer
  • • A missing or expired rule returns allowed:false with a reasoning string
  • • A SQLite write failure still leaves the JSONL log as the authoritative record

Session Caching Cuts Noise

  • • Repeated evaluations for one session reuse a single decision_id
  • • Cache TTL defaults to 1800 seconds, tuned per jurisdiction
  • • A hot reload via SIGHUP or POST /v1/reload skips a redeploy

One Source of Truth

  • • GDPR Chapter V mechanisms are limited to seven auditable types
  • • Every rule carries a citation field a regulator can check directly
  • • A YAML parse failure on reload keeps the old rule set live in Redis