Writing Tests for opencode-swarm
Graph-first evidence contract
Use repo_map test_pack to discover focused tests for the changed source, then read the selected source and tests directly. Graph evidence is advisory only. If freshness is stale or inconclusive, confidence is low, source is missing, the language is unsupported/dynamic, the graph is absent, or the action fails, use direct source and repository test conventions to select coverage.
⚠️ Do NOT use the OpenCode
test_runnertool to validate the full repo. It is for targeted agent validation with explicitfiles: [...]or small targeted scopes.scope: 'all'is gated behind theSWARM_ALLOW_FULL_SUITE=1env var (intended for opt-in CI mirrors only; there is noallow_full_suitearg). Broad scopes can stall or kill OpenCode before theMAX_SAFE_TEST_FILES = 50guard insrc/tools/test-runner.tsfires. For repo validation, use the shell commands in this file — per-file isolation loops match CI behavior. See