certification-send-hold
Notes
- 2026-09-16 (session 104) — Dustin: “block every single certification from being sent until I say otherwise … keep the ones that are blocked and ready to be sent in such a way that they can be bulk sent when ready. Groundworks has reached a point where they’re not paying out, so we are going to hold their certifications until payment.” Built services/cert_send_hold.py (entirely-api): a GLOBAL, optionally account-scoped switch on the SEND step only — drafting, approving, generating and invoicing continue. State in /data/portal-auth/cert_send_hold.json + a held queue (cert_send_hold_queue.json) + released trail (.jsonl), host-mounted in api/worker/scheduler; fails closed on an unreadable file. Gates: deliver_cert_internal (423 cert_send_hold, queued), portal send_cert (status=held, approval persisted, HELD stamp, queued), resend (queued on confirm), assistant cert email / cert_gen link + TEST sends / CERTS file email (refused), confidence routing sends the invoice and reports cert_held, send_invoice drops the “sent separately” line, Friday preview says so, unlikely.report hides never-delivered pipeline certs of covered projects (legacy archive certs stay up). Release: portal /cert-hold page (owner/admin) → route preview → POST /portal/cert-hold/release → worker task_cert_hold_release replays each queued attempt with hold_release=True (the only bypass); the hold stays up for the rest; lifting never sends anything. Hold RAISED 2026-09-16 as dustin, scope = every account. Not built (needs Dustin’s word): any client-facing “held pending payment” wording on invoices or a branch notice.
- 2026-09-16 10:08 ET — scope narrowed (Dustin): the hold now covers only the ten Groundworks + JES accounts (JES Baltimore, Manassas, Richmond, Triage, Virginia Beach, Roanoke, West Virginia; Groundworks North Haven, Hooksett, Corporate). Founders Waterproofing, Grassbusters, New Line Construction and Unlikely Professionals-owned direct work send normally. A scoped hold matches the owning account OR the resolved cert-route account (config.resolve_cert_route_account_id), so PPDR desk reviews parked on Unlikely Professionals whose cert routes to JES Triage are held too. Verified live: VAB-9026 (UPR-parked PPDR) held, NLC-9000 passes, BAL-9007 held.
- 2026-09-17 — RETIRED. Invoices are moving again; Dustin: “unblock the certs and undo everything we’ve done here.” Hold lifted (queue had stayed empty — no cert was ever held), then the whole feature was reverted: entirely-api eeda2aa / f0b20db / 4cd98ab (reverts of af8b5fc / 299b153 / c7bccbc), entirely-portal 30a1bd3 (revert of bee8dc8); /data/portal-auth/cert_send_hold.json removed; admin cert-pipeline diagram restored. If needed again, revert the revert commits rather than rebuilding — the design is in SESSION_LOG.md session 104.