Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(fathom): fetch meetings by created-date window (chunked), not 200 most-recent

merged#2497CedarCopilot

CedarCopilot wants to merge 0 commits into staging from fix/fathom-meeting-window-fetch

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 15, 2026, 1:55 PM
  2. Merged
    Aug 15, 2026, 2:05 PM
  3. Live on prod
    Aug 15, 2026, 2:05 PM
  4. Observed 2 hours
    Aug 15, 2026, 2:05 PM
  5. Unobserved

    Live on prod, no production signal yet

    Aug 15, 2026, 2:05 PM
  6. Pipelines steady after this deploy
    Aug 15, 2026, 2:05 PM

Behaviors Libra is checking

Meetings returned in adjacent Fathom time chunks are merged without duplicate recordings when their recording IDs overlap at date boundaries.Not checked
prod
Large Fathom date-range fetches are split into 30-day created-date chunks so high-volume users avoid Superglue timeouts and Fathom volume-limit failures.Not checked
prod
Fathom meeting backfills can fetch an explicit created-date window, including older multi-month ranges, instead of being limited to the 200 most recent recordings.Not checked
prod

Libra has verdicts on 0 of 3 tracked behaviors on prod; 3 are still being checked. Libra checks hourly for 3 days after each deploy.

Problem

getAllMeetings only ever passed days_back to the fathom-get-meetings Superglue tool, which defaults max_results to 200. For high-volume reps this silently capped the fetch at the 200 most-recent recordings (~4 months back), so any backfill over an older window returned nothing before that point. It looked like Fathom retention but was a fetch cap , the recordings were there all along.

The tool already supports created_after / created_before + cursor pagination; the only reason a naive full-window fetch fails is that a single wide request trips the Superglue timeout on volume.

Fix (mirrors getAllClariMeetings)

  • getAllMeetings accepts an explicit { startDate, endDate, maxResults } window, splits it into 30-day chunks (newest-first), fetches each with created_after/created_before, and merges (dedup by externalId).
  • The days_back path now chunks too, so an existing --meeting-days-back 370 sync also reaches the full window instead of the 200-cap.
  • The Fathom driver's listMeetings threads the window through, for parity with the Clari driver.

Verification

Ran against two live reps (Vooma pilot):

Repbeforeafterearliest
Jesse Taylor2005242025-08-15
Jason Conlow2004632025-08-14

Meetings now present in every month back to the window start (Aug 2025). No behavior change for callers that pass a small days_back (one chunk).

🤖 Generated with Claude Code

Greptile Summary

The PR replaces Fathom’s single capped meeting request with newest-first, 30-day created-date chunks and deduplicates merged recordings by external ID. It also threads explicit date-window options through the Fathom driver.

  • Builds bounded created_after/created_before requests for each 30-day chunk.
  • Raises the per-request result cap to 1,000 by default.
  • Merges chunk results while deduplicating identified meetings.
  • Adds explicit date-window support to fathomDriver.listMeetings.

Confidence Score: 4/5

The explicit Fathom window path should validate date values and ordering before this PR is merged.

The newly consumed date options are reachable from a route accepting arbitrary strings, allowing malformed dates to throw during ISO conversion and reversed dates to reach Superglue as inverted bounds.

Files Needing Attention: apps/server/src/services/integrations/meetings/fathom.ts

Important Files Changed

FilenameOverview
apps/server/src/services/integrations/meetings/fathom.tsAdds chunked date-window retrieval and deduplication, but consumes unvalidated date options that can throw or generate inverted provider bounds.

Sequence Diagram

rendering diagram…
Prompt To Fix All With AI
### Issue 1
apps/server/src/services/integrations/meetings/fathom.ts:428-429
**Invalid date windows reach Fathom**

When `meetings.listMeetings` supplies an invalid or reversed date pair, this code either throws `RangeError: Invalid time value` during `toISOString()` or sends inverted `created_after` and `created_before` bounds, causing the request to fail or return no meetings.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: ["fix(fathom): fetch meetings by created-d..."](https://github.com/cedarcopilot/cedar-mail/commit/ce093f683695431e19f91084

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/server/src/services/integrations/meetings/fathom.tsno production surface mapped