Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

[DEPLOY]

merged#2752CedarCopilot

CedarCopilot wants to merge 1 commit into main from staging

Not deployedTimeline and evidence
  1. Opened
    Sep 10, 2026, 7:45 AM
  2. Sep 10, 2026, 8:17 AM
  3. Merged
    Sep 10, 2026, 11:35 AM
  4. Live on staging, live on prod, observed
    Pending
  5. 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 change adds useful LinkedIn profile, proposal, and table-binding behavior, but it must not merge yet. The reproduced failures allow cross-organization LinkedIn seat consumption and profile-cache data mixing, prevent stale profiles from recovering after a daily budget reset, restore dismissed proposals after reload, and let an older failed table write overwrite a newer successful edit.

Confidence Score: 0/5

Unsafe to merge until the authorization, tenant-isolation, refresh lifecycle, proposal persistence, and bound-cell write ordering failures are corrected.

Five independently reproduced blocking failures affect protected organization resources or cause user-visible state to become stale, reappear after dismissal, or overwrite a newer edit.

Files Needing Attention: apps/server/src/trpc/routes/linkedin.ts, apps/server/src/db/migrations/linkedin_person_profiles.sql, apps/server/src/services/integrations/linkedin/person-profile-refresh.ts, apps/mail/modules/cedar-os/src/store/messages/renderers/ProposedMutationRenderer.tsx, and apps/mail/modules/documents/table/use-bound-cell-write.ts.

Security Review

