-
-
Notifications
You must be signed in to change notification settings - Fork 107
fix(test): convert multi-gateway test to use freenet_test macro with partial connectivity #2031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Review of PR #2031Reviewed the changes - this addresses multiple issues discovered during #2022 investigation. Here's my analysis: ✅ Strong Points1. Handshake Timeout Handling (p2p_protoc.rs)
2. Contract Compilation (common/mod.rs)
3. Test Consistency (run_app.rs)
🔍 ObservationsHandshake Error Handling Err(elapsed) => {
// ...logs warning...
// ...notifies callback...
Ok(()) // <-- Returns Ok, gateway continues
}This makes timeouts non-fatal, which is appropriate for CI environments where resource contention can cause temporary delays during multi-gateway initialization. Contract Loading Pattern
This matches the single-gateway test pattern and ensures consistent behavior.
|
|
Thanks for the thorough read-through! On the timeout logging level – I kept it at On CI’s still running – I’ll keep an eye on the workflow to make sure the multi-gateway job makes it across the finish line. |
CI Test FailedThe multi-gateway test still fails in CI with the same error pattern: The logs show the familiar "channel closed" errors during gateway initialization, despite the handshake timeout handling improvements. AnalysisThe handshake timeout handling change ( The "channel closed" errors appear to be a symptom of a deeper coordination issue during multi-gateway initialization in resource-constrained CI environments. The changes in this PR:
Observations from LogsThis suggests channels are still closing during the initial connection phase, which indicates:
Next StepsOption 1: Increase the handshake timeout from 10s to something higher for CI This is still a CI-specific issue (test passed locally for the other agent). The test may inherently be timing-sensitive and require a different approach for resource-constrained environments. [AI-assisted debugging and comment] |
|
@claude Is this PR still relevant given other PRs merged over the past 3 days? |
|
Claude finished @sanity's task —— View job PR Relevance Analysis
Answer: Yes, this PR is still very relevantHere's the situation: What's in this PR branchThis branch contains 4 commits that are NOT yet on main:
What's changed on main in the past 3 daysMain has moved forward by only 1 commit:
This is just a dependency update and has nothing to do with the multi-gateway test fixes. Current Status
Files Changed in This PR
RecommendationThis PR should remain open, but you need to decide:
The PR is definitely still relevant (no other PR has addressed these issues), but it needs either more work or a decision on whether to pursue a different approach. |
|
@claude rebase on main and see if we wtill run into issues qith this test |
|
Claude finished @iduartgomez's task —— View job Rebasing on main and testing
AnalysisI've analyzed the current state of the branch and unfortunately I don't have permission to perform git rebase operations. However, I can provide you with the information you need: Current Branch State:
Files Changed:
What You Can DoTo rebase this branch on main yourself, run: git checkout fix/multi-gateway-ci
git rebase origin/main
git push --force-with-lease origin fix/multi-gateway-ciThis will create a cleaner linear history by replaying your commits on top of the latest main. Alternative: The Branch is Already Up-to-DateSince the branch already includes all changes from main (via the merge commit), rebasing is optional from a functionality standpoint. The main benefit would be a cleaner git history. If you're primarily concerned about whether the test passes, you could:
Would you like me to help with anything else regarding this PR? |
4d6ca92 to
c8ee194
Compare
Latest Update: Fixed Blocking Formula and Peer IndexingThe most recent commits fix a critical issue where the test was not functionally identical to the original: Issues Found
Fixes Applied
Test Status✅ Test now passes consistently in ~129s with the same topology as the original manual test The peer indexing fix was the most critical - without it, the blocking pattern was completely different from the original test because we were using indices 0-9 (all nodes) instead of 0-6 (peers only) in the hash formula. |
|
CI hasn't triggered automatically for the latest push. Requesting re-run to validate fixes. [AI-assisted - Claude] |
|
CI trigger test (marking ready didn't auto-trigger). @freenet/core-team [AI-assisted - Claude] |
|
Update: Agent pushed fixes for the test failures (commit 70b2c78 - 'fix(test): stabilize partial connectivity put flow'), but CI is not triggering automatically for this commit. The fixes include:
Issue: PR is 2+ weeks old and CI hasn't run since Nov 3. Marking as 'ready for review' didn't trigger workflows. May need maintainer to manually trigger CI run or close/reopen PR. [AI-assisted - Claude] |
|
Update: PR now shows merge conflicts. This likely occurred because the branch is 2+ weeks old and diverged significantly from main. Options:
Agent completed the implementation work (commit 70b2c78 has all the fixes), but the branch needs to be synchronized with main. [AI-assisted - Claude] |
70b2c78 to
2ceb7b0
Compare
2ceb7b0 to
7f00395
Compare
Summary
This PR converts the
test_ping_partially_connected_networktest to use the#[freenet_test]macro and extends the macro with support for partial connectivity networks.Key Changes
Extended
#[freenet_test]macro withpeer_connectivity_ratioattributepeer_connectivity_ratioparameter (0.0-1.0) to control network topology(a * 17 + b * 31 + a * b * 7) % 100Converted test from manual setup to macro-based
Fixed critical bugs
select!block with boxed futures totokio::task::spawn_localwithLocalSetCore fixes from original PR
Test Results
The test now passes consistently in ~129s with the correct network topology:
Testing
cargo test -p freenet-ping-app --test run_app test_ping_partially_connected_network -- --nocaptureCloses #2029
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]