PPDR Staging Worklist (Desk Review Prep)
Built 2026-07-19 (session 58). Front-end to the PPDR intake flow (intake-wizard, ppdr-desk-review-flow) for pre-vetted batches of legacy projects needing Post-Production Desk Reviews.
Why
Stephaney’s 2026-07-16 email (“Missing Certs or Post Construction Inspections”, gmail 19f6c1ce1bcb3ae9) listed 23 Manassas projects needing post-construction inspections. Rather than her cold-starting the intake wizard 22 times (one row dropped — 8266 Rogues Rd Electrical; UP does not do electrical inspections), Dustin pre-stages the batch and she works a burn-down list.
Data
- Supabase
ppdr_staging(entirely-api migration 024). Status flow:staged → converted, side stateson_hold/removed. Unique on (batch_id, jes_project_id). - Batch
MAN-PPDR-2026-07-16: 22 rows, all matched exactly totracker_permitsMAN-zone rows (tracker_permit_id set). 21 staged + 1 on_hold: 6741 Maxwell Ave duplicates already-Certified/Paidblkhse.553005— awaiting Dustin’s call.
Flow
- Desk Review Prep page (
/desk-review-prep, portal) — triage + up_owner/up_admin. Shows status chips, converted rows get created-project status + doc counts (PERMIT_PACKAGE / PHOTOS / DRIVELOGS — intake move consolidates PERMITS+PLANS into PERMIT_PACKAGE). - “Start Desk Review” →
/intake?staging_id=N. Wizard locks originating branch from the staging row, backfills customer number (authoritative — ppdr_matcher key) and blank address/permit after parse (pre-seeding parsedData would skip the parse and lose SOW extraction). POST /intake/confirmwithstaging_id: bypasses the intake-requests approval queue (batch pre-vetted; Dustin decision 2026-07-19). Directexecute_confirm(triage=True, originating_branch=<staging row>)→ canonical PPDR-to-UP shape: account=UNLIKELY_PRO, cert→Stephaney (JES Triage), invoice→originating branch @ 2× (T- prefix), project ID from branch sequence. Row flips toconverted.- Project lands in
/desk-reviewqueue (up_owner + up_admin — Jacob has access) → ABSoW → cert_validate → cert/invoice as usual.
Non-staged triage submissions still queue for owner approval — the bypass requires a staged row in status staged (on_hold → 409, unknown → 404; verified live).
API
routes/ppdr_staging.py: GET /ppdr-staging/list, GET /{id}, POST /{id}/hold|release|remove (manage = owner/admin only; verified triage→403, scheduler→403).
Commits: entirely-api db85ea8, entirely-portal 0662d02.
Round 2 (2026-07-19, api ba60bc3 / portal 1332fef)
- Pier-log parse parity: intake-staged PIERLOGS files now queue the same background Vision parse (
pier_log.json) as portal uploads — execute_confirm reuses portal_files’_pierlog_parse_pipeline. Before this, wizard-uploaded pier logs were never parsed and desk-review certs rendered without pier cards. - Production-days confirm gate: desk-review projects with UND/ANC/BRC scope now require explicit up_owner/up_admin sign-off on production days before cert delivery. cert_validate Check 12 (advisory) + preflight Probe 10 (enforced at /cert/deliver, 412, force-bypassable). Sign-off endpoint
POST /portal/projects/{id}/confirm-production-days+ “Confirm Production Days” button in CertPanel. Field-inspection projects exempt — the field-completion gate (field-inspection) already forces inspector confirmation. - Fixed latent Check 5 NameError (pier-log-short FAIL branch used undefined
errors).