Main went red at 795a156dd (#4839): the first doctor-json-cli test cold-starts
tsx in a spawnSync child (30 s budget) but timed out at 5.16 s, because the
repo-root vitest config CI's Test Suite uses has no testTimeout (5 s default).
#4839 added an 8-way parallel CLI test, so the runner is busier and the cold
start crossed 5 s. Set a describe-level 45 s timeout. Test-only change.
Co-authored-by: r <r@x>
bin/cli.js swallowed every error from shutdownBridge(), so a refused
sql.js save (AGENTDB_LOCK_UNRECOVERABLE) exited 0 and the write was
lost. Only that error now prints a clear message and sets exit code 1.
Refs ruvnet/ruflo#4733
Co-authored-by: rUv <ruv@ruv.net>
browser/agentic-flow (expires 2026-11-19) and browser/zod (2026-11-23)
still match live findings on a fresh re-audit, with no upstream fix yet;
the zod 4 migration (#4535) is the removal path for zod. Extend both 30
days with a dated note. The graph-intelligence zod and @claude-flow/cli
entries no longer match any finding and are left to lapse.
Co-authored-by: r <r@x>
* fix(federation): validate inbound envelope freshness and replay
Signed-off-by: luojie <16602829831@163.com>
* fix(federation): reject JCS envelopes signed before replay history began
The inbound replay guard is in memory and created in initialize(), so an
envelope captured up to ~5.5 min before a restart could be replayed once
into the new lifecycle. Record the guard's creation time and fail closed
with MESSAGE_PREDATES_REPLAY_HISTORY for earlier signed timestamps.
Tests: guard-level restart-window test with an injected clock, and a
plugin-level test with real Ed25519 signatures showing an envelope
accepted by one instance is rejected by a fresh instance created after.
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Signed-off-by: luojie <16602829831@163.com>
Co-authored-by: luojie <16602829831@163.com>
Co-authored-by: r <r@x>
Resolve the native router storage path through the existing project memory root so initialization does not create ruvector.db in the working directory. Add regression coverage for default and configured memory roots.
Fixes#4741
Signed-off-by: Sérgio Luiz Santos Neto <sneto.dev@gmail.com>
Co-authored-by: Sérgio Luiz Santos Neto <sneto.dev@gmail.com>
Co-authored-by: rUv <ruv@ruv.net>
AgentDBVectorStore.search returned [] for an entry that was stored: after a
delete and re-insert of the same id, ruvector-core's HNSW can leave the new
node unreachable from the graph's entry point. Measured with the backend's
own VectorDb options: 28/3000 searches missed the re-inserted id; through
the store, 8/1000 before this change and 0/1000 after. This is the
intermittent agentdb-vector-store.test.ts failure on main's CI/CD Pipeline.
The store keeps each entry's vector. When the index returns fewer of a
namespace's entries than it holds (counted before the minSimilarity filter,
so a floor alone never triggers it), the rest are scored exactly by cosine.
A deterministic test injects a backend that drops one id.
Bumps @claude-flow/aidefence to 3.2.2 and the CLI pin to match.
@claude-flow/aidefence@3.2.2 must be published before this merges
(audit-leaf-versions-published).
Co-authored-by: r <r@x>
* fix(mods): engine.create in the validator's form; claude plugin validate passes on Claude Code 2.1.323+ (0.17.1)
hooks/noun.ts returned { ...added, ...beneath } from engine.create. Claude Code
2.1.323 and later refuse that in `claude plugin validate` ("this engine.create
hook is outside its form: a spread of anything but the value of next(e)"), for
0.16.2 and 0.17.0 alike; 2.1.319 accepted it. Reading beneath.ruflo to keep an
earlier step's noun is refused as well ("$.ruflo is used as a value"), so the
hook now returns { ...beneath, ruflo }. No other plugin defines engine.create,
so $.ruflo is unchanged in practice. The mod loaded and ran on those versions
already; only validation failed.
Tests: claude plugin test plugins/ruflo-mods 209/209 before and after;
claude plugin validate fails before, passes after (2.1.323, 2.1.325, 2.1.326);
headless `claude -p --plugin-dir` probe loads it with plugin_errors null.
Co-Authored-By: ruflo <ruv@ruv.net>
* test(mods): smoke.sh expects 0.17.1
Step 1 pins the plugin.json version; the 0.17.1 bump needs it too
(same as the 0.17.0 bump in 1acb1fc98). smoke.sh: 17 passed, 0 failed.
Co-Authored-By: ruflo <ruv@ruv.net>
---------
Co-authored-by: ruflo <ruv@ruv.net>
The supply-chain audit started failing on main at 17:30Z with no dependency
change: GHSA-fc5q-39xc-vjpf (picomatch ReDoS) entered the npm audit
database and marks vitest HIGH in plugins/ruflo-graph-intelligence and
v3/@claude-flow/browser. The vulnerable range (<= 4.0.7) is every published
picomatch release and no patched version exists, so no bump clears it.
vitest is a devDependency only; accept it for 30 days (expires 2026-12-17).
Co-authored-by: r <r@x>
hnsw-metadata-atomic-4739 mocked only '/@id/@ruvector/core', the ID Vite
gives the import when cli/vitest.config.ts externalizes @ruvector/*. CI's
Test V3 Packages job runs the v3 workspace config, which does not
externalize it, so the bare specifier was never stubbed, addToHNSWIndex
returned false and 3-4 tests failed. Main's V3 CI/CD Pipeline has been red
since #5001 (e0ad134ce). Register the same stub under both IDs.
Co-authored-by: r <r@x>
`hooks statusline --json` is parsed by ruflo's own V3 statusline helper,
which treats its stdout as the single source of truth. A diagnostic line
on that stream makes `JSON.parse` throw and silently demotes the helper
to the local file probes #2195 removed.
Current source already routes diagnostics to stderr, and output.test.ts
asserts that at the unit level by spying on the streams. This adds the
end-to-end half: a real subprocess, where anything writing to stdout
counts, not just the formatter.
Two conditions have to be forced or the test is inert. Autostart gates
on `isRufloProject()`, so a bare mkdtemp directory reports
`not a ruflo project` and never emits the daemon notice — each case
plants a `.claude-flow/config.json` marker. And autostart is
single-instance per cwd, so a reused directory returns clean JSON
regardless of routing — each case gets its own directory. The notice
races daemon readiness rather than firing only on call one, so the cold
case asserts across three invocations.
stdout is parsed whole, with no `indexOf('{')` slice, because the
contract is that stdout *is* the document.
Verified both directions against @claude-flow/cli-core: with
printInfo/printWarning on writeErrorln both cases pass; with them
inverted to writeln, as published 3.7.0-alpha.5 has them, case one
fails on call one with `[INFO] Started Ruflo background daemon` on
stdout and case two with `Unexpected token 'W', "[WARN] Fail"...`.
Refs #2909
Co-authored-by: rUv <ruv@ruv.net>
cli-core and neural homepages are left for those leaves' next version bump:
the leaf-publish audit treats any package.json change in a non-bundled CLI
leaf as unpublished work.
Over MCP, session_import (inputPath) and workflow_validate (file) read any
file the caller named and returned the JSON parser's error text, which
quotes the start of the file. Both now resolve MCP paths with
containedReadPath (regular file inside the project, no symlinks), the same
rule memory_import already applies. The local CLI marks its calls with
localCliContext so operators can still name any file. Parse failures now
return a fixed message, and workflow_validate reads through readImportFile
so the 16 MiB import limit applies.
Claude-Session: https://claude.ai/code/session_01MfPHVGRya9wHHpa9JZRJvY
Co-authored-by: Claude <noreply@anthropic.com>
v3/@claude-flow/watermark is a stale 0.2.0 copy of the package now built from ruvnet/ai-text-watermark (npm 0.4.x, crates.io 0.3.x). The npm package was already private, but still declared publishConfig, and the Rust crate remained publishable, so a recursive release could overwrite the canonical artifacts with stale code (#4959).\n\n- remove the contradictory publishConfig from the npm package;\n- set publish = false on the ruflo-watermark crate;\n- replace the README's stale 0.2.0 install/API guide with a pointer to the canonical source;\n- add a regression test and run it in the stable release gates so reopening either publish path fails before packing.\n\nRegistry attribution for the already-published 0.4.2 metadata remains owner-scoped to the @claude-flow publisher.
Co-authored-by: rUv <ruv@ruv.net>
Only --grok honoured --dry-run; every other mode ignored it and wrote the
project scaffold, $HOME/.codex and the mods settings. It now writes nothing
and says so.
Co-authored-by: r <r@x>
* fix(ruflo-console): POSIX append keeps every batch under uutils dd (#4978)
The POSIX append script ran `dd bs=1M iflag=fullblock status=none >> "$1"`.
uutils dd 0.10.0 (the default coreutils on Ubuntu 26.04, now the
ubuntu-latest runner image) truncates its stdout to its own offset after
writing: strace shows `lseek(1, 0, SEEK_CUR)` then `ftruncate(1, pos)`. With
concurrent appenders that cuts off every batch another writer added in
between, so the "eight writers" spec lost whole 60-line batches
(1500/1680/1740 of 2400) and kept main's CI/CD Pipeline red.
Add `conv=notrunc` (POSIX dd; GNU, BSD and uutils all accept it). In an
ubuntu:26.04 container the spec fails 3/3 before (720, 721, 1080 lines) and
passes 3/3 after; GNU dd is unaffected. Linux hosts still run the GNU argv,
so the shipped Linux path was never affected; the script is the macOS/BSD
path. The POSIX whole-set digest is re-pinned; the GNU digest is unchanged.
ruflo-console 0.50.1 -> 0.50.2.
Fixes#4978
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore(ruflo-console): smoke pins 0.50.2
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: r <r@x>
#4981 put agent_spawn, agent_execute and task updates of
agents/store.json and agents.json under locked-json-store, but
hive-mind_spawn, hive-mind_join and hive-mind_shutdown still wrote those
files with a plain writeFileSync of a copy read earlier. hive-mind_join
in particular wrote a stale agents/store.json back over agents spawned in
between.
Route all three through updateJsonStore with a fresh read inside the
lock. join re-finds the agent under each store's lock and reports "not
found" if it left every store in the meantime.
Tests ported from #4987 onto #4981's lock: overlapping-process
agent_execute/agent_update/agent_spawn, and lock ownership (release keeps
a successor's lock; a dead owner's lock is reclaimed, a live one is not).
New: hive-mind_join + hive-mind_spawn racing agent_spawn keeps every
agent (fails 3/3 without this change).
Co-Authored-By: nicholas-ruest <nicholas-ruest@users.noreply.github.com>
Co-Authored-By: RuFlo <ruv@ruv.net>
Ships the #4984 fix: AgentDB now uses the configured embedding model and
dimension, via @claude-flow/memory 3.3.3 (published) and the CLI memory bridge.
Co-authored-by: r <r@x>
* fix(memory): apply configured embedding model and dimension to AgentDB (#4984)
The registry created AgentDB with only { dbPath }, so memory_store and
memory_search kept using AgentDB's hardcoded MiniLM/384 embedder whatever
.claude-flow/embeddings.json said.
- registry: forward config.dimension as vectorDimension; install a supplied
embeddingGenerator in place on agentdb.embedder (awaited in init) and reject
vectors whose length differs from config.dimension
- cli bridge: pass a local-chain generator (real ONNX only, no bridge
re-entry) when the effective model is not the default
- cli bridge: label rows by the embedder that produced the vector instead of
inferring the model from vector length
Needs a standalone @claude-flow/memory publish to reach users.
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore(memory): release @claude-flow/memory 3.3.3 and pin it in the CLI (#4984)
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: r <r@x>
Concurrent writers did a plain read-modify-write of each store and lost
each other's updates. All writers now load, mutate and atomically save
under the store's lock file, reusing the policy runtime's acquireLock and
writeJsonAtomic. claims_claim and the workflow_execute start become atomic
check-and-sets.
The previous fix skipped one test; 'reports a missing package' fell through to a real import() and the
other suites call the real packages, so they failed in the repo-root npm ci job as well. Real-package
tests are now gated on the packages loading; the loader contract stays covered by stub importers.
Verified both ways locally: packages present 15/15, packages hidden 8 pass + 7 skipped.
Co-Authored-By: RuFlo <ruv@ruv.net>
The repo-root npm ci job (ci.yml Test Suite) does not install the three optional ruv-fann-wsp*
packages (they are in the CLI's pnpm lock only), so 'loads all three optional packages' failed on
the release PR's first CI run. When they are absent the test now asserts the explicit 'not installed'
report and skips; the missing-package tests cover the path with an injected importer.
Co-Authored-By: RuFlo <ruv@ruv.net>