Skip to content

feat(facebook_lead_ads_native): include custom disclaimer responses in hydrated leads - #5790

Merged
shekhar-rudder merged 2 commits into
developfrom
harness/RUD-3481-feat-facebook-lead-ads-native-i-de509a9a
Nov 17, 2026
Merged

shekhar-rudder merged 2 commits into
developfrom
harness/RUD-3481-feat-facebook-lead-ads-native-i-de509a9a

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Request field_data,custom_disclaimer_responses from Meta and copy a nonempty disclaimer array unchanged into hydrated identify traits. Omit absent, null, empty, or malformed disclaimer values; warn on malformed shapes while preserving other lead traits.

What is the related Linear task?

Resolves RUD-3481

Please explain the objectives of your changes below

Preserve existing lead contact data while making Meta’s checkbox consent record available to downstream destinations. The companion event-structure documentation change is required in rudder-hugo and is not included in this repository.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

Graph requests now name both fields explicitly because fields replaces Meta’s defaults. Only Meta’s nonempty dedicated disclaimer array can populate the disclaimer trait, including when incoming traits or a form field share its name.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

Before rollout, compare one real lead’s Graph response with and without fields=field_data,custom_disclaimer_responses to confirm identical field_data and the disclaimer shape. No lead ID or page token was available for that check. Destination Live Events verification is also pending.

Validation

  • npm run lint — passed.
  • npm test -- --testPathPattern="facebook_lead_ads_native/hydrate.test.ts" --no-coverage --runInBand — passed, 26 tests.
  • npm run test:ts -- component --source=facebook_lead_ads_native --runInBand — passed, 12 tests.
  • npm run build:test and npm run build:ci — passed.
  • git diff --check — passed.
  • Local integration verification skipped: the transformer image is SHA-pinned and cannot run this source change in the local stack.
  • Simplify pass: consolidated repeated test setup and flattened the disclaimer array condition; retained the named fields constant and explicit empty-string assertion as requirement guards.

Developer checklist

  • My code follows the style guidelines of this project
  • No breaking changes are being introduced.
  • All related docs linked with the PR? The companion rudder-hugo edit is prepared; its PR link is pending.
  • All changes manually tested? Live Graph and Destination Live Events checks remain outstanding.
  • Any documentation changes needed with this change? Yes, in rudder-hugo.
  • Is the PR limited to 10 file changes?
  • Is the PR limited to one linear task?
  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?
  • Verified that there are no credentials or confidential data exposed with the changes.

⚠️ Known Issues

  • A real Meta Graph API comparison with and without fields=field_data,custom_disclaimer_responses remains a prerequisite before rollout; no lead ID or page token was available.
  • Destination Live Events verification against a real lead remains pending.
  • The companion documentation edit is prepared in rudder-hugo; coordinate publication with the transformer change.

⚠️ Auto-review unresolved

Adversarial self-review surfaced findings that were not auto-fixed. Each carries its disposition — please evaluate before merging.

  • medium: Consent records are included in raw hydration response logs — src/sources/facebook_lead_ads_native/hydrate.ts:84 — not auto-fixed (iteration budget exhausted)

@rudder-devbox

rudder-devbox Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from task RUD-3481.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: df3c8b76-eba1-429f-919e-7a83aff46484

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

👋 New to CodeRabbit? Try chatting in this PR!

Ask questions about the changes or discuss a review suggestion by mentioning @coderabbitai in a PR comment or a reply to a CodeRabbit review comment.

Try: @coderabbitai explain the changes in this PR and what I should focus on when reviewing.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…d form field

- Request Graph's default lead fields (created_time, id, ad_id, form_id)
  alongside field_data and custom_disclaimer_responses, since an explicit
  fields param replaces the defaults.
- Override a same-named form field with Meta's disclaimer responses only
  when Meta actually returns them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@rudder-devbox

rudder-devbox Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

I traced the failure to Intercom’s live search: intercom-v2-identify-update created its setup contact, but the search did not return it for two consecutive polls after 45 attempts (181 seconds). The update and read-back failures were skipped steps; another scenario using the same search passed after 86 seconds.

This is intermittent Intercom indexing, unrelated to the Facebook Lead Ads changes. I could not fix the external search delay from this workspace, so I made no code change or push. The failed live job needs a rerun.

@shekhar-rudder
shekhar-rudder marked this pull request as ready for review November 17, 2026 05:31
@shekhar-rudder
shekhar-rudder requested review from a team as code owners November 17, 2026 05:31
@shekhar-rudder
shekhar-rudder merged commit 1899034 into develop Nov 17, 2026
50 of 51 checks passed
@shekhar-rudder
shekhar-rudder deleted the harness/RUD-3481-feat-facebook-lead-ads-native-i-de509a9a branch November 17, 2026 05:38
maheshkutty added a commit that referenced this pull request Nov 19, 2026
## What are the changes introduced in this PR?

The Intercom live test's setup steps wait until the transform's compound
contact search can find a newly created contact. The wait was 45 × 4s
(~3 min), and Intercom occasionally takes longer to index, failing
`intercom-v2-identify-update` on unrelated PRs (e.g. run 43918191050 on
#5790).

- Poll attempts: 45 → 75 (~5 min)
- Setup step timeout: 240000 → 360000 ms via `SEARCH_WAIT_TIMEOUT_MS`,
applied to both setup steps that use `waitForTransformSearch`

## What is the related Linear task?

N/A

## Please explain the objectives of your changes below

Reduce flakiness in `live (intercom)` caused by Intercom search-index
lag. Test-only change.

### Any changes to existing capabilities/behaviour, mention the reason &
what are the changes ?

N/A

### Any new dependencies introduced with this change?

N/A

### Any new generic utility introduced or modified. Please explain the
changes.

N/A

### Any technical or performance related pointers to consider with the
change?

A slow run takes up to ~2 min longer; the live job's 30-min timeout
still has room.

<hr>

### Developer checklist

- [x] My code follows the style guidelines of this project

- [x] **No breaking changes are being introduced.**

- [ ] All related docs linked with the PR?

- [ ] All changes manually tested?

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants