Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

[2026-08-15] merging staging to prod

merged#2498CedarCopilot

CedarCopilot wants to merge 0 commits into main from staging

Not deployedTimeline and evidence
  1. Opened
    Aug 15, 2026, 2:06 PM
  2. Merged
    Aug 15, 2026, 2:15 PM
  3. Not deployed

    Not deployed

    Pending

Libra has no production signal for this change yet because it has not deployed. Libra checks hourly for 3 days after each deploy.

Greptile Summary

This staging-to-production merge adds Fellow meeting ingestion, durable scheduled-send delivery claims, resilient Redis-backed chat streaming, calendar permission checks, CRM aggregation and repair utilities, taxonomy extraction improvements, and URL-driven layout fixes.

  • Adds Fellow provider support across server ingestion, setup tooling, and client integration surfaces.
  • Introduces scheduled-send claiming to arbitrate worker delivery against cancellation.
  • Refactors chat streaming around coalesced Redis writes and reconnectable SSE tailing.
  • Adds CRM conversation aggregation, merge/repoint repair, deal-timeline, and taxonomy utilities.
  • Tightens calendar organizer and guest-permission handling across agent and UI surfaces.

Confidence Score: 3/5

The PR should not merge until calendar mutations fail safely when permissions cannot be determined and chat completion no longer drops final events on a failed drain.

Calendar event-read failures currently bypass the new shared-event permission boundary and can yield misleading success, while the chat tailer can close normally after losing events during its final Redis drain.

Files Needing Attention: apps/server/src/mastra/tools/calendar/modifyCalendarEventTool.ts; apps/server/src/services/chat/chat-stream-tail.ts

Important Files Changed

FilenameOverview
apps/server/src/mastra/tools/calendar/modifyCalendarEventTool.tsAdds shared-event permission checks, but lookup failures bypass those checks and can produce misleading successful mutations.
apps/server/src/services/chat/chat-stream-tail.tsAdds retrying, backoff, and resumable SSE delivery, but silently treats a failed final drain as successful completion.
apps/server/src/services/chat/chat-stream-store.tsReduces Redis request volume by periodically refreshing event-list TTLs through a pipeline.
apps/server/src/services/mail/send/scheduled-send-records.tsAdds an atomic Postgres delivery claim and recovery transitions for scheduled sends.
apps/server/src/services/integrations/meetings/fellow.tsImplements Fellow meeting normalization and ingestion alongside the existing meeting-provider abstraction.
apps/server/src/services/crm/conversation-aggregates.tsAdds SQL-backed conversation pipeline metrics using shared filtering and owner-scope resolution.
apps/server/src/services/documents/conversation-repoint.tsExpands document and related-record repointing used during conversation repair and merges.
apps/mail/modules/ux/layout/useBackOrUp.tsRefines artifact-history tracking so close actions distinguish pushed opens from deep links and replacements.

Flowchart

rendering diagram…
Prompt To Fix All With AI
### Issue 1
apps/server/src/mastra/tools/calendar/modifyCalendarEventTool.ts:279-289
**Permission lookup fails open**

When the preliminary event read fails, `existingEvent` remains null and the permission guard is skipped, so an attendee's update or deletion proceeds and returns success even when Google applies it only to their private copy. The agent can consequently tell the user that a meeting was moved or cancelled while the organizer and other attendees still see the original event.

### Issue 2
apps/server/src/services/chat/chat-stream-tail.ts:160-172
**Final drain errors close cleanly**

