Log enrolment accept and refuse, not only signal them
The enrol callbacks emitted enroll-stage-passed and enroll-retry-scan as D-Bus traffic and wrote nothing to the transcript. So a grep for refusals in the log of the guided enrolment found none, and I recorded that the new coverage and overlap thresholds might have refused nothing at all -- while Jorijn had been watching the refusals scroll past on the client, which is where the signal actually surfaced. The conclusion was drawn from the absence of something never written. Both outcomes are now logged with the running count, so a run's refusals can be counted from its transcript instead of from whoever happened to be watching.
This commit is contained in:
parent
f933d2a70a
commit
faedcd487e
1 changed files with 11 additions and 1 deletions
|
|
@ -1232,6 +1232,10 @@ public:
|
|||
lastAccepted = enrol.Accepted();
|
||||
onStage(enrol.Accepted(), enrol.Total());
|
||||
} else {
|
||||
// The press produced a touch the trustlet did not turn
|
||||
// into a sample: too close to the previous position,
|
||||
// below the coverage or quality threshold, or outside
|
||||
// the overlap band.
|
||||
onRetry();
|
||||
}
|
||||
pressHadTouch = false;
|
||||
|
|
@ -1596,12 +1600,18 @@ private:
|
|||
auto o = session_.Enrol(
|
||||
j.uid, cancel_,
|
||||
[&](int accepted, int total) {
|
||||
(void)accepted; (void)total;
|
||||
// Logged as well as signalled. A run whose refusals
|
||||
// exist only as D-Bus traffic cannot be counted from
|
||||
// the transcript afterwards -- and a grep for them
|
||||
// returning nothing was read once as "the thresholds
|
||||
// refused nothing", which was wrong.
|
||||
std::println(" enrol: sample ACCEPTED ({}/{})", accepted, total);
|
||||
auto ev = std::make_unique<Event>(Event{ .kind = Event::Kind::EnrollStatus });
|
||||
ev->status = "enroll-stage-passed";
|
||||
PostEvent(std::move(ev));
|
||||
},
|
||||
[&] {
|
||||
std::println(" enrol: sample REFUSED (retry-scan)");
|
||||
auto ev = std::make_unique<Event>(Event{ .kind = Event::Kind::EnrollStatus });
|
||||
ev->status = "enroll-retry-scan";
|
||||
PostEvent(std::move(ev));
|
||||
|
|
|
|||
Loading…
Reference in a new issue