JITSU-227: Google Data Manager adapter and scoped OAuth/recovery - #1523
Merged
Merged
Conversation
JITSU-227: deliver existing-audience additions and explicit removals with durable request polling. Keep mirror and UI creation gated pending audience provisioning and membership refresh.
absorbb
added a commit
that referenced
this pull request
Sep 17, 2026
…1524) ## Summary JITSU-227 — **stacked on #1523** (`feat/jitsu-227-google-data-manager`). Merge that prerequisite first; this PR's reviewable diff is the managed-audience/expiry-refresh slice only. - Add explicit, workspace-authorized Data Manager audience provisioning with a durable internal creation intent. CAS allows one POST; uncertain results reconcile by a persisted server-random marker, never blindly recreate or adopt an arbitrary existing list. - Bind Jitsu-created audiences to one intended sync/account/OAuth configuration. Export strips caller-supplied proof and supplies validated internal evidence; the runner verifies remote identity/type/ownership/marker before mirror execution. - Enable core snapshot mirroring for those managed audiences. Existing audiences remain additions/explicit removals only. Persist provider-ready hashed payloads and reuse them across recovery. - Apply the owner-approved **540-day membership / 30-day refresh** policy. Unchanged fresh members are skipped; due refreshes must be accepted before removals. Two additive Prisma-managed timestamps store member acceptance time and an immutable generation cutoff. ## Scope / deployment - Reverse sync editor/creation rollout remains gated and is the next slice. This is not a production availability announcement. - **Manual deployment** requested: no `deploy:console` label. Runner deployment remains separate. Apply the Prisma schema before deploying the updated runner; existing table grants cover the new columns. - No billing, worker ownership layer, application encryption, live advertising writes or infrastructure provisioning. - Exclusive audience management is an operator agreement, not an API-enforced Google lock. Other writers must not modify managed audiences. An empty estimated size never establishes a baseline. - Missing/ambiguous creation evidence stays unresolved; no automatic reset/delete or second create request. Paused/failed/infrequent syncs can still let members expire. ## Validation - Destination-functions: 186 tests passed (live credential-gated integrations not exercised). - Node runner: 193 passed, 1 optional scale test skipped; runner build passed. - Console: 130 unit tests passed; provisioning/OAuth integration tests passed against disposable PostgreSQL and mocked HTTP. - Destination-functions, runner and console typechecks passed; changed console files passed ESLint; diff/format checks passed. - Local risky-tier finder/verifier/fresh final review before push. Fixed predictable creation correlation with a server-random nonce and added regression coverage. Implementation decisions and API/Hightouch research: `services/retl-runner/src/google-audience-design.md`; provider setup/recovery: `libs/destination-functions/src/functions/google-ads-reverse/README.md`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JITSU-227 — Google Data Manager adapter, scoped OAuth and independently scheduled provider recovery.
builtin.reverse.google-ads/audiencebeside the existing event implementation. Support existing-audience additions and explicit tombstone removals; event conversion delivery is unchanged.source_task.metrics. Syncctl independently launches one-shot recovery Pods: first check after 30 minutes, 1.3x backoff capped at one hour, fixed 24-hour polling window. This does not depend on the model CronJob and also works for manual-only syncs.Deliberate boundaries
Validation
-vet=off: ordinarygo testencounters a pre-existing non-constantfmt.Errorf(stderr.String())vet error injob_runner.gooutside this change.Deployment
Owner approved
deploy:consolefor beta console deployment on merge. Runner and syncctl require separate releases together so the controller recognizes WAITING/RESUMED and schedules recovery. Syncctl's DB role needs SELECT onreverse_sync_controlin addition to its existing task permissions. Fresh Google OAuth project/Data Manager API enablement and scopes are documented, not provisioned here.See
libs/destination-functions/src/functions/google-ads-reverse/README.mdfor the provider contract andservices/retl-runner/src/runtime.mdfor scheduling, cancellation and deployment details.