Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

[2026-08-20] merging staging to main

merged#2530CedarCopilot

CedarCopilot wants to merge 0 commits into main from staging

Not deployedTimeline and evidence
  1. Opened
    Aug 20, 2026, 1:31 PM
  2. Merged
    Aug 20, 2026, 1:39 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 merge adds active-deal-aware CRM status synchronization and agent context, aligns the virtualized CRM row with the selected deal, expands regression coverage, and adds Vooma audit artifacts.

  • Prevents a non-active sibling deal from overwriting a conversation's status in the normal same-provider case.
  • Labels active and sibling deals in agent context for multi-deal conversations.
  • Adds tests for active versus non-active stage synchronization.
  • Adds Vooma funnel, stage, company-size, and extraction documentation artifacts.

Confidence Score: 4/5

The PR should not merge until the status guard identifies incoming deals by both provider and deal ID; the relative imports are non-blocking cleanup.

The new guard correctly suppresses ordinary sibling updates but treats provider-local deal IDs as globally unique, allowing a non-active deal from another provider to overwrite the active conversation status when IDs collide.

Files Needing Attention: apps/server/src/services/crm/crm-field-sync.ts; apps/server/src/mastra/utils/context-formatting/conversation-context.ts; apps/server/src/services/crm/tests/crm-field-sync-full.test.ts

Important Files Changed

FilenameOverview
apps/server/src/services/crm/crm-field-sync.tsAdds active-deal status guards to both sync paths, but identifies the incoming deal by ID alone and can misclassify cross-provider collisions.
apps/server/src/mastra/utils/context-formatting/conversation-context.tsAdds active/sibling deal annotations and open/closed state to agent context; no independent runtime defect was established.
apps/mail/modules/crm/components/VirtualizedTableRow.tsxDerives the sync badge and displayed CRM metadata from the same selected active deal.
apps/server/src/services/crm/tests/crm-field-sync-full.test.tsAdds coverage for active and non-active sibling stage updates, but does not cover identical deal IDs across providers.
docs/audits/vooma/vooma-extraction-agent-prompt.mdAdds audit-specific extraction guidance and supporting datasets without an established product runtime failure.

Flowchart

rendering diagram…
Prompt To Fix All With AI
### Issue 1
apps/server/src/services/crm/crm-field-sync.ts:126-128
**Provider-scoped deal identity is lost**

If a conversation links deals from two CRM providers with the same provider-local deal ID, this comparison treats an update from the non-active provider as an active-deal update, allowing the sibling stage to overwrite the conversation status. Deal identity must include both provider and deal ID.

### Issue 2
apps/server/src/services/crm/crm-field-sync.ts:15-16
**New imports bypass absolute paths**

These new relative imports violate the repository's absolute-import convention. The same changed-code pattern also occurs in `conversation-context.ts` and `crm-field-sync-full.test.ts`, increasing maintenance cost when modules move.

---

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

Reviews (1): Last reviewed commit: "Merge pull request #2514 from CedarCopil..." | Re-trigger Greptile

Greptile also left **2 inline com

Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • apps/mail/modules/crm/components/VirtualizedTableRow.tsxno production surface mapped
  • apps/server/src/mastra/utils/context-formatting/conversation-context.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/crm-field-sync-full.test.tsno production surface mapped
  • apps/server/src/services/crm/crm-field-sync.tsno production surface mapped
  • docs/audits/vooma/artifacts/vooma-data-lineage.htmlno production surface mapped
  • docs/audits/vooma/artifacts/vooma-stage-funnels.htmlno production surface mapped
  • docs/audits/vooma/data/company-sizes.tsvno production surface mapped
  • docs/audits/vooma/data/funnel-data.jsonno production surface mapped
  • docs/audits/vooma/data/stage-cap-backup.tsvno production surface mapped
  • docs/audits/vooma/data/stage-verdicts.jsonno production surface mapped
  • docs/audits/vooma/data/vooma-deal-stage-dataset.tsvno production surface mapped
  • docs/audits/vooma/inputs/vooma-ideal-persona-profile.mdno production surface mapped
  • docs/audits/vooma/inputs/vooma-vocab-answers-2026-08-13.mdno production surface mapped
  • docs/audits/vooma/vooma-extraction-agent-prompt.mdno production surface mapped