Skip to content

fix(server): harden edge cases with regression coverage - #2229

Merged
mbuckton merged 67 commits into
developmentfrom
fix/periodic-runner-test-flake
Sep 18, 2026
Merged

mbuckton merged 67 commits into
developmentfrom
fix/periodic-runner-test-flake

Conversation

@mbuckton

Copy link
Copy Markdown
Contributor

Summary

This branch started as test-flake cleanup and was expanded into a focused coverage pass. The majority of the diff is test/support code, with small production fixes only where regression tests demonstrated incorrect behavior.

Test and coverage work

  • Stabilize periodic runner and high-fanout ordering tests.
  • Gate tests that require external CAN/satellite dependencies.
  • Add happy, sad, and Murphy coverage for device configuration, routing metrics, CIDR matching, cache behavior, battery duration, geographic utilities, endpoint DTO helpers, MQTT Will configuration, and internal message transformation.
  • Archive merged JaCoCo XML from the sharded Jenkins run.

Production fixes proven by tests

  • Parse hexadecimal I2C addresses correctly.
  • Correct Serial, OneWire, and SPI configuration update/round-trip behavior.
  • Implement the previously stubbed SerialDeviceConfig serialization/update contract.
  • Preserve MQTT Will payload encoding during updates.
  • Handle endpoints before protocol detection completes.
  • Fix route metric sampling and millisecond timestamps.
  • Reject invalid CIDR prefix lengths.
  • Preserve serialized message metadata/state through Message JSON transformation.
  • Wait for HA lock worker threads to stop during close.
  • Process the exact SimpleStats interval boundary.
  • Store CoAP publishes before sending the acknowledgement.
  • Preserve NATS publish ordering.
  • Remove unused FqnTree.

Review notes

Against the current development branch, the diff is predominantly tests/support:

  • 24 test/support files, about 1,436 added lines.
  • 16 runtime files, about 173 added lines.

The NATS publish-ordering change is the most significant runtime behavior change. It waits for asynchronous destination resolution before storing the message, providing ordering/backpressure rather than dispatching stores from completion callbacks.

Verification

An earlier Jenkins run on this branch completed with 0 failures and increased coverage by approximately 0.5 percentage points.

The current head contains an additional coverage/fix batch after that run, so a fresh Jenkins run is required before merge.

The branch is also currently behind development and should be updated/revalidated before merge.

mbuckton and others added 30 commits September 16, 2026 21:59
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c85efaea-ab8d-41d6-9598-df4419816423

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mbuckton
mbuckton marked this pull request as ready for review September 18, 2026 09:23
@mbuckton
mbuckton merged commit 3ab051a into development Sep 18, 2026
4 checks passed
@mbuckton
mbuckton deleted the fix/periodic-runner-test-flake branch September 18, 2026 09:24
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