Repository navigation
Fix stopped-peer ack checks and service load cleanup - #8526
Merged
Merged
Conversation
Check acknowledgement freshness only for joined live peers, and always clean up service load on context exit. Join its polling thread before terminating the client to avoid a shutdown/restart race. Add infrastructure regressions and run them in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
October 7, 2026 21:34
View session
Keep the PR focused on the stopped-peer acknowledgement and service-load cleanup fixes, as requested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup can mask the originating test failure when load shutdown or result rendering also raises.
1 open finding
What changed in this PR
Fixes stopped-peer acknowledgement checks and ensures service load cleanup runs on exceptions.
Changes:
- Excludes stopped peers from primary acknowledgement freshness checks.
- Stops and joins the load worker before terminating Locust.
- Runs cleanup whenever the load context exits.
Custom instructions used:
- CCF Repository Copilot Instructions
.github/skills/testing/SKILL.md
| File | Description |
|---|---|
tests/nodes.py |
Filters acknowledgement checks to joined, running nodes. |
tests/infra/service_load.py |
Adds deterministic context and worker cleanup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Max (maxtropets)
approved these changes
Oct 8, 2026
Log shutdown errors when the load context is already unwinding a failure, then re-raise the original exception. Keep cleanup failures fatal on normal context exit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Amaury Chamayou (achamayou)
enabled auto-merge (squash)
October 8, 2026 13:45
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.

Motivation
The Coverage SNP Genoa run failed after an 882 ms ledger fsync delayed the post-election acknowledgement check. That check incorrectly required a fresh acknowledgement from the primary the test had deliberately stopped. Exception cleanup then left Locust running with inherited stdout, causing CTest to report a timeout instead of the test failure.
Implementation summary
No new tests, CI wiring, or documentation changes are included. Local formatting and lint checks passed for the final changed files;
scripts/ci-checks.shpassed before the test-only additions were removed. The fullnodes_teste2e command (cd build && ./tests.sh --timeout 360 --output-on-failure -R '^nodes_test$' --no-tests=error) was not run locally because this worktree has no configured build or built logging application; it remains covered by existing CI.Safety and compatibility
Test code and infrastructure fixes only: no CCF runtime, consensus, API, ledger format, recovery, or mixed-version behaviour changes. The acknowledgement check still rejects stale live peers. Cleanup waits for the existing load worker to finish before terminating its subprocess, and test-body exceptions continue to propagate.