PPDR production completed date at intake (2026-07-27)
Desk-review certs were rendering today’s date as the inspection date:
execute_confirm never wrote FIELD_INSPECTION_DATE, desk reviews create no
site visit (the generator’s fallback source), and format_date(None) defaults
to now. Surfaced when the MAN-9137..9144 batch (MAN-PPDR-2026-07-16) needed
completion dates attached by hand — Dustin supplied the 8 dates and they were
written via supabase_write_service.update_record the same morning.
Decision (Dustin): capture the date at intake via a wizard field, not by
auto-copying the staging row’s end_date — on the July MAN batch the
tracker’s end dates ran 1–3 days earlier than JES’s “Completed” dates, so
a human confirms the authoritative date.
Shipped (entirely-api ae3d28f + diagrams e05588f, entirely-portal
255c446, all pushed; API rebuilt, portal built):
production_completed_date(YYYY-MM-DD) required for post_production+desk intakes; rejected on other types (field reviews date from the real visit). Shared validatorroutes/intake.validate_production_completed_dateused by both entry paths (intake.confirm_intake,portal_intake_requests.create_intake_request) — ISO format, not future.execute_confirmwrites it toFIELD_INSPECTION_DATE({"date": ..., "include_time": false}) → mirrored toprojects.inspection_date;cert_data_service.build_cert_contextrenders it as Inspection Date / “work documented as of”.- Queue-bound submissions carry it in the intake_requests payload JSON only
(no SQLite column);
_handle_approvereplays it. Pre-deploy pending requests replayNone→ unchanged behavior. - Wizard (Review step, PPDR only): date input prefilled from
ppdr_staging.end_dateon Desk Review Prep deep-links, editable, blocks Continue; Confirm step echoes “this date will appear on the certification”. - Tests:
tests/test_ppdr_completion_date.py(10) pin validator + field write; suite 269 passed / 2 pre-existing failures (pytest-asyncio drift).
Related: cert-data-service, legacy-cert-routing-cutoff — these 2025
completion dates also make resolve_completion_date classify the projects as
legacy backlog, which is correct: cert routes to Stephaney TO +
Permits.Inspections CC (verified for all 8 via
resolve_cert_route_account_id).