aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 16:57:56 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 16:57:56 -0500
commitcad351ec00c3f78cfb6e203d87c7309a620e485c (patch)
treea3698e1e1c83269a437efa350024eb35246e08a1 /tests
parent02baa68063f02cc571789c03b1101c28d139200d (diff)
downloaddotemacs-cad351ec00c3f78cfb6e203d87c7309a620e485c.tar.gz
dotemacs-cad351ec00c3f78cfb6e203d87c7309a620e485c.zip
docs(load-graph): classify domain, integration, and optional modules
Eighth classification batch: 17 domain/integration/optional modules — ai-config, ai-vterm, browser-config, calendar-sync, calibredb-epub-config, chrono-tools, dirvish-config, dwim-shell-config, erc-config, eshell-config, eww-config, flyspell-and-abbrev, games-config, gloss-config, httpd-config, jumper, latex-config. I annotated each header, added a Batch 8 table to the inventory, and extended the validation allowlist. 82 of 102 modules are now classified. Almost all are eager only by init order and become command/hook/mode-loaded. calendar-sync stays eager when its .local.el is present. One new hidden dependency: calendar-sync guards its C-; g registration with a boundp shim and doesn't require keybindings, so the binding drops standalone. I deferred elfeed-config rather than annotate it. Its header edit triggers byte-compilation, and the existing tests only pass when the module loads as interpreted source — the compiled cj/elfeed-process-entries inlines an elfeed struct accessor the stubs can't intercept, and the batch test environment has no elfeed package to build real structs. It needs its tests rewritten first, recorded in the inventory and a new todo task. Also made the header allowlist scoping test durable: it used games-config (now classified) as its unclassified example; switched to a sentinel name plus a duplicate-entry guard.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-init-module-headers.el33
1 files changed, 27 insertions, 6 deletions
diff --git a/tests/test-init-module-headers.el b/tests/test-init-module-headers.el
index 267a9155..feaf93fd 100644
--- a/tests/test-init-module-headers.el
+++ b/tests/test-init-module-headers.el
@@ -92,7 +92,25 @@
"org-reveal-config"
"org-roam-config"
"org-webclipper"
- "hugo-config")
+ "hugo-config"
+ ;; Batch 8 — Domain / integration / optional modules (Layer 2-4)
+ "ai-config"
+ "ai-vterm"
+ "browser-config"
+ "calendar-sync"
+ "calibredb-epub-config"
+ "chrono-tools"
+ "dirvish-config"
+ "dwim-shell-config"
+ "erc-config"
+ "eshell-config"
+ "eww-config"
+ "flyspell-and-abbrev"
+ "games-config"
+ "gloss-config"
+ "httpd-config"
+ "jumper"
+ "latex-config")
"Modules annotated with the load-graph header contract.
Grows one batch at a time. Parity with the init.el require set is the
Phase 1 exit criterion.")
@@ -166,11 +184,14 @@ omits the reason."
";; Direct test load: yes.\n")))
(should (member "Eager reason:" (test-init-header--missing-labels header)))))
-(ert-deftest test-init-header-scoping-excludes-unclassified ()
- "Error: an unclassified module is not enforced (scoping proof)."
- ;; games-config is required by init.el but not yet classified; it must be
- ;; absent from the allowlist so the suite stays green during migration.
- (should-not (member "games-config" test-init-header--classified-modules)))
+(ert-deftest test-init-header-scoping-only-checks-allowlist ()
+ "Error: only allowlisted modules are enforced, and the list stays clean.
+A name never added to the allowlist stands in for any not-yet-classified
+module: the validator checks allowlist members only. The duplicate guard
+keeps the list honest as it grows batch by batch."
+ (should-not (member "not-a-classified-module" test-init-header--classified-modules))
+ (should (equal (length test-init-header--classified-modules)
+ (length (delete-dups (copy-sequence test-init-header--classified-modules))))))
(provide 'test-init-module-headers)
;;; test-init-module-headers.el ends here