Skip to content

Commit fa3eb55

Browse files
committed
ci: address review feedback on PR #2243
- Remove debug RUST_LOG configuration from CI that was inadvertently included - Replace named `_upstream` with anonymous `_` in try_to_broadcast since it's unused - Add comment explaining intentional ordering of network message vs client notification [AI-assisted - Claude]
1 parent 80bff7f commit fa3eb55

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ jobs:
9696

9797
env:
9898
FREENET_LOG: error
99-
# Enable debug logging for transport layer to diagnose packet delivery issues
100-
# Also allow info level for test_utils so logger capture tests work
101-
RUST_LOG: "error,freenet::transport::peer_connection=debug,freenet_core::transport::peer_connection=debug,freenet::test_utils=info,freenet_core::test_utils=info"
10299
CARGO_TARGET_DIR: ${{ github.workspace }}/target
103100

104101
steps:

crates/core/src/operations/update.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ async fn try_to_broadcast(
514514
last_hop: bool,
515515
_op_manager: &OpManager,
516516
state: Option<UpdateState>,
517-
(broadcast_to, _upstream): (Vec<PeerKeyLocation>, PeerKeyLocation),
517+
(broadcast_to, _): (Vec<PeerKeyLocation>, PeerKeyLocation),
518518
key: ContractKey,
519519
new_value: WrappedState,
520520
is_from_a_broadcasted_to_peer: bool,
@@ -1114,6 +1114,12 @@ pub(crate) async fn request_update(
11141114
// NOTE: We do NOT call op_manager.completed() here because the operation
11151115
// needs to remain in the state map until peek_target_addr can route it.
11161116
// The operation will be marked complete later when the message is processed.
1117+
//
1118+
// The ordering here (network message sent before client notification) is intentional:
1119+
// we want to ensure the message is queued for transmission before we report success
1120+
// to the host. Both operations use async channels, so the actual execution order
1121+
// depends on the runtime, but this ordering provides the best-effort guarantee that
1122+
// network propagation has started when the client receives success.
11171123
let op = UpdateOp {
11181124
id,
11191125
state: Some(UpdateState::Finished {

0 commit comments

Comments
 (0)