Skip to content

CI: per-test-binary DDS domains + a ReleaseSmall lane - #76

Merged
sqt merged 1 commit into
mainfrom
lock_in_the_green_part_2
Aug 30, 2026
Merged

CI: per-test-binary DDS domains + a ReleaseSmall lane#76
sqt merged 1 commit into
mainfrom
lock_in_the_green_part_2

Conversation

@sqt

@sqt sqt commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Motivation

The ARM64 / DebugAllocator / TSan CI lanes flake intermittently: zig build test runs ~29 participant-creating test binaries in parallel and every one binds domain-0's fixed RTPS ports (SPDP multicast 7400, metatraffic unicast), so under a slow lane the losers hit error.BindFailed, discovery stalls, and a loopback test times out. Separately, tcp_transport_test's reconnect-generation assertion depended on a fixed 100 ms sleep that loses a TCP-settling race under load. And -OReleaseSmall was never built or run anywhere (a roadmap CI-coverage gap).

Description of changes

  • Unique domain per test binary. New test/support/domain.zig; build.zig assigns each test binary's Run step a distinct ZZDDS_TEST_DOMAIN_BASE (per-lane counter, via a small addTestRun helper). The ~24 DCPS/C-ABI tests call test_domain.get() instead of hardcoding domain 0 — distinct domains map to disjoint port sets (250-port stride), so parallel binaries never contend. loopback_test / wlp_loopback_test, which hand-wire the stack, also thread the domain through their UdpTransport.init / SpdpSedpDiscovery.init calls.
  • tcp_transport_test reconnect race. The "connectionGeneration increments on reconnect" test now drives the reconnecting send() until the new TcpConnection is observed (5 s deadline) instead of sleeping a fixed 100 ms — same invariant asserted, no magic constant.
  • ReleaseSmall lane. New zig build test-release-small runs the unit suite at -OReleaseSmall, forcing the LLVM backend to work around a Zig 0.16 self-hosted-x86_64 codegen bug (read-only globals emitted without alignment at that optimize level; fixed on Zig 0.17 master). Wired into run_deterministic_matrix.py and release.yml (Linux x86_64). Revert to the plain self-hosted backend at the Zig 0.17 bump.
  • Docs. docs/roadmap.md CI section and docs/design/ci-platform-coverage-expansion.md updated; CHANGELOG.md gains a 2026-08-29 entry.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@sqt

sqt commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Aug 29, 2026

Copy link
Copy Markdown

Greptile Summary

The PR isolates participant-creating test binaries onto separate DDS domains, replaces a timing-dependent TCP reconnect check with generation polling, and adds LLVM-backed ReleaseSmall coverage.

  • Adds a validated environment-based test-domain helper and threads it through socket-creating DCPS/C-ABI tests.
  • Adds per-lane domain assignment in the normal, ReleaseSmall, and TSan build graphs.
  • Adds ReleaseSmall coverage to the deterministic matrix and Linux release workflow.
  • Updates TCP reconnect testing and supporting CI documentation.

Confidence Score: 5/5

The PR appears safe to merge; no concrete blocking or independently actionable non-blocking issue was identified.

The domain helper validates its input and is consistently propagated through the relevant networked tests, while the new reconnect check observes an actual connection-generation change and the ReleaseSmall lane is wired through the intended LLVM-backed graph.

Important Files Changed

Filename Overview
build.zig Adds per-binary domain assignment and a complete LLVM-backed ReleaseSmall test lane without an identified correctness issue.
test/support/domain.zig Parses, validates, and process-caches a bounded DDS test domain with a safe nonzero fallback.
test/transport/tcp_transport_test.zig Replaces a fixed reconnect delay with bounded polling of the transport's genuine connection-generation signal.
scripts/run_deterministic_matrix.py Adds the ReleaseSmall build step to local and CI deterministic validation.
.github/workflows/release.yml Runs the LLVM-backed ReleaseSmall suite on the exercised Linux x86_64 release lane.
test/dcps/loopback_test.zig Consistently threads the assigned domain through UDP transport, discovery, and participant creation.
test/dcps/wlp_loopback_test.zig Keeps both loopback participants within the assigned domain while separating this binary from parallel tests.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  B[Zig build lane] --> C[Per-lane domain counter]
  C --> R1[Test binary Run step]
  C --> R2[Test binary Run step]
  R1 --> D1[ZZDDS_TEST_DOMAIN_BASE = N]
  R2 --> D2[ZZDDS_TEST_DOMAIN_BASE = N + 1]
  D1 --> P1[DDS participants and discovery]
  D2 --> P2[DDS participants and discovery]
  P1 --> U1[Distinct RTPS UDP port range]
  P2 --> U2[Distinct RTPS UDP port range]
Loading

Reviews (1): Last reviewed commit: "CI: per-test-binary DDS domains + a Rele..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sqt
sqt merged commit a2f679d into main Aug 30, 2026
73 of 74 checks passed
@sqt
sqt deleted the lock_in_the_green_part_2 branch August 30, 2026 07:32
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