Skip to content

Add idempotent PostHog import#11

Merged
nicosuave merged 3 commits into
mainfrom
posthog-import-idempotency
May 14, 2026
Merged

Add idempotent PostHog import#11
nicosuave merged 3 commits into
mainfrom
posthog-import-idempotency

Conversation

@nicosuave

Copy link
Copy Markdown
Member

Adds a host-side PostHog importer for persons, groups, and historical events.

  • preserves PostHog event UUIDs and uses deterministic UUIDs for synthetic person/group import rows
  • requires R2 SQL target checks by default for real imports, with explicit opt-out for local testing
  • filters each batch against local state and the target table before sending
  • handles ambiguous pipeline sends by polling R2 SQL using a flush-aligned wait instead of blindly retrying
  • includes generic helper scripts for missing UUID checks and imported-row duplicate cleanup, configured by args/env rather than live identifiers

Validation:

  • cargo fmt --all --check
  • cargo test --lib
  • uv run python -m py_compile scripts/dedupe_imported_posthog_rows.py scripts/find_missing_posthog_uuids.py
  • cargo test still fails at tests/persons_do.rs because build/index.js is missing and that test asks to run worker-build first

@nicosuave nicosuave marked this pull request as ready for review May 14, 2026 15:24
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@nicosuave nicosuave merged commit e2f1620 into main May 14, 2026
1 check passed
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