diff --git a/plugins/ruflo-metaharness/scripts/smoke.sh b/plugins/ruflo-metaharness/scripts/smoke.sh index bf07f696b4..0cfdf850ed 100755 --- a/plugins/ruflo-metaharness/scripts/smoke.sh +++ b/plugins/ruflo-metaharness/scripts/smoke.sh @@ -425,10 +425,12 @@ grep -q "result has 'success'" "$F" || miss="$miss no-success-assertion" grep -q "result has 'data'" "$F" || miss="$miss no-data-assertion" grep -q "result has 'degraded'" "$F" || miss="$miss no-degraded-assertion" grep -q "result has 'exitCode'" "$F" || miss="$miss no-exitcode-assertion" -# All 7 tool names enumerated -for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit metaharness_audit_list metaharness_audit_trend; do +# All 8 tool names enumerated (similarity added in iter 36, runtime-tested iter 37) +for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit metaharness_audit_list metaharness_audit_trend metaharness_similarity; do grep -q "${tool}" "$F" || miss="$miss missing-${tool}" done +# Count assertion must match the iter-36 expansion (7 → 8) +grep -q "tools.length === 8" "$F" || miss="$miss tool-count-assertion-stale" # Graceful skip when dist absent (so the script is smoke-runnable pre-build) grep -q "SKIPPED" "$F" || miss="$miss no-skip-doc" [[ -z "$miss" ]] && ok || bad "$miss" diff --git a/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs b/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs index 56d75d5edc..bc99e0cf48 100755 --- a/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs +++ b/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs @@ -74,7 +74,7 @@ async function main() { // ────────────────────────────────────────────────────────────────── console.log('Phase 1 — module shape'); assert(Array.isArray(tools), 'metaharnessTools is an array'); - assert(tools.length === 7, `7 tools registered (got ${tools.length})`); + assert(tools.length === 8, `8 tools registered (got ${tools.length})`); const expectedNames = new Set([ 'metaharness_score', @@ -84,6 +84,8 @@ async function main() { 'metaharness_oia_audit', 'metaharness_audit_list', 'metaharness_audit_trend', + // iter 36 — ADR-152 §3.1 production + 'metaharness_similarity', ]); const actualNames = new Set(tools.map((t) => t.name)); for (const name of expectedNames) { @@ -121,6 +123,11 @@ async function main() { // resolve so we exercise the not-found path. input = { baselineKey: 'audit-fake-base', currentKey: 'audit-fake-curr' }; } + if (tool.name === 'metaharness_similarity') { + // Needs --a/--b OR --a-key/--b-key. Use fake mem keys to exercise + // the graceful not-found path (matches audit_trend convention). + input = { aKey: 'harness-fake-a', bKey: 'harness-fake-b' }; + } // 30s budget per tool — slow path is npx warmup const handlerPromise = tool.handler(input); @@ -152,7 +159,7 @@ async function main() { for (const f of failures) console.log(` - ${f}`); process.exit(1); } - console.log('\n✓ All 7 MCP tools satisfy the runtime contract.'); + console.log('\n✓ All 8 MCP tools satisfy the runtime contract.'); } main().catch((e) => {