diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-27 22:32:47 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-27 22:32:47 -0500 |
| commit | ed27738341654ea1ae9d6f8b9a7f51e3919456a5 (patch) | |
| tree | 07da76c883830f3fc7ac6148479821ba1f320edc /tests/test-org-drill-default-algorithm.el | |
| parent | d40b1fe89e02bb85d3869180e3505df7c97b3539 (diff) | |
| download | org-drill-ed27738341654ea1ae9d6f8b9a7f51e3919456a5.tar.gz org-drill-ed27738341654ea1ae9d6f8b9a7f51e3919456a5.zip | |
feat: change default scheduling algorithm to simple8 with ADR
Closes upstream #46. I changed the default for org-drill-spaced-repetition-algorithm from sm5 to simple8. The defcustom now carries an ADR-style comment recording the reasoning: simple8 gives most of sm5's per-user adaptation value via its per-card difficulty learning, without sm5's dependency on a persisted optimal-factor matrix that can rot (the upstream #45 fragility), and it adjusts intervals for early or late reviews, a real-world concern sm2 and sm5 don't address.
Existing users with the option set in their config see no change. Existing users on the previous default get simple8 on their next session, with no state migration. Simple8 reads what it can from the SM-style item-data and carries on. Sm5's persisted optimal-factor matrix stays on disk and is available if the user switches back.
I added a test that pins the default value, so an accidental flip surfaces in CI.
Diffstat (limited to 'tests/test-org-drill-default-algorithm.el')
| -rw-r--r-- | tests/test-org-drill-default-algorithm.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test-org-drill-default-algorithm.el b/tests/test-org-drill-default-algorithm.el new file mode 100644 index 0000000..65cba1a --- /dev/null +++ b/tests/test-org-drill-default-algorithm.el @@ -0,0 +1,20 @@ +;;; test-org-drill-default-algorithm.el --- Pin the default scheduler -*- lexical-binding: t; -*- + +;;; Commentary: +;; The default for `org-drill-spaced-repetition-algorithm' is the algorithm a +;; brand-new user gets out of the box. Issue #46 asked for that choice to be +;; reconsidered; the ADR-style comment above the defcustom in `org-drill.el' +;; records the reasoning. Pinning the value in a test means an accidental +;; flip back surfaces in CI rather than as drift discovered months later. + +;;; Code: + +(require 'ert) +(require 'org-drill) + +(ert-deftest test-org-drill-default-algorithm-is-simple8 () + "The default scheduler is Simple8. See the ADR comment in org-drill.el." + (should (eq 'simple8 (default-value 'org-drill-spaced-repetition-algorithm)))) + +(provide 'test-org-drill-default-algorithm) +;;; test-org-drill-default-algorithm.el ends here |
