test: stabilize output polling coverage (Fixes #564) - #565
Conversation
Exercise pending and ready states deterministically in the real output-test polling helpers, without changing production behavior or coverage budgets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance Report (Linux)Result: ✅ Within regression budgets
|
Test Coverage Report (Linux)Result: ✅ Within regression budget
|
Performance Report (macOS)Result: ✅ Within regression budgets
|
Performance Report (Windows)Result: ✅ Within regression budgets
|
Test Coverage Report (Windows)Result: ✅ Within regression budget
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The test-only changes deterministically cover the required polling paths and preserve existing runtime behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Stabilizes pet-jsonrpc output polling coverage through deterministic test synchronization.
Changes:
- Adds bounded-channel coordination for pending polling states.
- Tests pending and initially-ready length/error paths.
- Updates existing helper call sites for optional coordination.
| File | Description |
|---|---|
crates/pet-jsonrpc/src/output.rs |
Adds deterministic polling-helper tests without changing production behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Current-head Copilot review recommends approval with no findings. Native raw LCOV confirms both real polling helpers now execute their pending paths on every platform: length-wait assertion/yield hits are Linux 8, Windows 139, macOS 1; error-wait hits are 9, 491, and 3 respectively. Coverage against the workflow baselines improves on all three platforms: Linux 85.580% (+0.033pp), Windows 83.130% (+0.055pp), native macOS 80.586% (+0.069pp). All three CodeQL analyses have zero results and no errors/warnings. I inspected all performance snapshots and exact-inventory checks. Windows/macOS warm discovery improves; Linux is 68ms versus 48ms (+20ms), and cold discovery is 148ms versus 108ms (+40ms). Those differences remain within the unchanged budgets and are accepted as measurement variation for a change wholly inside the test module; no production code or benchmark setup changed. No reruns or relaxed thresholds were used. The two ordinary macOS test jobs are still finishing, so this remains draft until those gates complete. Required human approval will not be bypassed. |
Merge main after PR #565 so session benchmark coverage no longer depends on output-test scheduling. Preserve all published benchmark commits without rewriting history. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make the output tests exercise their real polling helpers deterministically, so coverage no longer depends on whether the writer finishes before the first poll.
Validation: 53 pet-jsonrpc all-target/all-feature tests; workspace all-target/all-feature Clippy; mandatory Rust precommit checks; independent Reviewer LGTM. Signed commit 840e70a.
Fixes #564