Skip to content

feat(gainsight_px_audience): add Gainsight PX Audience destination - #5669

Merged
arpl merged 7 commits into
developfrom
feat/act2-1014-gainsight-px-audience
Oct 14, 2026
Merged

arpl merged 7 commits into
developfrom
feat/act2-1014-gainsight-px-audience

Conversation

@arpl

@arpl arpl commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

  • GAINSIGHT_PX_AUDIENCE DestinationIntegration: one PUT /v1/users/update per row (ID in the body, never the URL), { customAttributes: { <attr>: true|false } }; no lookup, never creates users.
  • X-APTRINSIC-API-KEY is set by the router transform from destination.Config.apiKey (trimmed; the input schema rejects a blank or whitespace-only key as a configuration error), the same way braze_audience sets its auth header. No prepareRequest. secretPaths (regenerated): GAINSIGHT_PX_AUDIENCE: ["headers.X-APTRINSIC-API-KEY"], so Live Events masks it.
  • Delivery overrides only the 404 verdict: 404 on false = success (leaving a user PX doesn't know), 404 on true = abort with PX's message (replays next run). Everything else uses the framework's default classification (429 throttled, 5xx retry, other 4xx abort). failureReason returns PX's own message: the joined externalapierror.subErrors[].message, else the top-level message, else Gainsight PX request failed with status <n>. transformerProxy stays on in features.ts because the 404 override only runs on the proxy delivery path.
  • features.ts: routerTransform, batching, transformerProxy. Component fixtures + live spec.
  • CI check:secret-paths turns green once the integrations-config PR is on main.

Context

Part of Gainsight PX Audience (ACT2-1014): a new GAINSIGHT_PX_AUDIENCE rETL destination that keeps a Boolean custom user attribute in Gainsight PX in sync with an audience (mirror: true while in, false after leaving; never creates PX users), configurable from the webapp and Lookout. Spec and plan: rudder-specs#216.

Verification

Verified end to end on mini against the Gainsight PX sandbox (US): verification page · narrated happy-path video. Every mini-runnable acceptance case passes; two defects found during verification were fixed: DEFECT-1 was re-verified live in the Lookout UI, and DEFECT-2 (the setup-refusal message) is covered by unit tests. A five-lens review panel then ran over all five PRs; its findings are fixed and re-reviewed (see the panel comment). Draft until the release gates below are met. Merge order: integrations-config#2823 → rudder-icons sync/release → integrations-info#793 + transformer#5669 (live CI secret LIVE_SECRET_GAINSIGHT_PX_AUDIENCE added to the CI Vault) → webapp#10262 → Lookout#945 after its icons bump. Enable the catalog flag for a workspace before its Lookout flag, and land the operator router/throttler values before the catalog flag goes on.

Release order (spec §8)

integrations-config → integrations-info + transformer (+ operator router/throttler values) → webapp → Lookout (after the Lookout Flagsmith flag exists in every environment). Catalog flag enable-gainsight-px-audience-destination created off first.

🤖 Generated with Claude Code

arpl and others added 3 commits October 13, 2026 20:22
…UT /users/update per row

ACT2-1014.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…njection in prepareRequest

ACT2-1014.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…egenerate secret paths

ACT2-1014.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 13, 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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c795a806-b7be-43c1-aae5-e51b6fd65e60

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

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (d253cdd) to head (2e7fca8).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5669      +/-   ##
===========================================
+ Coverage    92.11%   92.12%   +0.01%     
===========================================
  Files          708      713       +5     
  Lines        39529    39590      +61     
  Branches      9264     9278      +14     
===========================================
+ Hits         36412    36473      +61     
  Misses        2852     2852              
  Partials       265      265              

☔ 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.

@arpl

arpl commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Review panel — GAINSIGHT_PX_AUDIENCE (ACT2-1014), all five PRs

The panel ran five independent review lenses (security, correctness, product, ops, coherence) over all five PRs together, so the cross-repo contracts were checked too. I also ran live tests against the Gainsight PX US sandbox.

Verdict: Approve with follow-ups. Nothing blocking. Every should-fix and the cheap nits are fixed on these branches, with commits listed below. Each fix had an independent scoped re-review, and both re-reviews approved.

Live checks (PX sandbox, US)

Suite Result
integrations-info live /setup (enabled Boolean attribute accepted; missing attribute refused; wrong key refused; wrong data center refused with the same 401 message) 4/4 pass
transformer live (precondition → insert sets true → read back → delete sets false → read back; unknown user aborted per item) 7/7 pass

Tests and mutation testing (correctness lens)

  • Results: config 8860 pass; info 30/30; transformer 43/43 unit and 14/14 component; webapp 44/44; Lookout backend 1073/1073; Lookout UI 55/56. The one UI failure is the known icon test (see release order).
  • Mutations: 32 mutations reintroduced behaviour the spec forbids, and tests caught 28.
    • The behaviours covered include creating users, sending null on delete, treating 404 as fatal for the job, using the wrong data-center host, inverting the DEFECT-1 gate, and removing the PAT scrub.
    • The 4 that survived exposed test gaps, not code defects. Three of those gaps are now covered.

Findings and how each was resolved

# Sev PR Finding Lenses Resolution
1 Should-fix lookout#945 The DEFECT-2 change sent every destination's /setup refusal text to the Enable toast, but other destinations' integrations-info messages are developer strings (for example, 'Access Token is required'). product, ops, security, coherence Fixed in rudder-lookout ed66569c5: a setupRefusalIsUserFacing field in the registry, set only on GPX. Other destinations keep the ORPC code and copy they have on main, for both the 4xx and success:false paths. The re-review also found the Save toast ignored the clean reason; fixed in 8e87524ec.
2 Should-fix webapp#10262 A webapp edit PUT the connection without running /setup, so a misspelled, STRING or disabled attribute could be saved, and every row then aborts. The spec requires /setup on mapping edit. coherence, product Fixed for GPX on both edit paths: the connection page (77071f085) and the Data Graph drawer (ac1a907f5). A refusal blocks the save. The re-review found two more gaps: a GPX refusal on Data Graph create showed "An unexpected error occurred" (fixed in 6ffac8335), and an unloaded destination could throw on Update (fixed in 635bd9df7). Only an allowlist containing just GAINSIGHT_PX_AUDIENCE re-runs /setup, because other destinations' setups are passthroughs or create vendor lists.
3 Nit lookout, webapp The copy said members who aren't PX users yet are "skipped"; in fact they are reported as failed rows every run. product Fixed on both surfaces with the same sentence: "…reported as failed rows until they exist in Gainsight PX; no users are created." (webapp 3f4b398d6, Lookout bfef995f4 and 7d6f1e7e2)
4 Nit lookout#945 No test failed if the workspace slug was dropped from the account-definitions RPC (DEFECT-1 regression). correctness Fixed in Lookout 2e08ba43f. The new test fails when the slug is dropped.
5 Nit info#793 No test for the US2 host, or for dropping extra client keys from the setup result. correctness Fixed in info f12402723. Both tests were checked to fail against the mutation.
6 Nit transformer#5669 A PX 408 aborts the row instead of retrying it. ops, correctness No change: this matches the spec ("other 4xx → abort"), and the row replays on the next run.
7 Should-fix (release) — Operator router/throttler values aren't in any of these PRs, and the two flags have no coupling check. ops Release gate: the catalog flag is enabled for a workspace before its Lookout flag, and the operator values land before the catalog flag goes on.

Checks that passed

  • Secrets and request targets:
    • The PX key never leaves the secret store. It is added only at send time (prepareRequest), and secretPaths: [] is correct.
    • The host comes from a fixed data-center map in both services (no SSRF).
    • The identifyId goes only into the JSON body.
    • The PAT scrub survived raw, Bearer, URL-encoded and \u-escaped forms, and a PAT cut at the truncation boundary.
  • Contracts: config, info, transformer, webapp and Lookout agree on apiKey, dataCenter, customAttributeName, the identifyId mapping and syncMode: mirror. The attribute pattern is the same in all four layers.
  • Delivery verdicts match spec §6.3. A 404 on false is a success. A 404 on true aborts that item. 429 is throttled, and 5xx is retried per item.
  • Gating fails closed:
    • The catalog gate hides the definition when the flag is missing.
    • config-backend still enforces creation gating.
    • The Lookout flag defaults off, and the server re-checks it on Enable.
    • DEFECT-1 opens only GPX's gate-hidden account definitions.
  • Merging: git merge-tree is clean against the current base for config, info and transformer.

CI and release order

  • The remaining red checks are structural. They clear only in merge order:
    • The live specs on info and transformer need LIVE_SECRET_GAINSIGHT_PX_AUDIENCE in CI Vault; the same values pass locally (table above).
    • Transformer's "Verify generated secret paths" needs config#2823 on main.
    • Lookout's icon test needs @rudderlabs/icons to map GAINSIGHT_PX_AUDIENCE → gainsight-px, which comes from config#2823's options.icon after an icons sync and release.
  • Merge order: config#2823 → icons sync/release → info#793, transformer#5669 → webapp#10262 → bump icons in lookout#945, then merge.

Limits

  • The edit-path /setup and the clean Save/Enable refusal toast are unit-tested. They weren't re-run in the browser on the local stack after these fixes. The earlier end-to-end happy path on that stack still stands (see verify/ in rudder-specs#216).
  • EU and US2 smoke tests, the operator values and the PX 429-on-quota behaviour aren't verified yet. They are release gates.

@arpl
arpl requested review from a team, achettyiitr and shekhar-rudder October 14, 2026 07:50
@arpl
arpl requested a review from shekhar-rudder October 14, 2026 08:17
shekhar-rudder
shekhar-rudder previously approved these changes Oct 14, 2026
@arpl

arpl commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@shekhar-rudder could you re-approve? Your approval was dismissed when d9e7dec landed. That commit addresses your last two comments: apiKey validation moved into the input schema, and the parked live scenario is removed. No other changes since you approved.

@arpl

arpl commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Marking ready. The only red check is commitlint, on intermediate commit 042f76e (header 102 chars). That check is not required, and a squash merge uses the PR title, so the header never lands on develop.

@arpl
arpl marked this pull request as ready for review October 14, 2026 09:33
@arpl
arpl requested review from a team as code owners October 14, 2026 09:33
arpl and others added 3 commits October 14, 2026 12:59
@arpl
arpl force-pushed the feat/act2-1014-gainsight-px-audience branch from d9e7dec to 2e7fca8 Compare October 14, 2026 10:18
@sonarqubecloud

Copy link
Copy Markdown

@arpl
arpl merged commit 98abb78 into develop Oct 14, 2026
49 checks passed
@arpl
arpl deleted the feat/act2-1014-gainsight-px-audience branch October 14, 2026 11:17
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