test(plugins): trim catalog tests to invariants against the new shapes

538+570+296+216 lines of change-detectors → 4 files of contract tests:
seed catalog valid, bad entries skipped, kill list name-or-repo, live
fallback+union; real-git pinned install + sidecar + re-pin; kill list
blocks CLI/dashboard/TUI with only the CLI bypass; dashboard merge via
sidecar; probe get_config default; extractor live document.
This commit is contained in:
Teknium
2026-09-09 04:38:01 -07:00
parent 2ed70eefd6
commit f4af457679
6 changed files with 222 additions and 1494 deletions
+5
View File
@@ -157,6 +157,11 @@ def test_main_writes_catalog_and_meta(mod, tmp_path):
assert meta["byTier"] == {"official": 1, "community": 1}
assert meta["removedCount"] == 1
assert meta["generatedAt"]
# The live-refresh document consumed by installed clients: loader-schema entries + the kill list.
from hermes_cli.plugin_catalog import entry_from_mapping
live = json.loads((out_dir / "plugin-catalog.json").read_text(encoding="utf-8"))
assert [entry_from_mapping(raw, "live").name for raw in live["entries"]] == ["alpha", "beta"]
assert live["removed"] == [{"name": "gone"}]
def test_missing_catalog_dir_degrades_to_empty_outputs_exit_zero(mod, tmp_path):