Skip to content

Re-enable ignored tests: cross-node subscription and multi-node operations #2220

@sanity

Description

@sanity

Problem

Multiple tests are currently disabled with #[ignore] that indicate significant functionality issues, particularly around:

  1. Cross-node subscription propagation - updates don't reliably reach subscribers on different nodes
  2. Multi-node network operations - various failures in partially connected networks

These disabled tests represent real bugs that affect production use of Freenet.

Affected Tests

High Priority - Cross-Node Subscription (Core Functionality)

Test File Issue
test_multiple_clients_subscription crates/core/tests/operations.rs:646 Client 3 on node-b never receives update notifications from node-a

Root Cause Analysis:
When running this test, the failure mode is:

  • Client 1 on node-a PUTs a contract and subscribes
  • Client 2 on node-a subscribes (works - same node)
  • Client 3 on node-b GETs the contract and subscribes
  • Client 1 sends an UPDATE
  • Client 3 never receives the update notification

Logs show transaction timeouts. The issue is that cross-node subscription propagation doesn't properly register node-b as a network subscriber on the node seeding the contract.

This was previously tracked in #1798 (closed prematurely).

High Priority - Multi-Node Operations

Test File Issue
test_ping_multi_node apps/freenet-ping/app/tests/run_app.rs:463 "currently fails"
test_ping_multi_node_with_update apps/freenet-ping/app/tests/run_app.rs:1090 "currently fails"
test_ping_partially_connected_network apps/freenet-ping/app/tests/run_app_partially_connected_network.rs:36 "nodes fail on startup with channel closed errors"

Medium Priority - Connection Handler

Test File Issue
simulate_nat_traversal_drop_first_packets_for_all crates/core/src/transport/connection_handler.rs:1509 "should be fixed"
simulate_nat_traversal_b_to_a_no_first_response connection_handler.rs:1692 "should be fixed"
simulate_nat_traversal_a_to_b_no_first_response connection_handler.rs:1721 "should be fixed"
simulate_nat_traversal_repeat_first_packet connection_handler.rs:1779 "Flaky in CI"
simulate_nat_traversal_drop_packets_for_both connection_handler.rs:1911 "should be fixed"

Lower Priority - Application Tests

Test File Issue
test_basic_room_creation crates/core/tests/ubertest.rs:263 "connection issues"
test_app_ubertest crates/core/tests/ubertest.rs:389 "requires fixes still in progress"

Expected Outcome

  1. Cross-node subscription propagation works reliably
  2. Updates sent from one node reach all subscribed clients on other nodes
  3. Multi-node tests pass consistently in CI

Technical Context

PR #2219 recently separated local client subscriptions from network peer subscriptions, which is architecturally correct. However, the cross-node test failure predates this change and is about the network-level subscription routing between nodes.

The subscription flow for cross-node updates should be:

  1. Node-b receives subscribe request from local client
  2. Node-b forwards RequestSub to peer closer to contract location (node-a or gateway)
  3. That peer registers node-b as a network subscriber via add_subscriber()
  4. When UPDATE happens, get_broadcast_targets_update() returns node-b
  5. UPDATE message is sent to node-b
  6. Node-b delivers to local subscribed clients

Something in this chain is broken for cross-node scenarios.

Acceptance Criteria

  • test_multiple_clients_subscription passes reliably (not flaky)
  • At least one multi-node ping test (test_ping_multi_node or test_ping_multi_node_with_update) passes
  • Tests are re-enabled (remove #[ignore])

[AI-assisted - Claude]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-networkingArea: Networking, ring protocol, peer discoveryE-hardExperience needed to fix/implement: Hard / a lotP-highHigh priorityT-bugType: Something is broken

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions