summaryrefslogtreecommitdiff
path: root/tests/opencode/test-skill-registration.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-09-18 18:38:59 +0000
committerJesse Vincent <jesse@fsck.com>2026-09-18 18:38:59 +0000
commit8412aaf0385cbfd850675093f01b16c88052f268 (patch)
tree88ae48d06c4d104d65e35d345e65f7c210189564 /tests/opencode/test-skill-registration.sh
parentb36e0829c6d0140e93cfef2ca599b1b07d4a7797 (diff)
Release v6.4.0: diagnosing-superpowers and movie skills, Native execution, OpenCode 2.0, Muse, and Qwen Code supportrelease/v6.4.0
Everything on dev since the v6.3.0 merge-back (777ceb5), as one commit. Full notes: RELEASE-NOTES.md, v6.4.0 section. Claude-Session: https://claude.ai/code/session_01PRUnVUm4g4EcP9eNjAiT2B
Diffstat (limited to 'tests/opencode/test-skill-registration.sh')
-rwxr-xr-xtests/opencode/test-skill-registration.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/opencode/test-skill-registration.sh b/tests/opencode/test-skill-registration.sh
new file mode 100755
index 0000000..ac882a4
--- /dev/null
+++ b/tests/opencode/test-skill-registration.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+# Test: V2 Skill Registration Contract (#2106 review)
+# Verifies setup() registers skills matching OpenCode 2.0.4's Skill.Info
+# schema (path field, no stale location/slash) and contains per-skill
+# draft.add() failures instead of aborting registration.
+set -euo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+
+echo "=== Test: V2 Skill Registration Contract ==="
+
+source "$SCRIPT_DIR/setup.sh"
+trap cleanup_test_env EXIT
+
+node "$SCRIPT_DIR/test-skill-registration.mjs" "$SUPERPOWERS_PLUGIN_FILE"
+node "$SCRIPT_DIR/test-skill-registration.mjs" "$OPENCODE_CONFIG_DIR/plugins/superpowers.js"
+
+echo " [PASS] Skill payloads match the 2.0.4 Skill.Info contract"
+echo " [PASS] A rejected draft.add() skips one skill without aborting the rest"
+echo " [PASS] Quoted and multi-line frontmatter values register unquoted"
+echo ""
+echo "=== All skill registration tests passed ==="