When events arrive between the empty read and the completion check an
Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • .claude/skills/data-audit-prep/SKILL.mdno production surface mapped
  • .claude/skills/data-audit/SKILL.mdno production surface mapped
  • .claude/skills/field-extraction/SKILL.mdno production surface mapped
  • .claude/skills/taxonomy-field-author/SKILL.mdno production surface mapped
  • .claude/skills/vocab-extraction/SKILL.mdno production surface mapped
  • apps/mail/app/(routes)/playground/components/IntegrationsTabContent.tsxno production surface mapped
  • apps/mail/app/(routes)/playground/initial-sync.tsxno production surface mapped
  • apps/mail/components/markdown-editor.tsxno production surface mapped
  • apps/mail/docs/pipeline-tabs-and-canvas-aggregates.mdno production surface mapped
  • apps/mail/docs/url-driven-layout.mdno production surface mapped
  • apps/mail/modules/aop/constants.tsno production surface mapped
  • apps/mail/modules/calendar/components/EventDetailsPopover.tsxno production surface mapped
  • apps/mail/modules/calendar/hooks/use-event-manipulation.tsno production surface mapped
  • apps/mail/modules/calendar/types/calendar-types.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/store/messages/renderers/ProposedConversationEventRenderer.tsxno production surface mapped
  • apps/mail/modules/integrations/meeting-integration-card.tsxno production surface mapped
  • apps/mail/modules/ux/layout/LayoutUrlSync.tsxno production surface mapped
  • apps/mail/modules/ux/layout/useBackOrUp.tsno production surface mapped
  • apps/mail/tests/components/markdown-editor-liveness.test.tsxno production surface mapped
  • apps/mail/tests/modules/ux/layout/artifactEntryOnRouteOpen.test.tsxno production surface mapped
  • apps/mail/tests/modules/ux/layout/backOrClose.test.tsno production surface mapped
  • apps/server/.claude/skills/calendar/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/conversation/field-updating.mdno production surface mapped
  • apps/server/scripts/taxonomy-eval/README.mdno production surface mapped
  • apps/server/scripts/taxonomy-eval/agent_classify_call_prompt.mdno production surface mapped
  • apps/server/scripts/taxonomy-eval/agent_extract_prompt.mdno production surface mapped
  • apps/server/scripts/taxonomy-eval/assemble_sonnet.pyno production surface mapped
  • apps/server/scripts/taxonomy-eval/extract-workflow.jsno production surface mapped
  • apps/server/scripts/taxonomy-eval/write-remap-dryrun.tsno production surface mapped
  • apps/server/scripts/taxonomy-eval/write-remap.tsno production surface mapped
  • apps/server/scripts/write-agentic.tsno production surface mapped
  • apps/server/src/crm-admin/cli.tsno production surface mapped
  • apps/server/src/db/migrations/scripts/account-setup/phase10c-fellow.tsno production surface mapped
  • apps/server/src/db/scheduled-send-schema.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/chat/handleChat.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/imessage/imessage-bot-chat.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/slack/slack-bot-chat.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/sms/sms-bot-chat.tsno production surface mapped
  • apps/server/src/mastra/tools/calendar/__tests__/modifyCalendarEventTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/calendar/calendarTool.tsno production surface mapped
  • apps/server/src/mastra/tools/calendar/listCalendarEventsTool.tsno production surface mapped
  • apps/server/src/mastra/tools/calendar/modifyCalendarEventTool.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/chat-workflow.tsno production surface mapped
  • apps/server/src/services/chat/chat-stream-store.test.tsno production surface mapped
  • apps/server/src/services/chat/chat-stream-store.tsno production surface mapped
  • apps/server/src/services/chat/chat-stream-tail.test.tsno production surface mapped
  • apps/server/src/services/chat/chat-stream-tail.tsno production surface mapped
  • apps/server/src/services/chat/chat-stream-writer.test.tsno production surface mapped
  • apps/server/src/services/chat/chat-stream-writer.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/conversation-aggregates.test.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/deal-link-metrics.test.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/deal-timeline.test.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/merge-and-events.test.tsno production surface mapped
  • apps/server/src/services/crm/company-merge.tsno production surface mapped
  • apps/server/src/services/crm/conversation-aggregates.tsno production surface mapped
  • apps/server/src/services/crm/conversation-repair.tsno production surface mapped
  • apps/server/src/services/crm/conversations.tsno production surface mapped
  • apps/server/src/services/crm/deal-link-metrics.tsno production surface mapped
  • apps/server/src/services/crm/deal-timeline.tsno production surface mapped
  • apps/server/src/services/documents/__tests__/conversation-repoint.test.tsno production surface mapped
  • apps/server/src/services/documents/conversation-repoint.tsno production surface mapped
  • apps/server/src/services/field-values/__tests__/defaults-equivalence.test.tsno production surface mapped
  • apps/server/src/services/field-values/__tests__/fathom-speaker-email-map.test.tsno production surface mapped
  • apps/server/src/services/field-values/__tests__/link-resolver.test.tsno production surface mapped
  • apps/server/src/services/field-values/__tests__/taxonomy-envelope.test.tsno production surface mapped
  • apps/server/src/services/field-values/__tests__/write-remap.test.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/call-level.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/discovery.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/product.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/qualification.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/stakeholder.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/tactics.tsno production surface mapped
  • apps/server/src/services/field-values/defaults/voice.tsno production surface mapped
  • apps/server/src/services/field-values/link-resolver.tsno production surface mapped
  • apps/server/src/services/field-values/participant-roster.tsno production surface mapped
  • apps/server/src/services/field-values/taxonomy-envelope.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/__tests__/capabilities.test.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/capabilities.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/fathom.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/fellow.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/index.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/types.tsno production surface mapped
  • apps/server/src/services/mail/calendar/event-permissions.tsno production surface mapped
  • apps/server/src/services/mail/send/__tests__/scheduled-send-claim.test.tsno production surface mapped
  • apps/server/src/services/mail/send/cancel-on-reply.tsno production surface mapped
  • apps/server/src/services/mail/send/scheduled-send-records.tsno production surface mapped
  • apps/server/src/services/playbook/agent-defaults/pipeline-review.tsno production surface mapped
  • apps/server/src/trpc/routes/crm.tsno production surface mapped
  • apps/server/src/trpc/routes/mail.tsno production surface mapped
  • apps/server/src/worker/queue-handler.tsno production surface mapped
  • docs/audits/aspire/aspire-customer-vocab.mdno production surface mapped
  • docs/audits/pirros/design/pirros-aspire-master-playbook-adherence-taxonomy-map-2026-08-13.mdno production surface mapped
  • docs/audits/pirros/design/pirros-vocab-draft-from-resources.mdno production surface mapped
  • docs/audits/pirros/design/taxonomy-diff-and-change-list.mdno production surface mapped
  • docs/audits/pirros/pirros-customer-vocab.mdno production surface mapped
  • docs/audits/pirros/pirros-questions-for-peter.htmlno production surface mapped
  • docs/audits/taxonomy-question-master.htmlno production surface mapped
  • docs/audits/vooma/vooma-customer-vocab.mdno production surface mapped
  • docs/design/fellow-connector-2026-08-15.mdno production surface mapped
  • docs/design/fellow-superglue-tools/fellow-get-meetings.jsonno production surface mapped
  • docs/design/fellow-superglue-tools/fellow-meetings-webhook-sync.jsonno production surface mapped