WEB Carriers negotiation and lane lifecycle bounds hardened

Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
Alexey
2026-08-26 23:08:53 +03:00
parent 34eeb2d856
commit e72b1f04d1
15 changed files with 645 additions and 489 deletions
+3 -2
View File
@@ -80,7 +80,7 @@ impl WebProcessRuntime {
class: CarrierClientClass,
client_ip: IpAddr,
identity: TraceIdentity,
) {
) -> bool {
let mut state = self.state.lock();
let scores = state.bootstraps.get_mut(&bootstrap_hash).and_then(|entry| {
if entry.carrier_attempt == attempt
@@ -97,7 +97,7 @@ impl WebProcessRuntime {
}
});
drop(state);
let Some(scores) = scores else { return };
let Some(scores) = scores else { return false };
self.trace.record_carrier_lifecycle(
client_ip,
identity.clone(),
@@ -108,6 +108,7 @@ impl WebProcessRuntime {
scores,
None,
);
true
}
/// Promotes one exact committed attempt after transport-specific health evidence.
+7 -8
View File
@@ -276,13 +276,13 @@ impl WebProcessRuntime {
now + Duration::from_secs(profile.carrier_negotiation_deadlines_secs[3]),
);
let learning_context = learning_epoch.map(|epoch| CarrierLearningContext {
profile_key,
client_ip,
class: carrier_request.class(),
user_agent_hash: carrier_request.user_agent_hash(),
epoch,
ip_learning_eligible,
});
profile_key,
client_ip,
class: carrier_request.class(),
user_agent_hash: carrier_request.user_agent_hash(),
epoch,
ip_learning_eligible,
});
let session = WebSession::new(
Arc::downgrade(self),
session_hash,
@@ -540,5 +540,4 @@ impl WebProcessRuntime {
);
Ok(result)
}
}