mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 22:28:10 +09:00
Published to npm — @claude-flow/cli, claude-flow, ruflo all 3.10.33 (latest, alpha, v3alpha dist-tags). Verified end-to-end against the published ruflo@3.10.33: • `ruflo --version` → 33 ms (was 60 s+ on cold ONNX cache, #2256) • MCP stdio `initialize` → clean JSON-RPC on stdout, ONNX progress on stderr (#2253) ruflo wrapper fast-path (#2256 follow-up) `ruflo/bin/ruflo.js` imports `@claude-flow/cli/dist/src/index.js` directly, bypassing `bin/cli.js` and the --version short-circuit added in the previous commit. End-to-end test showed `npx ruflo --version` still hit the 1.4 s ONNX init. Same guard now inlined in the wrapper: reads version from this wrapper's own package.json and exits before any heavy import. CI regression guards (catches regressions of THIS release at PR-time instead of at scheduled-cron-time where the previous breakage hid for 5 consecutive runs): scripts/smoke-workflows-yaml.mjs (#2267) Parses every `.github/workflows/*.yml`. Exits non-zero on any YAML syntax error. The root cause of #2267 was an unquoted `:` inside a step name string — GitHub Actions accepted the push, scheduled the run, and silently produced zero jobs. This guard catches it at PR- time so the next "Guard 2 — smoke: foo" doesn't slip through. scripts/smoke-router-regex.mjs (#2257) Renders the router from the source-of-truth generator (helpers-generator.ts::generateAgentRouter) and asserts: • 11 known mis-route cases route correctly • Confidence on a match is NOT 0.8 (regression of the heuristic-vs- learned-classifier overclaim) • The generator source still contains \b boundary anchors v3-ci.yml: new `static-regression-guards` job runs both smokes early (no build, no install of the workspace — just js-yaml + tsx). 53 jobs total now parse cleanly. Co-Authored-By: RuFlo <ruv@ruv.net>
65 lines
2.0 KiB
JavaScript
65 lines
2.0 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Smoke test for #2267: every .github/workflows/*.yml must parse as YAML.
|
|
*
|
|
* Root cause that motivated this guard: an unquoted `:` inside a step `name`
|
|
* (`Guard 2 — smoke: generate ...`) made the YAML parser treat `smoke:` as a
|
|
* second mapping key, rejecting the whole workflow. GitHub Actions accepted
|
|
* the push and scheduled the run, but produced zero jobs and a "workflow
|
|
* file issue" failure — invisible to the kind of green-build dashboard that
|
|
* usually catches regressions. Five consecutive scheduled runs failed
|
|
* silently before #2267 surfaced it.
|
|
*
|
|
* This guard runs as an early CI step so any future YAML break is caught
|
|
* at PR-time, not at scheduled-cron-time when nobody is looking.
|
|
*
|
|
* Exit codes:
|
|
* 0 — every workflow parsed
|
|
* 1 — at least one workflow failed to parse
|
|
*/
|
|
|
|
import { readFileSync, readdirSync } from 'node:fs';
|
|
import { join } from 'node:path';
|
|
import yaml from 'js-yaml';
|
|
|
|
const WORKFLOWS_DIR = '.github/workflows';
|
|
|
|
let files;
|
|
try {
|
|
files = readdirSync(WORKFLOWS_DIR).filter(f => f.endsWith('.yml') || f.endsWith('.yaml'));
|
|
} catch (e) {
|
|
console.error(`No ${WORKFLOWS_DIR} directory (or unreadable): ${e.message}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
let failed = 0;
|
|
const results = [];
|
|
for (const file of files.sort()) {
|
|
const full = join(WORKFLOWS_DIR, file);
|
|
try {
|
|
const parsed = yaml.load(readFileSync(full, 'utf8'));
|
|
const jobCount = parsed && parsed.jobs ? Object.keys(parsed.jobs).length : 0;
|
|
results.push({ file, ok: true, jobs: jobCount });
|
|
} catch (e) {
|
|
failed++;
|
|
results.push({
|
|
file,
|
|
ok: false,
|
|
error: e.message,
|
|
line: e.mark ? e.mark.line + 1 : null,
|
|
column: e.mark ? e.mark.column + 1 : null,
|
|
});
|
|
}
|
|
}
|
|
|
|
const okCount = results.filter(r => r.ok).length;
|
|
console.log(`Workflows: ${okCount}/${results.length} parsed`);
|
|
for (const r of results) {
|
|
if (r.ok) {
|
|
console.log(` ok ${r.file} (${r.jobs} jobs)`);
|
|
} else {
|
|
console.log(` FAIL ${r.file} ${r.line}:${r.column} ${r.error}`);
|
|
}
|
|
}
|
|
process.exit(failed > 0 ? 1 : 0);
|