fix(ci): bump 3 ruflo-metaharness stale lock-counts for ADR-153 tools

3 more plugin-contract failures from no-metaharness-smoke, all the same
root cause: ADR-153 added bench/evolve/security_bench MCP tools but the
smoke contract had hardcoded counts pinned to the pre-ADR-153 tool set.

  - 17z53: \`runScript('foo.mjs', ...)\` reference count 9 → 12
  - 17z9:  MCP_SUCCESS_SEMANTIC occurrence count 10 → 13 (1 decl + 12 uses)
  - 17z7:  \`success: r.success\` handler count 9 → 12
  - 17z6:  test-mcp-tools.mjs phase-1 \`tools.length === 9\` → 12, plus
           the 3 new tool names added to the expectedNames set

These are anchor counts that exist deliberately so a future iter adding
a tool also touches the smoke and CLAUDE.md catalog. Bumping in lockstep
with the 3 new tools.

Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
ruv committed 2026-06-25 18:53:01 -04:00
1 parent 575a7bdeed
commit 4b9e86840f
2 files changed
+14 -7

No files matched your search

+9 -6
View File
@@ -820,8 +820,9 @@ for f in $REFS; do
COUNT=$((COUNT + 1))
[[ -f "$SCRIPTS_DIR/$f" ]] || miss="$miss mcp-script-${f}-missing"
done
# Should be 9 unique scripts (one per MCP tool; mint deliberately excluded)
[[ "$COUNT" == "9" ]] || miss="$miss mcp-script-count-stale:$COUNT-expected-9"
# Should be 12 unique scripts (one per MCP tool; mint deliberately excluded).
# Bumped from 9 → 12 after ADR-153 added bench/evolve/security_bench tools.
[[ "$COUNT" == "12" ]] || miss="$miss mcp-script-count-stale:$COUNT-expected-12"
[[ -z "$miss" ]] && ok || bad "$miss"
step "17z52. SUBCOMMANDS map entries point at existing script files (iter 89)"
@@ -1625,9 +1626,10 @@ step "17z9. MCP success-semantic footnote + audit_trend file inputs (iter 46)"
miss=""
WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"
# Success-semantic constant declared + appended to N descriptions = N+1 occurrences.
# Iter 46 set this at 9 (8 tools); iter 54 added the 9th tool → expect 10.
# Iter 46 set this at 9 (8 tools); iter 54 added the 9th → 10. ADR-153
# added 3 more tools (bench/evolve/security_bench) → 1 + 12 = 13.
COUNT=$(grep -c "MCP_SUCCESS_SEMANTIC" "$WRAPPER" 2>/dev/null; true)
[[ "$COUNT" == "10" ]] || miss="$miss footnote-count:$COUNT-expected-10"
[[ "$COUNT" == "13" ]] || miss="$miss footnote-count:$COUNT-expected-13"
# audit_trend now exposes baselineFile / currentFile
grep -q "baselineFile" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-file"
grep -q "currentFile" "$WRAPPER" 2>/dev/null || miss="$miss no-current-file"
@@ -1665,8 +1667,9 @@ grep -q "success = exitCode === 0" "$WRAPPER" 2>/dev/null || miss="$miss no-exit
COUNT_OLD=$(grep -c "success: !r.degraded" "$WRAPPER" 2>/dev/null; true)
[[ "$COUNT_OLD" == "0" ]] || miss="$miss old-pattern-still-present:$COUNT_OLD"
COUNT_NEW=$(grep -c "success: r.success" "$WRAPPER" 2>/dev/null; true)
# Iter 54 added a 9th tool. Future iters that add tools should bump this.
[[ "$COUNT_NEW" == "9" ]] || miss="$miss new-pattern-count:$COUNT_NEW-expected-9"
# Iter 54 added a 9th tool → 9. ADR-153 added 3 more (bench, evolve,
# security_bench) → 12. Future iters that add tools should bump this.
[[ "$COUNT_NEW" == "12" ]] || miss="$miss new-pattern-count:$COUNT_NEW-expected-12"
# Runtime anchors: iter 44 success assertions present
T="$ROOT/scripts/test-mcp-tools.mjs"
grep -q "iter 44 fix" "$T" 2>/dev/null || miss="$miss no-iter44-anchors"
@@ -74,7 +74,7 @@ async function main() {
// ──────────────────────────────────────────────────────────────────
console.log('Phase 1 — module shape');
assert(Array.isArray(tools), 'metaharnessTools is an array');
assert(tools.length === 9, `9 tools registered (got ${tools.length})`);
assert(tools.length === 12, `12 tools registered (got ${tools.length})`);
const expectedNames = new Set([
'metaharness_score',
@@ -88,6 +88,10 @@ async function main() {
'metaharness_similarity',
// iter 54 — one-command drift detection (composes audit-list + oia-audit + audit-trend)
'metaharness_drift_from_history',
// ADR-153 — bench suites + evolve driver + security-focused bench
'metaharness_bench',
'metaharness_evolve',
'metaharness_security_bench',
]);
const actualNames = new Set(tools.map((t) => t.name));
for (const name of expectedNames) {