mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-10-23 03:47:00 +09:00
fix(ci): 5 CI failures — Build V3, Static guards, ADR-112, witness verify, supply-chain audit
Stacked fixes to clear the remaining red CI checks on \`main\` that pre-dated the #2412 lockfile-cascade fix. Each one verified locally before commit. 1. **Build V3 (ubuntu/macos/windows)** — \`graph-edge-writer.ts\` did a static \`await import('better-sqlite3')\` which forces tsc to resolve the package's types at build time. \`better-sqlite3\` is in \`optionalDependencies\` (so CI doesn't install it) — type resolution failed with TS2307 on every platform. Routed the module name through a variable so the static analyzer stops trying to resolve it; runtime presence is still gated by the existing try/catch. 2. **Static regression guards (#2267)** — \`scripts/smoke-workflows-yaml.mjs\` crashed with \`SyntaxError: The requested module 'js-yaml' does not provide an export named 'default'\` after js-yaml dropped the synthetic default from its package exports. Switched to \`import * as yaml from 'js-yaml'\`. 3. **Tool description discoverability (ADR-112)** — two MCP tools regressed the no-guidance baseline (count went from 0 → 2): - \`metaharness_bench\` had no Use-when / Prefer / Pair-with hint - \`testgen_tdd_repair\` had \"Use when …\" in a *later* string fragment of a concatenated description, which the audit regex (single-quoted-literal-only) misses Added explicit \"Use when …\" guidance to the first fragment of each. Audit now reports 340/340 tools with guidance. 4. **witness verify precondition smoke (#1880)** — Root \`package-lock.json\` drifted: \`agentdb@3.0.0-alpha.16\` in lock vs \`^3.0.0-alpha.17\` in package.json (same root cause as #2412 but for the npm lockfile, not the pnpm one fixed last release). Every job that runs \`npm ci\` was failing at install. Regenerated via \`npm install --package-lock-only\`. Verified: \`npm ci --dry-run --legacy-peer-deps\` now exits 0. 5. **Supply-chain audit (#2046)** — \`plugins/ruflo-graph-intelligence\` had 1 HIGH/CRITICAL unaccepted direct-dep finding: - \`ws@8.20.1\` pulled by \`sublinear-time-solver\` (GHSA-96hv-2xvq-fx4p, memory exhaustion DoS) — bumped root override \`ws >=8.18.4\` → \`>=8.21.0\` and added the same override to the plugin's own package.json so it propagates through the plugin's own npm install - \`@claude-flow/cli\` peerDep surfaces every HIGH transitive in cli's own tree inside the plugin's audit report — added a tracked, expiring accepted-finding (cli ships its own audit pipeline on every publish; the plugin doesn't redistribute cli's tree). Audit now reports \`OK: no hard-fail findings\`. Verified locally: - \`npm run build\` in v3/@claude-flow/cli: clean - \`node scripts/smoke-workflows-yaml.mjs\`: exit 0, 53 workflows parsed - \`node scripts/audit-tool-descriptions.mjs\`: 340/340 with guidance, OK - \`npm ci --dry-run --legacy-peer-deps\` at repo root: exit 0 - \`node scripts/audit-supply-chain.mjs\`: OK, no hard-fail findings Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
1 parent
03d4f848ce
commit
d09a0e4cbd
9 files changed
+50
-15
No files matched your search
@@ -39,6 +39,16 @@
|
||||
"trackingIssue": "https://github.com/ruvnet/ruflo/issues/2268",
|
||||
"expiresAt": "2026-09-02",
|
||||
"rationale": "devDependency-only + exploit requires `vitest --ui` which is local-dev only. Spec already requires ^4.1.0; only the standalone package-lock graph hasn't refreshed (workspace:* protocol limitation on raw `npm install`). Zero production / CI exposure. Re-audit and remove this entry the next time the browser's package-lock.json is regenerated."
|
||||
},
|
||||
{
|
||||
"package": "plugins/ruflo-graph-intelligence",
|
||||
"depName": "@claude-flow/cli",
|
||||
"severity": "high",
|
||||
"via": ["@claude-flow/embeddings", "@claude-flow/guidance"],
|
||||
"tracking": "ruflo#2412 follow-up — @claude-flow/cli is declared as a peerDependency by ruflo-graph-intelligence; the plugin does not redistribute cli's dependency graph (the consumer installs @claude-flow/cli@latest separately). The audit script treats peerDependencies as direct deps, so it surfaces every HIGH transitive inside cli's own tree (xenova/transformers, agentdb's opentelemetry chain, onnxruntime-web) inside this plugin's report. Each of those transitives is independently triaged in its own package (see the v3/@claude-flow/browser entries above) and the cli already runs its own audit pipeline on every publish. Accepting this pair so the plugin's audit isn't transitively blocked on cli's chain.",
|
||||
"trackingIssue": "https://github.com/ruvnet/ruflo/issues/2412",
|
||||
"expiresAt": "2026-11-25",
|
||||
"rationale": "Peer-dependency-only — the plugin does not redistribute cli's transitives. cli@3.14.2 ships its own audit on each publish. Re-audit and drop this entry once either (a) the peer is removed in favor of a slim interface package or (b) cli's tree no longer reports HIGH transitives."
|
||||
}
|
||||
],
|
||||
"lockfile": [
|
||||
|
||||
Generated
+6
-7
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "claude-flow",
|
||||
"version": "3.12.3",
|
||||
"version": "3.14.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "claude-flow",
|
||||
"version": "3.12.3",
|
||||
"version": "3.14.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@claude-flow/cli-core": "3.7.0-alpha.5",
|
||||
@@ -15,7 +15,6 @@
|
||||
"@claude-flow/shared": "3.0.0-alpha.8",
|
||||
"@noble/ed25519": "2.3.0",
|
||||
"@ruvector/rabitq-wasm": "0.1.0",
|
||||
"agentic-flow": "^2.0.14",
|
||||
"semver": "7.7.3",
|
||||
"zod": "3.25.76"
|
||||
},
|
||||
@@ -46,7 +45,7 @@
|
||||
"@ruvector/router": "^0.1.30",
|
||||
"@ruvector/router-linux-x64-gnu": "^0.1.30",
|
||||
"@ruvector/sona": "^0.1.5",
|
||||
"agentdb": "^3.0.0-alpha.16",
|
||||
"agentdb": "^3.0.0-alpha.17",
|
||||
"agentic-flow": "^2.0.14"
|
||||
}
|
||||
},
|
||||
@@ -3881,9 +3880,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/agentdb": {
|
||||
"version": "3.0.0-alpha.16",
|
||||
"resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.16.tgz",
|
||||
"integrity": "sha512-hx5KildnxQ/mZaOaOKGHDe7OlDJmHoRV7sy5b4PpfjtHAE9dU0vzM7tpemZKPhnaRA89jxpKTutbnhux/JzgLg==",
|
||||
"version": "3.0.0-alpha.17",
|
||||
"resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.17.tgz",
|
||||
"integrity": "sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@
|
||||
"axios": ">=1.13.2",
|
||||
"fast-uri": ">=3.1.0",
|
||||
"vite": ">=6.4.6",
|
||||
"ws": ">=8.18.4"
|
||||
"ws": ">=8.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openai/codex": "^0.98.0",
|
||||
|
||||
+14
-3
@@ -1618,6 +1618,17 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@claude-flow/cli/node_modules/jose": {
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz",
|
||||
"integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/panva"
|
||||
}
|
||||
},
|
||||
"node_modules/@claude-flow/cli/node_modules/media-typer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
||||
@@ -15304,9 +15315,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.20.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.20.1.tgz",
|
||||
"integrity": "sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w==",
|
||||
"version": "8.21.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
|
||||
"integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
"sublinear-time-solver": "^1.7.0",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"overrides": {
|
||||
"ws": ">=8.21.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@claude-flow/cli": ">=3.5.0"
|
||||
},
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
|
||||
import { readFileSync, readdirSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import yaml from 'js-yaml';
|
||||
// js-yaml's package exports map removed the synthetic default in newer
|
||||
// versions when loaded as ESM, so `import yaml from 'js-yaml'` throws
|
||||
// `SyntaxError: does not provide an export named 'default'`. Use the
|
||||
// namespace import — works in every js-yaml release since 4.x.
|
||||
import * as yaml from 'js-yaml';
|
||||
|
||||
const WORKFLOWS_DIR = '.github/workflows';
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ export const metaharnessTools: MCPTool[] = [
|
||||
},
|
||||
{
|
||||
name: 'metaharness_bench',
|
||||
description: 'ADR-153 supporting verb — create or verify bench suites used by metaharness_evolve --bench. Bench suites are JSON files of {input, expectedOutput, weight} tasks; scoring against a fixed corpus decouples evolution from flaky/slow/undersized `npm test`. Use --op create to scaffold from a repo, --op verify (cheap, ~5s) to gate suite changes in CI. Skipping bench suites is wrong when iterating on the same harness across commits because per-run noise drowns out champion-fitness deltas; bench gives you a stable baseline. ' + MCP_SUCCESS_SEMANTIC,
|
||||
description: 'ADR-153 supporting verb — create or verify bench suites used by metaharness_evolve --bench. Bench suites are JSON files of {input, expectedOutput, weight} tasks; scoring against a fixed corpus decouples evolution from flaky/slow/undersized `npm test`. Use when iterating on the same harness across commits and `npm test` is too noisy/slow to drive evolution — use --op create to scaffold from a repo, --op verify (cheap, ~5s) to gate suite changes in CI. Native test runners are wrong here because per-run noise drowns out champion-fitness deltas; bench gives you a stable baseline. ' + MCP_SUCCESS_SEMANTIC,
|
||||
category: 'metaharness',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
|
||||
@@ -124,7 +124,7 @@ export const testgenTools: MCPTool[] = [
|
||||
{
|
||||
name: 'testgen_tdd_repair',
|
||||
description:
|
||||
'ADR-175-inspired Test-Driven Repair. Given a failing test, spawn a bounded headless `claude -p` (Read/Edit/Bash only, --max-budget-usd capped) ' +
|
||||
'ADR-175-inspired Test-Driven Repair. Use when you have a failing test and want a verified, bounded-cost fix. Spawns a bounded headless `claude -p` (Read/Edit/Bash only, --max-budget-usd capped) ' +
|
||||
'that makes the test pass without modifying it. The test\'s exit code IS the fitness function — no LLM-as-judge. ' +
|
||||
'Use when you have a failing test and want a verified fix. Skipping this and asking an agent to "fix the bug" is wrong because (a) you lose the bounded-cost guarantee, ' +
|
||||
'(b) you lose the strict no-test-modification constraint, (c) you lose the verify-on-finish step. ' +
|
||||
|
||||
@@ -79,9 +79,17 @@ export async function getBridgeDb(customDbPath?: string, opts?: { createIfMissin
|
||||
// module, so platform-specific binaries are required). If unavailable,
|
||||
// return null and let callers degrade gracefully — same posture as the
|
||||
// prior sql.js version when sql.js failed to load.
|
||||
//
|
||||
// The module name is hidden behind a variable so the TypeScript compiler
|
||||
// does not statically resolve and require the `better-sqlite3` types at
|
||||
// build time — they would only be installed via optionalDependencies,
|
||||
// which CI doesn't always install. This is the standard pattern for
|
||||
// runtime-only optional native deps. The actual presence is gated by
|
||||
// the try/catch below.
|
||||
let BetterSqlite3: any;
|
||||
try {
|
||||
BetterSqlite3 = (await import('better-sqlite3')).default;
|
||||
const mod: string = 'better-sqlite3';
|
||||
BetterSqlite3 = (await import(mod)).default;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user