Build the record a run leaves behind
run_record.RdThe channel keeps no copy of the state it reconciles, so a run leaves no other trace: this record is it. That is not in tension with "no local store of the state" — what that forbids is a copy of what can be re-read, and a run log is the only evidence of an event that leaves none.
Arguments
- observations
Rows from
observe_instance(), bound together.- at
When the run finished, as
YYYY-MM-DD HH:MM. Passed in rather than read here so the record stays a pure function of what was observed.- non_osservate
Names of instances the run did not even attempt — those without the module. Passed in so the record can state its own scope instead of leaving the reader to assume it covered everything.
- banchi
Names of the instances the inventory marks as benches. A name that matches no observation marks nothing and counts nothing.
Details
It carries letture_riuscite because the alarm on absence fires on the lack
of a record with at least one successful read. Were it to say only "the
process started", a job that started, failed against every instance and
exited would satisfy the alarm — a detector the fault can meet, which is the
shape of defect this project has already found twice.
flotta_a_una_major is the condition the two clauses on retiring
compatibility branches rest on, and it is deliberately conservative: it is
true only when the run covered every instance. A flag computed over whichever
instances happened to answer would report a singleton while instances on an
older major sat unread, and would retire a branch still in use. A flag that
authorizes a destructive decision must be false when it cannot know.
Found by running rather than by reading: with the module on three instances of fourteen, a field named for the fleet reported the fleet was a singleton while two instances on major 11 were never contacted.
Benches are instances kept for trials, off by default and switched on when
needed. Counted with production, they would keep irraggiungibili above
zero by construction, and an alarm that is always red is an alarm nobody
reads any more. So the record carries irraggiungibili_produzione, which
leaves them out, and irraggiungibili_nomi, which names every unreachable
instance so a reader can tell which is which. irraggiungibili keeps
counting all of them, as it always did.
A bench that did not answer still leaves the coverage incomplete, and
deliberately: it may sit on another major, and flotta_a_una_major must be
false when it cannot know.