Scope Confirmation at EOD Closeout + Field-Media Vision Proposals (2026-07-28)

Kilroy now ASKS Darius to confirm the scope of work before every closeout, and deviations flow to the project as per-product as-builts.

API (entirely-api 7e93eee)

  • /whatsapp/eod-closeout accepts as_built: [{product_code, qty}] — per-line as-builts for ANY division (the legacy single as_built_qty covered pier/anchor/brace only; mixed/non-pier scopes had no capture path).
  • scope_confirmed: true = “built as permitted” attestation → writes as_built = permitted qty on uncovered lines (explicit field confirmation instead of NULL fallback at cert time).
  • Unknown codes in as_built = field scope-adds → new SOW line (permitted 0, as_built = reported) via create_sow_line_from_product_code.
  • Deviations set SOW_MODIFIED; numeric compare fixed (str(4) != str(4.0) bug).
  • Cert path verified: cert_data_service uses Supabase as_built_qty as sole SoT (SOW-Gate bridge retired P27); /cert-gen/preview on a deviated project (permitted 6 → as-built 4) renders scope qty 4. The _write_sow_gate_confirmation call left in eod_closeout is legacy/no-op for cert purposes.

Vision proposals on the Kilroy filing path (same commit)

routes/field_media.py _file_and_register now triggers analyze_field_photo → create_photo_proposal for filed PHOTOS (previously only unlikely.pics did). Burst-guarded in Redis: max 5 analyses / 10 min / project, stop 15 min after the first successful proposal — a 14-photo batch = 1 proposal, not 14. Delivery rides send_photo_proposal_to_darius → WhatsApp → Kilroy Telegram fallback. Proposal TTL is 300s (existing behavior — tight for chat replies, watch for expiry complaints).

SOUL

EOD Closeout section rewritten: mandatory scope-check question before any closeout (“Built as permitted, or changes?”), 👍 → scope_confirmed, changes → as_built list, no answer = no closeout (re-ask once, then flag Dustin). Both DM sessions reset after the edit (frozen-snapshot rule).

Relationships

  • Kilroy scope check → writes via → /whatsapp/eod-closeout as_built/scope_confirmed
  • eod_closeout → creates → field scope-add SOW lines
  • field_media._file_and_register → triggers → field_photo_analyzer proposals