CedarCopilot wants to merge 1 commit into main from staging
Not deployed
Libra has no production signal for this change yet because it has not deployed. Libra checks hourly for 3 days after each deploy.
This change improves CRM synchronization, scheduled playbook execution, agent guidance, diagnostics, and conversation search. One reproduced CRM synchronization failure remains: matching deals only by raw ID can let a non-active deal from another provider overwrite shared conversation fields. The added test also uses prohibited TypeScript assertions, which must be corrected before merging.
Do not merge until CRM synchronization distinguishes provider-scoped deal identities and the repository typing requirement is satisfied.
A reproduced shared-conversation field overwrite remains in the CRM synchronization path. The remaining test typing issue violates an explicit repository requirement.
Files Needing Attention: apps/server/src/services/crm/crm-field-sync.ts and apps/server/src/mastra/skills/account-config/tools/tests/getRecentExecutionsTool.test.ts
What T-Rex did
### Issue 1
apps/server/src/services/crm/crm-field-sync.ts:126-127
**Qualify deal identity**
The active-deal guard compares only the raw deal ID. CRM providers can use the same ID, so a non-active deal from one provider can be accepted as the active deal from another provider and overwrite shared conversation fields. Pass the incoming provider into this guard and compare both provider and deal ID.
### Issue 2
apps/server/src/mastra/skills/account-config/tools/__tests__/getRecentExecutionsTool.test.ts:50-53
**Remove type assertions**
This test uses `as any` and a second assertion to force the tool execute signature. That violates the repository directive prohibiting TypeScript assertions used to silence typing, including in tests. Replace this with an inferred or validated typed execution boundary; this repository requirement must be satisfied before merging.
---
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 #2797 from CedarCopil..." | Re-trigger Greptile
Greptile also left 2 inline comments on this PR.
Context used:
Libra has not measured any production surfaces for this change yet.