@@ -4,3 +4,35 @@ colrev.exceptions.ReviewManagerNotNotifiedError
44.. currentmodule :: colrev.exceptions
55
66.. autoexception :: ReviewManagerNotNotifiedError
7+
8+ ``Dataset.load_records_dict() `` refuses to return data until the review
9+ manager knows which operation is about to run. It expects the
10+ :class: `~colrev.review_manager.ReviewManager ` to have its
11+ ``notified_next_operation `` flag set, otherwise it raises this exception.
12+ Creating an operation immediately calls :meth: `Operation.notify()
13+ <colrev.operation.Operation.notify> ` which sets that flag and runs the
14+ operation's precondition checks. In other words, you do *not * need to call
15+ ``notify() `` manually; instantiating the desired operation is enough.
16+
17+ The notification gate exists to prevent two classes of errors:
18+
19+ * **Dirty working tree issues ** –
20+ :meth: `Operation.check_precondition()
21+ <colrev.operation.Operation.check_precondition> ` ensures the repository is
22+ clean before state-changing work begins. It raises
23+ :class: `~colrev.exceptions.UnstagedGitChangesError ` when modifications are
24+ unstaged and :class: `~colrev.exceptions.CleanRepoRequiredError ` when tracked
25+ files outside the ignore list would be overwritten. By forcing dataset
26+ access to go through an operation, these safeguards always execute before
27+ records are read or written.
28+ * **Process-order violations ** – the same precondition routine verifies that
29+ the requested operation is valid given each record's current status. It can
30+ raise :class: `~colrev.exceptions.ProcessOrderViolation ` if earlier steps are
31+ missing or :class: `~colrev.exceptions.NoRecordsError ` if work other than
32+ loading is attempted before any records exist. Requiring notification makes
33+ sure these workflow errors are caught instead of letting scripts bypass the
34+ process model.
35+
36+ ``ReviewManagerNotNotifiedError `` therefore ensures that every dataset access
37+ is routed through an operation, keeping the repository cleanliness and
38+ process-order checks in place.
0 commit comments