Skip to content

test(server): add wire snapshots - #701

Open
dustinbyrne wants to merge 2 commits into
mainfrom
chore/add-server-sdk-snapshot-tests
Open

test(server): add wire snapshots#701
dustinbyrne wants to merge 2 commits into
mainfrom
chore/add-server-sdk-snapshot-tests

Conversation

@dustinbyrne

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Add deterministic wire-format snapshot coverage for the Java server SDK as part of the coordinated server-side SDK snapshot rollout. These tests make it easier to compare capture, identity, exception, safe-property, and feature-flag request payloads across SDK implementations and catch accidental serialization changes.

The snapshots cover the existing behavior only; this test-only change does not alter the published SDK or require a release entry.

💚 How did you test it?

  • ./gradlew :posthog-server:test --tests "com.posthog.server.PostHogServerWireSnapshotTest"
  • make checkFormat

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

This PR was prepared with the Pi coding agent (worker). The human directed submission of the completed, independently reviewed server snapshot tests. The implementation keeps the change test-only and omits a changeset because it does not change released behavior. A human review is still required before merge.

@dustinbyrne dustinbyrne self-assigned this Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor
⚠️ `posthog-server` is modified but this PR has no changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but no changeset added:

  • posthog-server

If this change should ship, run pnpm changeset and select a bump level.
If it isn't user-facing (refactor with no behavior change, internal tooling, generated files), no action needed.

@dustinbyrne
dustinbyrne marked this pull request as ready for review August 17, 2026 21:29
@dustinbyrne
dustinbyrne requested a review from a team as a code owner August 17, 2026 21:29
@dustinbyrne
dustinbyrne marked this pull request as draft August 17, 2026 21:29
@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
posthog-server/src/test/java/com/posthog/server/PostHogServerWireSnapshotTest.kt:183
**Remove the unused mock response**

`createClient` enqueues a second response even though each isolated test sends and records exactly one request. This obscures the expected request count and suggests an initialization request that never occurs.

```suggestion

```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "test(server): add wire snapshots" | Re-trigger Greptile

Comment thread posthog-server/src/test/java/com/posthog/server/PostHogServerWireSnapshotTest.kt Outdated
@dustinbyrne
dustinbyrne marked this pull request as ready for review August 17, 2026 21:33
@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "test(server): remove unused mock respons..." | Re-trigger Greptile

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