Skip to content

fix: complete canonical attribution handoff contracts - #36

Merged
Atroci merged 2 commits into
masterfrom
fix/issue-34-attribution-handoff
Sep 16, 2026
Merged

Atroci merged 2 commits into
masterfrom
fix/issue-34-attribution-handoff

Conversation

@Atroci

@Atroci Atroci commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Complete the consent-aware Astro lifecycle and approved sibling-domain handoff configuration.
  • Map server conversion aliases to canonical fields with stable event IDs and occurred_at.
  • Keep host-owned attribution correlation opaque and out of canonical ClickTrail fields.
  • Add safe adapter boundaries and a source-level Supletivo OTP, invoice, and signed Pix replay fixture.
  • Document the host-owned handoff and retry rules.

Acceptance criteria

The PR is acceptable when consent, first-touch preservation, approved-domain token integrity, canonical server mappings, invoice-authoritative Pix validation, duplicate suppression, and PII boundaries remain covered by the committed tests and all local workspace gates pass.

Validation

  • pnpm build
  • pnpm typecheck
  • pnpm test
  • pnpm probe (12/12 fixtures and WordPress reference probe)
  • git diff --check

Refs #34.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T22:36:21.078332Z 804eee4 PR opened
🔒 Security Review ✅ Completed 2026-09-16T22:39:11.826173Z 804eee4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 804eee4d5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return buildEventPayload(payload, canonicalName, {
...data,
...(formId !== undefined ? { form_id: formId } : {}),
...(leadId !== undefined ? { lead_id: leadId } : {}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize lead IDs before copying them to the wire

When a host supplies an unprefixed but otherwise valid identifier such as leadId: "42", this mapping emits top-level lead_id: "42", while buildMarketingTrailEnvelope() applies prefixed(..., "lead_") and emits marketing_trail.lead_id: "lead_42". Consumers joining the canonical field with the attached envelope therefore see two different lead identities. Normalize the trusted alias before building both surfaces, or preserve it unchanged in the envelope; the equivalent new mappings in the Astro server and tenant adapter have the same issue.

Useful? React with 👍 / 👎.

@Atroci
Atroci merged commit 49c5bc1 into master Sep 16, 2026
12 checks passed
@Atroci
Atroci deleted the fix/issue-34-attribution-handoff branch September 16, 2026 22:41
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.

1 participant