summaryrefslogtreecommitdiff
path: root/tests/opencode/test-plugin-loading.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-04-28 12:20:31 -0700
committerJesse Vincent <jesse@primeradiant.com>2026-04-28 12:20:31 -0700
commite795530c2355eabcb1f17608d9d339dfafef2261 (patch)
treecf2409f3c9dd68d2b93007c68cf5612a26fcf33d /tests/opencode/test-plugin-loading.sh
parent28fd7a81928712dea26cf3b2ed555b3497764e05 (diff)
fix(tests): make SDD integration test actually run its assertions
The SDD integration test silently bailed before printing any verification results. Three independent bugs caused this: 1. `WORKING_DIR_ESCAPED` was computed from `$SCRIPT_DIR/../..` without resolving `..` segments. The resulting "directory" name contained literal `..` so `find` was looking in a path that doesn't exist. 2. With `set -euo pipefail`, the `find ... | sort -r | head -1` pipeline could exit non-zero (SIGPIPE on the producer when head closes early), killing the script silently before assertions ran. 3. The `claude -p` invocation never passed `--plugin-dir`, so it loaded the installed plugin instead of the working tree. Local edits to skills under test were not actually being tested. Other adjustments: - Run claude from inside the unique TEST_PROJECT directory instead of from the plugin root, so its session JSONL lives in its own `~/.claude/projects/` folder and doesn't race other concurrent claude sessions for "most recent file". - Use the same character-normalization claude does (every non-alphanumeric becomes `-`) when computing the session dir name; macOS-resolved `/private/var/...` paths and tmp dirs with `.`/`_` in their names need this to round-trip correctly. - Accept either `"name":"Agent"` or `"name":"Task"` in the subagent count — the harness renamed the tool but the test wasn't updated. Verified on this branch: all six verification tests now pass against a real end-to-end SDD run (skill invoked, 7 subagents dispatched, 6 TodoWrite calls, working code produced, tests pass, no extra features).
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions