Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(crm): drop hardcoded HubSpot dealstage->status read default

merged#2557CedarCopilot

CedarCopilot wants to merge 1 commit into staging from fix/hubspot-drop-dealstage-read-default

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 23, 2026, 4:58 PM
  2. Aug 23, 2026, 5:00 PM
  3. Merged
    Aug 23, 2026, 9:15 PM
  4. Live on prod
    Aug 23, 2026, 9:15 PM
  5. Observed 40 hours
    Aug 23, 2026, 9:15 PM
  6. Pipelines steady after this deploy
    Aug 23, 2026, 9:15 PM
  7. Unobserved

    Live on prod, no production signal yet

    Aug 25, 2026, 12:55 PM

Behaviors Libra is checking

CRM integration behavior from crm/hubspot.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 90 prod failure log lines for [UpdateExternalCrmWorkflow] Driver update failed (Step updateOpportunityField failed: HTTP 400: [{\), but this domain-wide failure family is not tied to this intent.

prod, checked Aug 25, 2026, 12:55 PM

Libra has verdicts on 0 of 1 tracked behaviors on prod; 1 is still being checked. Libra checks hourly for 3 days after each deploy.

Why

The HubSpot driver hard-codes a default dealstage → status read mapping that getEffectiveCrmToCedarMappings (in services/crm/crm-pull-refresh.ts) always merges into the read set. Because a driver default is only dropped when a user has their OWN mapping for the same Cedar field, a user who deliberately removes their dealstage → status mapping to stop HubSpot's stage from overwriting Cedar's stage on the hourly resync gets the opposite result: the default un-shadows and keeps pulling HubSpot dealstage onto Cedar status.

This blocks the "Cedar owns the deal stage, ignore HubSpot's stage" setup (needed for Corgi, whose competitive line does not track stage in HubSpot). Removing this one default means HubSpot stage is pulled into Cedar only when a user explicitly maps it; reps who want stage synced still have their explicit mapping, so they are unaffected. Impact on the ~15 HubSpot connections currently relying on the default has been reviewed and is acceptable.

Change

Removes only the dealstage → status entry from hubspotDriver.getDefaultCrmToCedarMappings. No other driver (Salesforce/Attio) and no other mapping (dealname → name, amount → dealValue, closedate → close_date) is touched.

🤖 Generated with Claude Code

Greptile Summary

Removes HubSpot’s default dealstage-to-status pull mapping so Cedar status is updated from HubSpot only when explicitly configured.

  • Preserves the existing default mappings for deal name, amount, and close date.
  • Leaves Salesforce, Attio, and explicit HubSpot mappings unchanged.

Confidence Score: 5/5

The PR appears safe to merge because the behavioral change is narrowly scoped and its compatibility impact is explicitly understood and accepted.

The effective CRM pull mapping now omits HubSpot stage unless a user has explicitly configured a status mapping, while all other HubSpot defaults remain intact.

Important Files Changed

FilenameOverview
apps/server/src/services/integrations/crm/hubspot.tsRemoves only the implicit HubSpot stage-to-status read mapping, matching the documented intent to make this synchronization opt-in.

Reviews (1): Last reviewed commit: "fix(crm): drop hardcoded HubSpot dealsta..." | Re-trigger Greptile

Context used:

Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • apps/server/src/services/integrations/crm/hubspot.tsno production surface mapped