summaryrefslogtreecommitdiffstats
path: root/src/watch/detect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/watch/detect.rs')
-rw-r--r--src/watch/detect.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/watch/detect.rs b/src/watch/detect.rs
index d2ffd4e..6271dae 100644
--- a/src/watch/detect.rs
+++ b/src/watch/detect.rs
@@ -16,6 +16,18 @@ use crate::time;
use crate::watch::digests::resolve_sources;
use crate::watch::mirror::{read_tree, sync_mirror, Sync};
+/// What one check of one pkgbase resulted in.
+///
+/// Four variants mirror [`Upsert`], and that is deliberate rather than lazy
+/// duplication (n-2). `Upsert` answers a storage question — what did the
+/// candidate write do — and belongs to `review::candidates`; `Outcome` answers
+/// the watcher's question — what should happen next, including the cases that
+/// never reach the candidate table at all (paused, gone, blocked, a
+/// non-publishable notice). Folding them into one enum would put
+/// `Paused`/`Blocked` next to `Collapsed` in the review module, where they mean
+/// nothing, and would make every caller in the scheduler match on storage
+/// vocabulary. `outcome_of` is the total, compiler-checked translation between
+/// the two, and it is the only place that knows both.
#[derive(Debug, Clone)]
pub enum Outcome {
/// Nothing moved at all.