test: add headless unit tests #9

Merged
CoderLambert merged 4 commits from feat/headless-unit-tests into main 2026-05-20 21:23:11 +08:00
CoderLambert commented 2026-05-20 21:17:44 +08:00 (Migrated from github.com)

Summary

  • Add scripts/test.lua for dependency-free headless Neovim unit tests.
  • Cover schema normalization, invalid metadata reporting, files_regex.regex requirements, and duplicate id warnings.
  • Cover project identity resolution through Git origin, package name, and path-hash fallback.
  • Cover storage migration from legacy path-hash rules to stable identity rules.
  • Cover migration read failure reporting.
  • Add make test and make check targets.
  • Run headless tests in CI after validation.
  • Update docs/validation.md.

Notes

The tests run with nvim --headless -u NONE -l scripts/test.lua. They use temporary directories only and do not run fd, rg, or scan user projects.

## Summary - Add `scripts/test.lua` for dependency-free headless Neovim unit tests. - Cover schema normalization, invalid metadata reporting, `files_regex.regex` requirements, and duplicate id warnings. - Cover project identity resolution through Git origin, package name, and path-hash fallback. - Cover storage migration from legacy path-hash rules to stable identity rules. - Cover migration read failure reporting. - Add `make test` and `make check` targets. - Run headless tests in CI after validation. - Update `docs/validation.md`. ## Notes The tests run with `nvim --headless -u NONE -l scripts/test.lua`. They use temporary directories only and do not run `fd`, `rg`, or scan user projects.
Sign in to join this conversation.