Skip to content

feat(validate): make manifesto contract defaults executable#5

Merged
binbandit merged 1 commit into
mainfrom
feat/contract-default-checks
Jun 10, 2026
Merged

feat(validate): make manifesto contract defaults executable#5
binbandit merged 1 commit into
mainfrom
feat/contract-default-checks

Conversation

@binbandit

@binbandit binbandit commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

The manifesto says a default picker, completion engine, explorer, LSP strategy, leader key, or core workflow changes "only through an explicit upgrade path, not by surprise" — but nothing enforced that. scripts/update-contract.lua tested snapshot/restore mechanics and one user-override case, while the contract-relevant defaults themselves were unasserted; a silent swap of picker.provider or the leader key would have passed all validation.

Two layers of enforcement, same six defaults (leader, localleader, picker.provider = "fff", explorer.provider = "oil", terminal.provider = "native", lsp.automatic_enable = true):

  • scripts/update-contract.lua: asserts them at runtime from blak.config.defaults (read directly so the test's own setup overrides don't mask anything).
  • scripts/validate.py: a textual check_contract_defaults() mirror, so plain make validate catches a contract change even without Neovim installed. The error message points at the manifesto and tells the author to ship an explicit upgrade path and update both checks deliberately.

Completion isn't asserted because it has no provider option — blink.cmp is structurally the only engine.

VALIDATION.md documents the new check.

Validation

make validate passes. Verified the new check fails correctly by mutating picker.provider"snacks" and leader"," locally (both caught, then reverted). The update-contract assertions follow the existing script's assert style and run before any test-config setup.

The manifesto protects the leader key, picker, explorer, terminal, and
LSP strategy defaults, but neither the static validator nor the
update-contract test asserted them, so a silent default swap would have
passed validation.

Add the six contract defaults to scripts/update-contract.lua (asserted
from blak.config.defaults at runtime) and mirror them as a textual
check in scripts/validate.py so make validate enforces the contract
without Neovim. Document the new check in VALIDATION.md.
@binbandit binbandit force-pushed the feat/contract-default-checks branch from 03849c0 to ebbfbaa Compare June 10, 2026 01:25
@binbandit binbandit merged commit 1e9e2ab into main Jun 10, 2026
2 checks passed
@binbandit binbandit deleted the feat/contract-default-checks branch June 10, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant