Make a sweep that fails everything say so
A run over 169 images failed all 169, in fourteen seconds, and reported
"0 face(s) in 0 image(s)" -- the same sentence a run that indexed
nothing because there was nothing to index produces. Three separate
places dropped the information on its way to the screen.
The progress count only moved on success. FaceSweepMessage had no
failure variant at all, so a pass where every image failed sat at 0/169
from the first tick to the last: the receiver was told the total, told
nothing, and told the pass had ended. That is indistinguishable from a
hung job, and it is what it was taken for.
Finished already carried a failed count and identity_ui matched it with
`Finished { .. }`, throwing the number away and printing the tidy
success line regardless.
And the reason each image failed was logged at debug, which is off, so
169 consecutive failures left no trace of why anywhere.
Failed { images } now carries the count back per lane batch, the
progress counter advances on it, and both the running status line and
the finishing activity row say how many could not be read. A batch
rather than one message per image because failures come back lane-sized
and the useful number is how many.
Also renames the store sweep's guard to MIN_CROP_EDGE with the rest of
that constant's move, since the two touch the same lines.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,14 +43,12 @@ pub struct IdentityController {
|
||||
/// Images visited so far in the current sweep, and the total it announced.
|
||||
progress: std::cell::Cell<(usize, usize)>,
|
||||
faces_found: std::cell::Cell<usize>,
|
||||
/// Images the running sweep could not get through, and images it refused
|
||||
/// for want of a big enough proxy.
|
||||
/// Images the running sweep could not get through.
|
||||
///
|
||||
/// On screen because a pass that fails everything used to be
|
||||
/// indistinguishable from one that succeeded at everything: both ended
|
||||
/// with a tidy "0 face(s) in 0 image(s)".
|
||||
sweep_failed: std::cell::Cell<usize>,
|
||||
sweep_too_small: std::cell::Cell<usize>,
|
||||
/// Whether opening this screen left the library rather than develop.
|
||||
///
|
||||
/// Recorded so leaving puts the user back where they were. The screen is
|
||||
@@ -1044,7 +1042,6 @@ pub fn wire<S, M, P>(
|
||||
ctl.progress.set((0, 0));
|
||||
ctl.faces_found.set(0);
|
||||
ctl.sweep_failed.set(0);
|
||||
ctl.sweep_too_small.set(0);
|
||||
*ctl.activity.borrow_mut() =
|
||||
Some(activity.begin(crate::activity::Kind::Index, "Indexing faces"));
|
||||
*ctl.sweep.borrow_mut() = Some(crate::library::spawn_face_sweep(
|
||||
@@ -1101,15 +1098,12 @@ pub fn wire<S, M, P>(
|
||||
.sweep_failed
|
||||
.set(ctl_tick.sweep_failed.get() + images);
|
||||
}
|
||||
FaceSweepMessage::Finished {
|
||||
failed, too_small, ..
|
||||
} => {
|
||||
FaceSweepMessage::Finished { failed, .. } => {
|
||||
// The sweep's own tallies win over the
|
||||
// running ones: a cancelled or offline
|
||||
// pass can end without every batch having
|
||||
// been reported.
|
||||
ctl_tick.sweep_failed.set(failed);
|
||||
ctl_tick.sweep_too_small.set(too_small);
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
@@ -1147,12 +1141,6 @@ pub fn wire<S, M, P>(
|
||||
ctl_tick.sweep_failed.get()
|
||||
));
|
||||
}
|
||||
if ctl_tick.sweep_too_small.get() > 0 {
|
||||
msg.push_str(&format!(
|
||||
", {} with no proxy big enough",
|
||||
ctl_tick.sweep_too_small.get()
|
||||
));
|
||||
}
|
||||
a.finish(msg);
|
||||
}
|
||||
w.set_identity_indexing(false);
|
||||
|
||||
Reference in New Issue
Block a user