Skip to content

test(everflow): mint a fresh click per live run - #5779

Merged
shekhar-rudder merged 2 commits into
developfrom
test/everflow-live-fresh-click
Nov 11, 2026
Merged

shekhar-rudder merged 2 commits into
developfrom
test/everflow-live-fresh-click

Conversation

@shekhar-rudder

@shekhar-rudder shekhar-rudder commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

What

live (everflow) fails on every branch: the success scenario replays a single transactionId stored in LIVE_SECRET_EVERFLOW, and that click no longer converts — Everflow rejects the postback with a bodyless 204 (which our delivery spec correctly treats as a rejection). Re-runs fail the same way; it is not caused by any PR.

This makes the scenario self-sustaining:

  • A new mint click setup action calls the tracking domain's /sdk/click?oid=&affid=&async=json endpoint (the one Everflow's JS SDK uses, no API key) and registers the returned transaction_id. The tracking domain is the origin of config.postbackUrl, since Everflow serves clicks and postbacks from the same network tracking domain.
  • The deliver conversion step seeds the event with that fresh id, with retries: 2: a postback that lands before Everflow has recorded the just-minted click gets a 204 and records nothing (no conversion event on the transaction), so a retry is safe. Seen once in CI, where the click-to-postback round trip is ~200ms.
  • The secret now carries the long-lived parent ids resourceIds.offerId / resourceIds.affiliateId instead of a transactionId that expires.
  • live-integration-test skill: one sentence noting that partner ids which expire (clicks, sessions) must be minted per run, not stored.

The random-transaction rejection scenario is unchanged.

Vault (done)

LIVE_SECRET_EVERFLOW has been updated: resourceIds.offerId / resourceIds.affiliateId added, transactionId removed, and config.postbackUrl pointed at the sandbox network's current tracking domain (the previously stored domain no longer accepted clicks or conversions for the test offer).

Testing

  • npx tsc --noEmit -p tsconfig.test.json clean; prettier clean.
  • Local test:live --destination=everflow against the sandbox account with the corrected secret: 3/3 pass on every run (mint click → deliver conversion → reject random transaction ID).
  • CI live (everflow) with the updated secret: 3/3 pass on rerun; one earlier attempt hit the click-not-yet-recorded 204 that retries now covers.
  • Missing-id and invalid offer/affiliate paths fail in mint click with messages naming the LIVE_SECRET_EVERFLOW key to fix.

🤖 Generated with Claude Code

The success scenario replayed one transaction_id stored in Vault. Once its
click aged past the offer's attribution window, Everflow rejected every
conversion with a bodyless 204, failing live (everflow) on every branch.

Mint a click per run via the tracking domain's /sdk/click endpoint in a
setup action and seed the conversion with its transaction_id. The secret
now carries the stable offerId/affiliateId instead.

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

coderabbitai Bot commented Nov 10, 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: 4c5bf4dc-efa7-4db3-b333-86dc3003cdb4

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

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

@shekhar-rudder
shekhar-rudder marked this pull request as ready for review November 10, 2026 08:52
@shekhar-rudder
shekhar-rudder requested review from a team as code owners November 10, 2026 08:52
Copilot AI balanced review requested due to automatic review settings November 10, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The live integration setup derives the tracking domain from the postback URL, causing click creation to fail when the postback and tracking hosts differ.

1 open issue
What changed in this PR

Updates Everflow’s live conversion test to create a fresh click each run instead of reusing a transaction ID that expires.

Changes:

  • Adds a click-minting setup action and uses its transaction ID for the conversion.
  • Requires stable offer and affiliate IDs in the live secret; leaves the random-transaction rejection scenario unchanged.
  • Documents per-run creation of expiring partner IDs.
File Description
test/​integrations/​destinations/​everflow/​live.ts Creates and registers a fresh click before delivering the conversion.
.claude/​skills/​live-integration-test/​SKILL.md Adds guidance for creating expiring partner IDs per run.

Review effort: Balanced

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.45%. Comparing base (b1642e7) to head (17d2a32).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5779   +/-   ##
========================================
  Coverage    92.45%   92.45%           
========================================
  Files          741      741           
  Lines        41158    41172   +14     
  Branches      9684     9610   -74     
========================================
+ Hits         38052    38065   +13     
- Misses        2923     2924    +1     
  Partials       183      183           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ecorded

A postback that lands before Everflow has recorded the just-minted click
gets a 204 and records nothing, so retrying it is safe. Seen once in CI,
where the click-to-postback round trip is ~200ms.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the update that generates a fresh Everflow click for each live-test run.

1 open issue

Review effort: Balanced

@sonarqubecloud

Copy link
Copy Markdown

@lvrach lvrach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this review is part of an experiment, the #proj-auto-approve auto-approval process. No human looked at this PR. Auto-approve category: tests, logs and metrics.

Approve. mint click runs once, and each retry of deliver conversion reads the same registered id. A transformer that builds a wrong postback gets a 204 on every attempt, delivery.ts:25 treats 204 as a rejection, and all 3 attempts fail. The rejection scenario still uses a random id from ctx.identity. Query parameters are encoded, and taking the origin of postbackUrl keeps http or https. Only oid and affid can reach a log, inside an AxiosError, and neither is a credential. The skill sentence is accurate. CI is green, including Live Integration Tests.

Should-fix

  • everflow/live.ts:15-27: the click call has no timeout. A tracking domain that accepts the connection and never answers leaves the request pending until the jest timeout, with no message naming the cause. Add timeout: 15000, as vero, criteo_audience and gainsight_px do.
  • live.ts:28: a 200 with body null throws a bare TypeError, and {"transaction_id": true} passes and registers a bad id. Check for a non-empty string before registering, and throw a fixed message that leaves out the body.

Nits

  • live.ts:14: a missing config.postbackUrl becomes new URL('undefined') ("Invalid URL"). Name LIVE_SECRET_EVERFLOW.config.postbackUrl in the error.
  • live.ts:69: if an attempt records a conversion but the step counts it as failed (for example a 5xx), the retry can post a second conversion. That is unlikely in a sandbox. A short delay before one attempt would avoid it, if you prefer.

@shekhar-rudder
shekhar-rudder merged commit 55bc61f into develop Nov 11, 2026
38 of 40 checks passed
@shekhar-rudder
shekhar-rudder deleted the test/everflow-live-fresh-click branch November 11, 2026 07:54
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.

3 participants