mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-10 06:23:28 +09:00
Three new CI workflows / scripts wire the ADR-150 Phase 1 contract:
1. .github/workflows/metaharness-ci.yml — three jobs:
- score: runs harness-score against the ruflo repo; fails on
harnessFit < 70; uploads JSON artifact
(also runs harness-genome with alert on risk_score > 0.5)
- mcp-scan: runs harness-mcp-scan against ruflo; fails on any HIGH
severity finding
- router-compat: runs scripts/check-metaharness-compat.mjs — the
new API-stability tripwire (see below)
2. .github/workflows/no-metaharness-smoke.yml — ENFORCES ADR-150
ARCHITECTURAL CONSTRAINT RULE #4 ("CI gate that verifies ruflo
continues to function with no MetaHarness packages installed").
Two phases:
- Static dep check: greps every package.json (root + ruflo wrapper +
@claude-flow/cli + plugins/*/package.json) and FAILS if any
metaharness/*/@metaharness/* appears in `dependencies` (must be
`optionalDependencies` or `peerDependencies` only).
- Runtime graceful-degradation drill: re-runs each ruflo-metaharness
skill with `npm_config_registry` pointing at an unresolvable host.
Asserts EVERY skill exits 0 AND emits a `"degraded": true` payload.
3. scripts/check-metaharness-compat.mjs — API-stability tripwire.
Exercises the @metaharness/router contract that ruflo depends on:
- import('@metaharness/router')
- Router/TrainedRouter/resolveRouterBackend exports present
- Router.fromExamples(rows, prices, opts) accepts ruflo's seed shape
({embedding: number[], scores: Record<string, number>})
- router.route(embedding) → {id, predictedQuality, ...}
- router.predict(...) method present (ruflo's predictAll wrapper
in neural-router.ts depends on it)
- resolveRouterBackend('auto') resolves
Skipped cleanly (exit 0) if @metaharness/router isn't installed —
per architectural constraint rule #3.
VERIFIED LIVE: 9/9 checks pass against @metaharness/router@0.3.2.
Caught one near-miss during authoring: the upstream's per-router
`predict()` signature varies across Router/TrainedRouter/NativeRouter;
the tripwire correctly relaxed to "method exists" since the precise
shape is a fragile signature test.
Fleet: 33/33 plugins, all three fleet audits green, no-optional static
check green.
Co-Authored-By: RuFlo <ruv@ruv.net>