Accept partial ams objects; allow plain-HTTP downloads from a local store on request
Windows discovery tool / windows (push) Successful in 57s
Windows discovery tool / windows (push) Successful in 57s
A P1P mid-print pushes ams objects with no unit list; every such update was dropped as "missing field ams", silencing telemetry for the rest of the print (found on the first real dispatch). The unit list now defaults to empty and a partial object does not wipe known units. CONTINUUM_ALLOW_INSECURE_LOCAL_DOWNLOADS=true lets the downloader fetch a presigned URL over plain HTTP, but only from a loopback or RFC 1918 address.
This commit is contained in:
@@ -160,7 +160,11 @@ impl PrintReport {
|
||||
self.envelope = newer.envelope;
|
||||
self.msg = newer.msg;
|
||||
|
||||
self.ams = newer.ams.or(self.ams.take());
|
||||
// A partial `ams` object (no unit list) must not wipe the units already known.
|
||||
self.ams = match newer.ams {
|
||||
Some(partial) if partial.ams.is_empty() => self.ams.take(),
|
||||
other => other.or(self.ams.take()),
|
||||
};
|
||||
self.ams_exist_bits = newer.ams_exist_bits.or(self.ams_exist_bits.take());
|
||||
self.insert_flag = newer.insert_flag.or(self.insert_flag.take());
|
||||
self.power_on_flag = newer.power_on_flag.or(self.power_on_flag.take());
|
||||
@@ -244,6 +248,10 @@ pub struct LightReport {
|
||||
/// actually sends.
|
||||
#[derive(serde::Deserialize, Debug, Clone)]
|
||||
pub struct AmsState {
|
||||
/// Absent from the partial `ams` objects a P1P pushes mid-print (found on
|
||||
/// the first real dispatch, 2026-10-29: every update was dropped as
|
||||
/// "missing field `ams`" and the job could never complete).
|
||||
#[serde(default)]
|
||||
pub ams: Vec<AmsUnit>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user