Skip to content

Releases: AAdewunmi/Claims-Fraud-Risk-Scoring-Project

Sprint 7 Production Readiness and Evidence Export

06 Mar 17:04
453c6a7

Choose a tag to compare

Release title

Sprint 7 Production Readiness and Evidence Export

Release notes

This release packages PolicyLens as a production-shaped, multi-surface service with proxy-safe security settings, enforced CI quality gates, and explicit pagination proof across reviewer and customer lists. It also adds an audit-grade evidence export path with PDF output validated by an integration test.

Highlights

  • Readiness health check at /api/health/ with database verification and structured JSON response.
  • Production hardening for reverse proxy deployments so login and pagination work cleanly behind Nginx.
  • Production stack running Gunicorn behind Nginx, with route coverage for /, /login/*, /console/*, /reviewer/*, /customer/*, and /api/*.
  • Entrypoint automation that deterministically runs migrations and collectstatic before the app starts.
  • CI gates enforcing formatting, linting, tests, and coverage, with pagination tests executed early to prevent list regressions.
  • Evidence export supports PDF output and is covered by an integration test that verifies real PDF bytes are returned.

Added

  • Production Docker artefacts for Gunicorn + Nginx deployment (Dockerfile, compose, Gunicorn config, Nginx config).
  • Demo script and demo documentation that explicitly validate page 1 and page 2 for reviewer and customer lists.
  • PDF audit export generator and endpoint support via ?format=pdf.

Changed

  • Settings updated for proxy awareness (forwarded proto/host), CSRF trusted origins, and secure cookie flags suitable for Nginx termination.

Testing and quality

  • Database-backed integration tests for readiness and evidence export.
  • Pagination test modules run in CI as a first-class gate.
  • Coverage threshold enforced in CI.

Quick verification

  • curl -i http://localhost:8080/api/health/
  • Reviewer pagination: /ops/queue/?page=1 then /ops/queue/?page=2
  • Customer pagination: /customer/?page=1 then /customer/?page=2
  • PDF export: /api/claims/<claim_id>/audit-export/?format=pdf should return Content-Type: application/pdf and bytes starting with %PDF