mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
Two complementary deepening moves landing in one iter.
(A) SUCCESS-SEMANTIC FOOTNOTE ON ALL 8 TOOL DESCRIPTIONS
Iter 44 fixed the wrapper to compute success from exitCode instead of
!degraded. The fix is correct but invisible to agents reading the tool
registry — descriptions said only what each tool DOES, not how to
interpret the return shape. This iter appends a literal footnote to all
8 tool descriptions:
"[Return shape: {success, data, degraded, exitCode}. success===true
iff exitCode===0 (includes graceful-degradation path where dep is
absent — check degraded for that). success===false with exitCode===1
= intentional alert exit (read data.alert.triggered). success===false
with exitCode===2 = input error (data is null).]"
Implemented as a single const MCP_SUCCESS_SEMANTIC string concatenated
into each description literal. Smoke step 17z9 asserts 9 occurrences
(1 declaration + 8 description appends). DRY without sacrificing
agent-readable visibility.
(B) AUDIT_TREND MCP TOOL ACCEPTS FILE INPUTS
The underlying audit-trend.mjs script has always supported --baseline /
--current as file paths in addition to --baseline-key / --current-key
for memory lookups. The MCP tool layer only exposed the key form,
forcing agents to use memory even for one-shot CI-artifact diffs.
This iter extends the input schema:
baselineKey — memory key (existing)
currentKey — memory key (existing)
baselineFile — file path (iter 46)
currentFile — file path (iter 46)
alertOnWorsening — existing
alertOnDistanceBelow — iter 38 distance gate, now exposed at MCP layer
Required[] dropped — caller picks key OR file inputs. Missing-both case
emits a graceful degraded payload at the script level.
DESCRIPTION expanded to mention:
- EITHER memory keys OR direct file paths
- iter-38 structural distance via ADR-152 §3.1 fingerprint
- new alertOnDistanceBelow input
NEW Phase 4 ASSERTIONS (test-mcp-tools.mjs)
audit_trend file-input path: success === true
audit_trend file-input path: exitCode === 0
audit_trend file-input path: data.delta object present
audit_trend file-input path: identical fingerprints → near-identical
Runtime test count: 92 → 96.
GATES THIS ITER
smoke: 49 → 50 (step 17z9 green)
runtime: 92 → 96 assertions
fleet: 33/33
tsc: clean rebuild
WHY THIS COMPLETES THE INTEGRATION STORY
After iter 44 the wrapper had correct semantic but agents couldn't see
the semantic in the registry. After iter 38 the audit-trend pipeline
computed structural distance but the MCP surface didn't accept the
new flag. Both gaps now closed — the surface and the semantic match.
Co-Authored-By: RuFlo <ruv@ruv.net>