Two reproduced security issues affect LinkedIn boundaries: a caller can use another organization's LinkedIn seat and consume its profile-view budget, and the globally keyed profile cache can expose and overwrite another organization's cached profile state.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced a proof for a posted P1 finding about cross-organization seats, and a general-contract-validation-proof confirms the behavior and outcome.
  • T-Rex produced a proof for a P1 finding involving a tenant collision, and the cross-tenant validation demonstrates the cache read/overwrite interactions.
  • T-Rex produced a proof for a P1 finding about budget window regression, and the validation run shows the prior/next window behavior with no production code changes.
  • T-Rex produced a proof for a P1 finding around active-stream rejection, and the validation captures persistence behavior observed in the test.
  • T-Rex produced a proof for a P1 finding about out-of-order write validation, and the validation test documents the bound-cell mutation scenarios.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (5)

  1. General comment

    P1 Profile refresh accepts a foreign LinkedIn seat and spends its view budget

    • Bug
      • At apps/server/src/trpc/routes/linkedin.ts:200-210, an authenticated caller can send any unipileAccountId with a chat they own. The downstream refreshCounterpartProfile accepts the identifier, calls getUserProfile with it, and records a profile_view rate-limit increment against that account. The executed org-A/org-B reproduction completed successfully with the org-B account selected and charged.
    • Cause
      • The route forwar
Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • .github/workflows/ci.ymlno production surface mapped
  • CLAUDE.mdno production surface mapped
  • apps/mail/app/(auth)/login/login-client.tsxno production surface mapped
  • apps/mail/components/ui/date-picker-with-natural-input.tsxno production surface mapped
  • apps/mail/components/ui/search-input.tsxno production surface mapped
  • apps/mail/docs/bug-email-tab-shows-few-threads.mdno production surface mapped
  • apps/mail/docs/graph-documents.mdno production surface mapped
  • apps/mail/docs/linkedin-counterpart-profile.mdno production surface mapped
  • apps/mail/docs/optimistic-files.mdno production surface mapped
  • apps/mail/docs/table-documents.mdno production surface mapped
  • apps/mail/docs/wiki/table-grid.mdno production surface mapped
  • apps/mail/jest.config.cjsno production surface mapped
  • apps/mail/jest.tz.config.cjsno production surface mapped
  • apps/mail/modules/agents/__tests__/AgentFileBrowserSelection.test.tsxno production surface mapped
  • apps/mail/modules/agents/components/AgentView.tsxno production surface mapped
  • apps/mail/modules/agents/hooks/use-open-agent-context.tsno production surface mapped
  • apps/mail/modules/cedar-os/__tests__/chatComponents/ProposedMutationRenderer.test.tsxno production surface mapped
  • apps/mail/modules/cedar-os/__tests__/emptyChatLayout.surfaces.test.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatComponents/EmbeddedCedarChat.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatComponents/EmptyStateSuggestions.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatComponents/emptyChatLayout.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatInput/ContextBadgeRow.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/store/agentContext/agentContextSlice.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/store/messages/renderers/ProposedCalendarEventRenderer.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/store/messages/renderers/ProposedMutationRenderer.tsxno production surface mapped
  • apps/mail/modules/company/components/CompanyExplorer.tsxno production surface mapped
  • apps/mail/modules/conversations/components/LeftSidebarContent.tsxno production surface mapped
  • apps/mail/modules/conversations/components/OverviewDocTab.tsxno production surface mapped
  • apps/mail/modules/conversations/components/ThreadContextCards.tsxno production surface mapped
  • apps/mail/modules/conversations/components/files/optimistic-files.tsno production surface mapped
  • apps/mail/modules/conversations/hooks/use-conversation-body.tsno production surface mapped
  • apps/mail/modules/crm/utils/time.tsno production surface mapped
  • apps/mail/modules/documents/full-bleed-doc-types.tsno production surface mapped
  • apps/mail/modules/documents/table/BoundCellEditors.tsxno production surface mapped
  • apps/mail/modules/documents/table/CellDisplay.tsxno production surface mapped
  • apps/mail/modules/documents/table/TableColumnMenu.tsxno production surface mapped
  • apps/mail/modules/documents/table/TableGrid.tsxno production surface mapped
  • apps/mail/modules/documents/table/TableRow.tsxno production surface mapped
  • apps/mail/modules/documents/table/bound-writes.tsno production surface mapped
  • apps/mail/modules/documents/table/use-bound-cell-write.tsno production surface mapped
  • apps/mail/modules/documents/table/use-grid-commands.tsno production surface mapped
  • apps/mail/modules/documents/use-active-doc-context.tsno production surface mapped
  • apps/mail/modules/files/components/FileBrowser.tsxno production surface mapped
  • apps/mail/modules/files/components/FileExplorerTabs.tsxno production surface mapped
  • apps/mail/modules/files/components/FileViewList.tsxno production surface mapped
  • apps/mail/modules/files/components/FileViewMenu.tsxno production surface mapped
  • apps/mail/modules/files/components/list/FileList.tsxno production surface mapped
  • apps/mail/modules/files/fileViews.tsno production surface mapped
  • apps/mail/modules/home/components/FileArtifactPanel.tsxno production surface mapped
  • apps/mail/modules/inbox/hooks/use-open-channel-item.tsno production surface mapped
  • apps/mail/modules/linkedin/components/LinkedInCounterpartCard.tsxno production surface mapped
  • apps/mail/modules/linkedin/hooks/use-counterpart-profile.tsno production surface mapped
  • apps/mail/modules/linkedin/index.tsno production surface mapped
  • apps/mail/modules/reports/components/ReportsView.tsxno production surface mapped
  • apps/mail/modules/threads/hooks/use-search-query-sync.tsno production surface mapped
  • apps/mail/modules/threads/mail.tsxno production surface mapped
  • apps/mail/modules/threads/threadList/components/mail-list.tsxno production surface mapped
  • apps/mail/modules/ux/layout/LayoutUrlSync.tsxno production surface mapped
  • apps/mail/modules/ux/layout/selectChannelChat.tsno production surface mapped
  • apps/mail/package.jsonno production surface mapped
  • apps/mail/public/ai.svgno production surface mapped
  • apps/mail/public/black-icon.svgno production surface mapped
  • apps/mail/public/white-icon.svgno production surface mapped
  • apps/mail/tests/modules/chat-store/ambientTrim.test.tsxno production surface mapped
  • apps/mail/tests/modules/chat-store/channelContext.test.tsxno production surface mapped
  • apps/mail/tests/modules/chat-store/openAgentAndFileContext.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/conversationBackFromFile.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabAttached.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabDeepLink.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabDrive.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabHarness.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabOptimistic.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabSelection.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabTree.test.tsxno production surface mapped
  • apps/mail/tests/modules/crm/utils/format-relative-date.test.tsno production surface mapped
  • apps/mail/tests/modules/documents/table/BoundColumns.test.tsxno production surface mapped
  • apps/mail/tests/modules/documents/table/LinkedColumns.test.tsxno production surface mapped
  • apps/mail/tests/modules/documents/table/bound-writes.test.tsno production surface mapped
  • apps/mail/tests/modules/documents/table/trpc-stub.tsno production surface mapped
  • apps/mail/tests/modules/files/FileViewList.test.tsxno production surface mapped
  • apps/mail/tests/modules/inbox/openChannelItem.test.tsxno production surface mapped
  • apps/mail/tests/modules/linkedin/LinkedInCounterpartCard.test.tsxno production surface mapped
  • apps/mail/tests/modules/threads/emptyPageKeepsPaging.test.tsxno production surface mapped
  • apps/mail/tests/modules/threads/searchFilterLifetime.test.tsxno production surface mapped
  • apps/mail/tests/modules/ux/layout/selectChannelChat.test.tsno production surface mapped
  • apps/mail/tests/timezone/format-relative-date.test.tsno production surface mapped
  • apps/server/docs/design/reversible-writes-and-approval.mdno production surface mapped
  • apps/server/docs/relationship-graph-and-warm-intros.mdno production surface mapped
  • apps/server/docs/warp-agent-build-plan.mdno production surface mapped
  • apps/server/docs/warp-thiago-crm-automation-asks.mdno production surface mapped
  • apps/server/docs/weekly-product-intelligence-agent.mdno production surface mapped
  • apps/server/docs/wiki/approval-and-reversibility.mdno production surface mapped
  • apps/server/docs/wiki/linkedin-counterpart-profile.mdno production surface mapped
  • apps/server/docs/wiki/linkedin-rate-window-bucketing.mdno production surface mapped
  • apps/server/package.jsonno production surface mapped
  • apps/server/src/crm-admin/cli.tsno production surface mapped
  • apps/server/src/db/migrations/linkedin_person_profiles.sqlno production surface mapped
  • apps/server/src/db/outbound-schema.tsno production surface mapped
  • apps/server/src/mastra/context/values.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/chat/handleChat.tsno production surface mapped
  • apps/server/src/mastra/tools/config/__tests__/config-propagate-tool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/__tests__/createConversationEvent-paste.test.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/__tests__/updateConversationFieldsTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/__tests__/documentTool.delete.integration.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/tableTool.tsno production surface mapped
  • apps/server/src/mastra/types/chat-context.tsno production surface mapped
  • apps/server/src/mastra/utils/__tests__/approval.test.tsno production surface mapped
  • apps/server/src/mastra/utils/approval.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/__tests__/apply-pending-mutation-agentid.test.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/chat-workflow.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/__tests__/request-context.test.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/mcp-server.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/request-context.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/run-chat-agent-sdk.tsno production surface mapped
  • apps/server/src/outbound/cli.tsno production surface mapped
  • apps/server/src/services/auth/__tests__/staff-check-confined-to-authority.test.tsno production surface mapped
  • apps/server/src/services/chat/pending-mutations.tsno production surface mapped
  • apps/server/src/services/documents/table/__tests__/table-bindings.test.tsno production surface mapped
  • apps/server/src/services/documents/table/__tests__/table-list-bindings.test.tsno production surface mapped
  • apps/server/src/services/documents/table/table-binding-paths.tsno production surface mapped
  • apps/server/src/services/documents/table/table-bindings.tsno production surface mapped
  • apps/server/src/services/documents/table/table-fill.tsno production surface mapped
  • apps/server/src/services/documents/table/table-source-queries.tsno production surface mapped
  • apps/server/src/services/file-system/index.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/person-profile.read.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/person-profile.refresh.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/person-profile.rules.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/send-governor.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/governor.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/messaging.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/person-profile-refresh.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/person-profile.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/unipile-client.tsno production surface mapped
  • apps/server/src/trpc/routes/__tests__/files-restore-node.test.tsno production surface mapped
  • apps/server/src/trpc/routes/__tests__/files-router-permission-request.test.tsno production surface mapped
  • apps/server/src/trpc/routes/admin-documents.tsno production surface mapped
  • apps/server/src/trpc/routes/chat.tsno production surface mapped
  • apps/server/src/trpc/routes/documents.tsno production surface mapped
  • apps/server/src/trpc/routes/files.tsno production surface mapped
  • apps/server/src/trpc/routes/linkedin.tsno production surface mapped
  • package.jsonno production surface mapped
  • scripts/check-brand-assets.mjsno production surface mapped