docs(modules): safety-net builtin restore needs explanatory comment #63

Closed
opened 2026-05-25 15:21:58 +02:00 by michael · 1 comment
Owner

Problem

The safety-net in M.resolve restores builtin providers when all
providers are disabled:

if #providers == 0 and #builtin_providers > 0 then
  providers = builtin_providers
end

This is intentional design: if berhtjan-cli is disabled (because another
UI module is active) and that module is later uninstalled, the builtin
UI is automatically restored. The builtin cannot be permanently disabled
via config.

Without a comment this looks like a silent fallback bug.

Fix

Add an explanatory comment above the safety-net block.

Acceptance criteria

  • Comment explains the intended behavior
  • Comment notes that builtins cannot be permanently disabled
## Problem The safety-net in `M.resolve` restores builtin providers when all providers are disabled: ```lua if #providers == 0 and #builtin_providers > 0 then providers = builtin_providers end ``` This is intentional design: if berhtjan-cli is disabled (because another UI module is active) and that module is later uninstalled, the builtin UI is automatically restored. The builtin cannot be permanently disabled via config. Without a comment this looks like a silent fallback bug. ## Fix Add an explanatory comment above the safety-net block. ## Acceptance criteria - [ ] Comment explains the intended behavior - [ ] Comment notes that builtins cannot be permanently disabled
michael added this to the Basic Version milestone 2026-05-30 16:08:42 +02:00
Author
Owner

Fixed in core/modules.lua.

Expanded safety-net comment to explain intentional design:
builtins are restored when all providers are disabled, and cannot
be permanently disabled via config.

Fixed in core/modules.lua. Expanded safety-net comment to explain intentional design: builtins are restored when all providers are disabled, and cannot be permanently disabled via config.
michael 2026-05-30 22:01:52 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#63
No description provided.