Skip to content

test(runner): stabilize heartbeat coalescing coverage - #30184

Open
seven332 wants to merge 1 commit into
mainfrom
test/30179-stabilize-heartbeat-coalescing
Open

test(runner): stabilize heartbeat coalescing coverage#30184
seven332 wants to merge 1 commit into
mainfrom
test/30179-stabilize-heartbeat-coalescing

Conversation

@seven332

@seven332 seven332 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a test-only manual routine-heartbeat source while preserving the production 10-second interval and missed-tick behavior
  • drive the coalescing regression test with explicit ticks instead of Tokio's paused clock
  • keep coverage at the real runner main-loop entry point, including lifecycle sampling, status persistence, provider calls, single-flight behavior, and heartbeat sequencing

Why

The paused-clock test intermittently advanced unrelated runner deadlines while waiting for routine-heartbeat work to be observed. Depending on scheduling, those deadlines could move the runner into stopping or let the assertion run before the intended tick was processed, producing either an extra heartbeat or a timeout. The production coalescing behavior was not the source of the race.

Validation

  • cargo fmt --all -- --check
  • target test: 100/100 repeated passes
  • cargo test -p runner cmd::start::tests::main_loop::heartbeat --all-features (9 passed)
  • cargo test -p runner --all-targets --all-features --quiet -- --test-threads=1 (3374 passed, 26 ignored, plus 1 integration test passed)
  • cargo clippy -p runner --all-targets --all-features -- -D warnings
  • cargo doc -p runner --all-features --no-deps
  • repository pre-commit hooks: workspace Rust format, Clippy, docs, and file-size checks passed

Scope

Production heartbeat cadence and HeartbeatController behavior are unchanged. Unrelated proxy runtime-marker discovery flakes observed only during parallel full-suite runs are intentionally excluded; those legacy/conflict scenarios are already being replaced by #30161 / #30166, and the serial full runner suite is green.

Closes #30179

@github-actions

Copy link
Copy Markdown
Contributor

API preview: https://pr-30184-api.vm6.ai

@seven332

Copy link
Copy Markdown
Contributor Author

Code Review: PR #30184

Reviewed head: 32b35a6a49fcb4ecd083be499847d96d2d6da73d

Summary

The test-only manual trigger removes unrelated virtual-clock advancement while preserving the production interval and the real runner main-loop, lifecycle, provider, status, and HeartbeatController paths. The exact coalescing, live-mode, sequence, and single-flight assertions remain intact.

Findings

No findings.

Testing

Reviewed 100 repeated target passes, the complete heartbeat module, the serial full Runner suite, strict Runner Clippy, rustdoc, formatting, and workspace Rust pre-commit checks. Parallel suite noise was limited to two unrelated legacy-marker scenarios already being replaced by #30161 / #30166.

Verdict

LGTM

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/runner/src/cmd/start/mod.rs 90.90% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

test(runner): stabilize heartbeat coalescing race coverage

1 participant