Outlook Calendar day closure — LCDL collect proof

Cockpit consumer: outlook-calendar-day-closure.md. Strategies: OUTLOOK-CALENDAR-READ-STRATEGIES.md.

Updated

Stable state boundary

LCDL returns wire JSON + collect proof only. Cockpit owns compute_calendar_day_fully_saved, message_scan_day.day_fully_saved, SQLite, and disk manifests.

Collect proof wire fields

Returned on outlook_calendar_probe_month_surface, outlook_calendar_collect_month_events, and outlook_calendar_expand_day_overflow:

Field Type Description
month_surface_ok bool [role=grid] present; header month/year matches target
filter_applied bool Active OWA calendar filter detected
loaded_events_hint string Parsed “Loaded N events…” status line when present
overflow_resolved bool No +N on day cell, or flyout expanded
dom_count_for_day int Event chips matching scan_date after collect + overflow
collect_proof_ok bool LCDL-side pre-check (surface OK, harness applied)

Cockpit maps these into stats_json.collect_proof and applies closure rules in day_closure.py.

Tasks (v2 month-first)

Task Purpose
outlook_calendar_probe_month_surface Month grid health + filter + loaded-events hint
outlook_calendar_collect_month_events Single pass all aria-label chips for target month
outlook_calendar_expand_day_overflow Click +N for scan_date, merge flyout events

Legacy per-day tasks remain for deep harvest (open_event_expand, read_detail_wire, …).

Month collect strategy

  1. goto_month → wait grid → ensure_cdp_tab_focus_harness
  2. probe_month_surface
  3. collect_month_events (cap max_events)
  4. Cockpit partitions by date parsed from aria_label (June / Jun + day + year)
  5. Per day with +N remaining: expand_day_overflow

Detail read scope

_READ_DETAIL_JS must read event pane / expanded dialog only — not document.body (avoids polluted agenda_excerpt).