{"spec_id":"api-request-logging-middleware","title":"Spec: API Request Logging Middleware","summary":"Add structured access-log middleware that records every API request with method, path, status code, and duration. This provides a consistent, queryable request log for debugging, performance monitoring, and audit trails. Without it, operators must piece together information from multiple log sources or rely solely on the slow-request threshold logger, which misses normal-latency requests entirely.","potential_value":0.0,"actual_value":1.0,"estimated_cost":0.0,"actual_cost":1.0,"value_gap":0.0,"cost_gap":1.0,"estimated_roi":0.0,"actual_roi":1.0,"idea_id":"data-infrastructure","process_summary":"Every HTTP request produces exactly one structured log line after the response is sent.; Each log line includes: HTTP method, request path, response status code, and request duration in milliseconds.; Log level is `INFO` for 2xx/3xx responses and `WARNING` for 4xx/5xx responses.; Health-check endpoints (`/api/health`, `/healthz`) are excluded from logging to avoid noise.; The middleware is configurable via an environment variable `API_ACCESS_LOG_ENABLED` (default `\"1\"`; set to `\"0\"` to disa","pseudocode_summary":null,"implementation_summary":"api/app/middleware/request_duration.py (RequestDurationMiddleware); api/app/main.py (middleware registration)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:08.815086Z","updated_at":"2026-04-09T03:10:08.815086Z","content_path":"specs/api-request-logging-middleware.md","content_hash":"5d8e3c19d42a1c2b","workspace_id":"coherence-network"}