Skip to content

fix: harden identity and legacy schema upgrades#3

Closed
dannyshmueli wants to merge 2 commits intomainfrom
age-2-oss-hardening
Closed

fix: harden identity and legacy schema upgrades#3
dannyshmueli wants to merge 2 commits intomainfrom
age-2-oss-hardening

Conversation

@dannyshmueli
Copy link
Copy Markdown
Member

Summary

  • make OSS writes identity-aware at SQL time so late /track events still resolve to the canonical user after /identify
  • add legacy schema compatibility for both SQLite and Cloudflare D1, including events.country and identity_map
  • cover the upgrade and race cases with end-to-end regression tests and document the trustworthy /query surface

Verification

  • npm test
  • npm run lint

Context

dannyshmueli and others added 2 commits March 30, 2026 11:45
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
@dannyshmueli
Copy link
Copy Markdown
Member Author

Closing this as superseded.

The underlying identity/schema issue was real, but the right fix ended up spanning @agent-analytics/core, this OSS repo, and agent-analytics-hosted so late /track writes canonicalize through identity_map everywhere instead of only in OSS.

This PR also mixed in /query contract changes that did not line up with the pinned core behavior, so I don't want to merge it as the source of truth.

The problem this PR was trying to solve is now handled in the shared/core path plus both consumers, with tests passing in all three repos.

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