Final acceptance audit: fix all mypy defects, verify full journey matrix and degraded modes

Ran a dedicated post-M7 release-readiness audit. Found and fixed the one real gap: mypy
was a declared dev dependency but had never been run in any milestone's validation loop.
Fixed all 43 pre-existing type errors it surfaced, including two genuine defensive-
programming gaps (unguarded Optional vehicle/customer lookups that could have crashed
with unhandled 500s instead of clean 404/401 responses) rather than suppressing them.
make lint now runs ruff + mypy; mypy reports zero errors across 44 source files.

Re-verified end to end against a genuinely wiped-volumes clean checkout: automatic
migrations, deterministic seed, 66/66 backend tests, and the full user-journey matrix
(login, dashboard, vehicle/booking detail, return workflow, invalid-mileage rejection,
data-quality review, duplicate-customer merge, audit trail, Knowledge Assistant, n8n,
MCP Hub) via curl and Playwright.

Live-verified both external-dependency degraded modes, not just unit tests: stopped n8n
mid-flow and confirmed a return still commits with the outbox event staying pending and
retrying with backoff, then self-healing to succeeded with zero manual intervention once
n8n came back; verified RAGcore's unavailable-degradation path against an unreachable
host. Added frontend/e2e/interactive-elements.spec.ts (11 tests covering every nav item,
filter, tab, and role boundary) alongside the existing demo script test — 12/12 e2e tests
passing.

Verified no secrets are committed (.env never tracked, clean git history scan) and
.env.example covers every operator-configurable setting. Confirmed no placeholders,
TODOs, fake responses, hardcoded metrics, or dead routes anywhere in the codebase.

Updated README.md with an honest integration-status section and PROJECT_STATE.md with
the full audit findings. Added artifacts/final-acceptance/summary.md as the authoritative
final evidence document (commands, results, URLs, demo access, integration status per
external dependency, known limitations, deployment instructions, five-minute demo flow).
This commit is contained in:
NuklearRabbit
2026-08-02 01:27:01 +02:00
parent 108b5d04fc
commit 4bf9afbeff
15 changed files with 604 additions and 48 deletions
+17 -17
View File
@@ -56,28 +56,28 @@ def list_issues(
def _snapshot(entity_type: str, ref: str, db: Session) -> dict | None:
if entity_type == "customer":
obj = db.scalar(select(Customer).where(Customer.public_ref == ref))
if obj is None:
customer = db.scalar(select(Customer).where(Customer.public_ref == ref))
if customer is None:
return None
return {
"public_ref": obj.public_ref,
"first_name": obj.first_name,
"last_name": obj.last_name,
"email": obj.email,
"phone": obj.phone,
"postal_code": obj.postal_code,
"city": obj.city,
"public_ref": customer.public_ref,
"first_name": customer.first_name,
"last_name": customer.last_name,
"email": customer.email,
"phone": customer.phone,
"postal_code": customer.postal_code,
"city": customer.city,
}
obj = db.scalar(select(Vehicle).where(Vehicle.public_ref == ref))
if obj is None:
vehicle = db.scalar(select(Vehicle).where(Vehicle.public_ref == ref))
if vehicle is None:
return None
return {
"public_ref": obj.public_ref,
"make": obj.make,
"model": obj.model,
"location": obj.location,
"operational_status": obj.operational_status,
"odometer_km": obj.odometer_km,
"public_ref": vehicle.public_ref,
"make": vehicle.make,
"model": vehicle.model,
"location": vehicle.location,
"operational_status": vehicle.operational_status,
"odometer_km": vehicle.odometer_km,
}