diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 02:13:37 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 02:13:37 -0500 |
| commit | 93329dfa044f646626112c51c28f4db6b923452a (patch) | |
| tree | 8912e5e708132645ee151a20cce8a2bf1870920c /docs | |
| parent | 3130a15312bbd8e0c87b4a692caafd11c68d576e (diff) | |
| download | dotemacs-93329dfa044f646626112c51c28f4db6b923452a.tar.gz dotemacs-93329dfa044f646626112c51c28f4db6b923452a.zip | |
test(architecture): guard top-level timers + add startup-contract smoke test
Add a tiny source-level architecture suite at
tests/test-architecture-startup-contracts.el with two checks:
- Only keybindings.el may globally own the exact C-; prefix. Catches
accidental cross-module rebinding before it ships.
- Top-level timer scheduling (run-with-timer / run-at-time /
run-with-idle-timer) must be guarded by (unless noninteractive ...)
so requiring a module in batch / test mode does not schedule
startup timers. Timer calls inside defuns are exempt -- the test
only rejects forms that execute their body when the module loads.
Four modules had unguarded top-level timer scheduling and would have
tripped the new test. Wrap their startup hooks/timers in
(unless noninteractive ...):
- modules/org-agenda-config.el: 10s idle cache build
- modules/org-refile-config.el: 5s idle cache build
- modules/quick-video-capture.el: after-init-hook + 2s fallback
- modules/wrap-up.el: emacs-startup-hook bury-buffers delay
The contract being protected is "requiring a module in batch should
not start a clock running." Test failures will now point straight at
the offending file/form.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
