Resume signed Windows reconciliation after a proven missing helper acknowledgement
This commit is contained in:
@@ -1784,20 +1784,40 @@ impl Agent {
|
||||
let prepared = sync.prepare(
|
||||
self.journal.connection_mut(),
|
||||
self.ledger.as_ref().context("LEDGER_REQUIRED")?,
|
||||
context,
|
||||
context.clone(),
|
||||
helper,
|
||||
&self.clock,
|
||||
);
|
||||
#[cfg(feature = "system-helper")]
|
||||
if helper.is_some()
|
||||
&& prepared
|
||||
.as_ref()
|
||||
.is_err_and(|error| error.to_string() == "SYSTEM_HELPER_APPLY_UNCONFIRMED")
|
||||
{
|
||||
// This authenticated readback already established why another
|
||||
// capture cannot advance this channel.
|
||||
self.helper_apply_unconfirmed = true;
|
||||
}
|
||||
let prepared = match (prepared, helper) {
|
||||
(Err(error), Some(snapshot)) if error.to_string() == "SYSTEM_HELPER_APPLY_UNCONFIRMED" => {
|
||||
self.helper_apply_unconfirmed = true;
|
||||
// The helper supplied a fresh authenticated snapshot on its serialized
|
||||
// lane. Only an idle actor may ask the core to prove an exact missed ACK.
|
||||
if self.running.is_some() || self.prepared || self.deferred_sync.is_some()
|
||||
|| self.deferred_permit.is_some() || self.helper_control.is_some()
|
||||
|| self.helper_probe.is_some() || self.update_pending
|
||||
|| self.update_prefetch.is_some() || self.update_health.is_some()
|
||||
{
|
||||
return Err(error);
|
||||
}
|
||||
use rmm_agent_windows::helper_runtime::intent;
|
||||
let idle = if Path::new(intent::DB).try_exists()? {
|
||||
intent::Store::open(false)?.pending()?.is_empty()
|
||||
} else {
|
||||
snapshot.attempts.is_empty()
|
||||
};
|
||||
if !idle {
|
||||
return Err(error);
|
||||
}
|
||||
sync.prepare_with_closed_control_idle(
|
||||
self.journal.connection_mut(),
|
||||
self.ledger.as_ref().context("LEDGER_REQUIRED")?,
|
||||
context, Some(snapshot), &self.clock, true,
|
||||
)
|
||||
}
|
||||
(ordinary, _) => ordinary,
|
||||
};
|
||||
let prepared = prepared?;
|
||||
#[cfg(feature = "system-helper")]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user