feat: migrate test infrastructure to xnet#98
Merged
Conversation
3 tasks
Collaborator
Author
This was referenced Apr 5, 2026
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. While primarily test infrastructure changes, this PR introduces runtime modifications including a new /readyz endpoint and listener Ready() methods. An unresolved review comment identifies a potential data race in the readyCheck field that should be addressed before merging. No code changes detected at You can customize Macroscope's approvability policy. Learn more. |
9de66a7 to
d8f57b9
Compare
7d94778 to
f685900
Compare
d8f57b9 to
8d3a4f0
Compare
f685900 to
4ac3963
Compare
aee0554 to
d6d09c2
Compare
4ac3963 to
24536d4
Compare
Dismissing prior approval to re-evaluate d6d09c2
d6d09c2 to
b55e624
Compare
24536d4 to
5e43ef2
Compare
b55e624 to
721fca6
Compare
ae44dbb to
8b4c587
Compare
9b2a528 to
3b6f8c0
Compare
8f06a44 to
dba32cc
Compare
5e43ef2 to
b532c6f
Compare
mkysel
approved these changes
Apr 8, 2026
dba32cc to
b928bbb
Compare
3 tasks
Collaborator
Author
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- xnet uses port 5556 (not 4446) when use_standard_ports=true - xnet-cli up needs --paused flag to add migrator nodes - xnet-cli node add --migrator (not node --migrator) - Drop custom xmtpd/gateway images (incompatible --config-file CLI flag) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Now works after fixing xnet-cli to: 1. Use --environment=anvil instead of --config-file=config://anvil 2. Not override CLI image from xmtpd server image config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…5556 for xnet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cenarios Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses baptistearno/rust-cargo-install to build xnet-cli from the push-mtruypwzqklu branch which includes --environment=anvil and CLI image separation fixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add .github/actions/setup-xnet composite action that: - Installs Nix with cachix/install-nix-action - Configures xmtp Cachix cache for pre-built binaries - Installs xnet-cli via nix profile from the libxmtp branch - Sets up DNS for *.xmtpd.local resolution Replaces the previous cargo-install approach with proper Nix caching, matching the pattern used in xmtp/libxmtp CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The @xmtp/node-sdk native bindings require GLIBC 2.38+ which is not available in node:22-slim (Debian bookworm, GLIBC 2.36). Ubuntu 24.04 (Noble) provides GLIBC 2.39. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the global waitForNextRequest with waitForNotification that takes an installationId parameter. Notifications are only resolved to the matching pending promise, preventing cross-test interference from late-arriving messages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b928bbb to
1620534
Compare
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
Replace the docker-compose-managed XMTP node (node-go + validation + databases) with xnet-cli for test infrastructure. This simplifies the setup significantly and adds advanced integration test scenarios.
xnetDocker networkdev/upstarts xnet with--paused, adds a migrator node, starts the notification DBdev/integrationacceptsv3-writesorv4-writesscenario, dynamically resolves CoreDNS IP for container DNSgatewayUrlsupport for V4-writes scenario (client publishes directly to V4 gateway)waitForNotificationfilters by installationId to prevent cross-test interferencesetup-xnetcomposite actionDesign:
docs/plans/2026-04-04-xnet-integration-design.mdTest plan
go test -p 1 ./...passes with xnet providing XMTP nodes./dev/integration v3-writes— all 5 integration tests pass./dev/integration v4-writes— all 5 integration tests pass (requires d14n activation)shellcheck dev/up dev/down dev/integration— no errors🤖 Generated with Claude Code
Note
Migrate test infrastructure to xnet for integration testing
xnet-cliinstalled via Nix (dev/install-xnet).v3-directandv4-with-migratormessage sources using the new setup-xnet composite action./readyzendpoint toApiServerthat returns 200/503 based on listener stream readiness; both v3 and v4 listeners now expose aReady()method tied to active stream state.docker-composeno longer includes a v3 node service; the notification server now depends on an externalxnetDocker network and exposes/readyzfor healthchecks.Macroscope summarized 1620534.