Test the plugin against the real harness seams and the real CLI

The integration tests load the real plugin module against a thin mock Cordis
context and drive the tool through a real shell into the real slopo binary. The
mock implements only the seams the plugin touches, so a wrong assumption about a
dsh service fails a test instead of producing a plugin that silently does
nothing at runtime.

Two real bugs were caught this way and are now pinned:

  * renderSlopoConfig would write the embedding API key to disk if it were
    handed one. It cannot now.
  * --config-version was placed before the subcommand, which slopo rejects with
    exit code 2. It is declared on the command, not the callback.

The end-to-end test is opt-in (DSH_SLOPO_E2E=1) because it needs a reachable
embedding backend; it indexes a real repository, embeds it, and asserts a real
duplicate cluster comes back.
This commit is contained in:
dsh-slopo agent committed 2026-09-22 06:11:17 +01:00
1 parent 31991143e4
commit 3373e0b4f6
4 files changed
+610 -1

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@
"node": ">=20"
},
"scripts": {
"test": "node --test test/"
"test": "node --test test/*.test.js"
},
"dsh": {
"bundle": {