Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(crm): resync deal fields from live CRM before crm-updater reasons about them

merged#2901CedarCopilot

CedarCopilot wants to merge 3 commits into staging from worktree-send-it-crm-updater-resync

What Libra verified

  • A linked deal with a legacy null organization remains eligible for refresh

    Libra ran this behavior against the change and confirmed the check detects when it breaks.

    Technical evidence
    • the live CRM refresh targets the conversation with a null organization ID and supplies its fresh field value instead of leaving the local baseline unchanged

    Changed code: orchestrator-dispatch-tools.ts.

  • Pre-execution CRM refresh changes fields without changing ownership

    Libra ran this behavior against the change and confirmed the check detects when it breaks.

    Technical evidence
    • the pre-execution CRM refresh makes freshly resynced linked-deal field values visible instead of stale conversation values

    Changed code: orchestrator-dispatch-tools.ts.

  • The updater reasons from refreshed core and custom field values

    Libra ran this behavior against the change and confirmed the check detects when it breaks.

    Technical evidence
    • the crm-updater current-field view uses refreshed values for all eight core metadata fields on the same run
    • the crm-updater current-field view represents an absent refreshed core value as null instead of retaining the stale value

    Changed code: conversation-context.ts.

  • Unavailable pre-execution refresh preserves normal updater execution

    Libra ran this behavior against the change and confirmed the check detects when it breaks.

    Technical evidence
    • an enabled non-CRM-sync CRM updater can continue with its pre-refresh local field view when the live CRM refresh fails
    • an enabled non-CRM-sync CRM updater can continue with its pre-refresh local field view when the post-refresh field re-read fails

    Changed code: orchestrator-dispatch-tools.ts.

run 24fffad6-10c2-4458-891a-64ce1f8d12c6, completed Sep 23, 2026, 2:32 AM