Expand description
Whether the failure detector is scoring the active print.
This system never receives the detector’s per-frame scores. Its health
check (crate::DetectorProbe) says whether the detector’s service
answers, and its failure alerts arrive by webhook — and neither says that
the detector is looking at this print at all. What does is the detector’s
own record of the printer’s live prediction: the print it is watching, its
latest snapshot and its latest score. A ScoringProbe the server supplies
reads that record once per observation interval, at the start of every
round of periodic observations.
§Scoring evidence
The record carries no instant for its prediction, and a score of zero means
both “no score yet” and “scored, nothing flagged”, so a single read proves
nothing. The evidence is a change: the detector is scoring the active print
when the print its record names is that print, and its snapshot or its
score moved between two of this server’s reads within the last
EVIDENCE_INTERVALS observation intervals — both reads inside that
window, so a read after reads failed for longer is compared with nothing
and begins anew. A read naming another print,
or an earlier one, is evidence that it is not, and ends any evidence held.
A read that fails is recorded as a port failure against each observation
the round writes, and leaves the evidence standing until it is older than
those intervals.
The status names it flagged once a failure alert of the detector’s own has arrived for the print — noted as the alert is received, and read back out of the print’s history at each read, so a server started again during the print still says so. A history that cannot be read takes nothing from that round’s read, and is recorded as the read failing.
§Which print the record names
By the provider’s own identifier when the open print carries one. Otherwise
by its file and its start, held tighter than an alert’s: the start the record
names must lie within JOB_IDENTITY_TOLERANCE_S of the earliest start
this server has sighted for the print’s job, on either side.
The earliest sighting, not the start the print records now, because a resume moves the recorded start later by the length of the pause — the printer takes the pause back out of the job’s running time — while the provider keeps the job’s own start. The earliest sighting was taken before any pause this server watched, so it stays at the job’s own start; an earlier job of the same file began long before it, which an alert’s rule (an earlier start is no objection) could not tell apart. A print this server first sighted only after a pause is matched by nothing until an alert names its provider identifier: its status then reads no scoring rather than another print’s. Nor is a print matched with either start missing: a file name alone names every job of that file.
Structs§
- Scoring
Reading - The detector’s record, as far as the status needs it: nothing else of the answer is kept.
Enums§
- Scoring
Read - What one read of the detector’s record answered.
Constants§
- EVIDENCE_
INTERVALS - How many observation intervals scoring evidence stands for.
Traits§
- Scoring
Probe - What reads the failure detector’s own record of the printer’s live prediction for the status.