Commit Graph
2096 Commits
Author SHA1 Message Date
rUv fa61df2ef2 fix(hive-mind): dispatch submitted tasks to workers and record results (#3524)
Three defects kept a hive task pending with its worker idle forever:

1. Nothing consumed the queue. `hive-mind task` only wrote a pending row;
   workers are records, not processes. New `hive-mind work` claims the
   oldest pending hive task, assigns it to an idle hive worker, runs it
   through `claude -p --output-format json`, and records the outcome via
   task_complete (or task_update status=failed).

2. task_assign/task_complete/task_cancel synced only
   `.claude-flow/agents/store.json`, but hive workers live in
   `.claude-flow/agents.json` (#1916). Assignment never marked a hive
   worker busy and completion never counted it. They now update
   whichever store holds the agent. task_update gains `result` and
   frees workers on `failed`.

3. `spawn --claude` fell back to passing `~/.claude.json` as
   --mcp-config. Where that file has no top-level `mcpServers` (a fresh
   desktop), Claude exits with "Invalid MCP configuration: mcpServers:
   Invalid input". The worker config is now always generated: servers
   are extracted from the source config, a `ruflo` server pinned to the
   running CLI is guaranteed, and CLAUDE_FLOW_CWD points it at the
   dispatcher's stores.

Also fixes the "Track with: hive-mind task-status" hint, which named a
subcommand that does not exist.
2026-09-28 11:38:57 -04:00
Rudy Celekli 650af44d22 fix(security): honor JSON and SARIF scan output formats 2026-09-28 02:15:56 -04:00
ruv 850bd7991e Revert "perf(hooks): restore the in-memory fast path for trajectory lookups"
This reverts commit 5a45b76c8. The fast-path broke trajectory-recovery-3199's
own regression test ("reloads a clean cache after another process adds a
step"): with vi.resetModules() simulating separate processes, a first
process's clean-but-now-stale in-memory copy would win over the freshly
persisted cross-process step, since the fast path never re-read disk when
the local cache was merely clean rather than empty. That's the exact
scenario #3467 was written to fix — the "cost" the fast path removed was
the correctness guarantee, not just overhead. Local runs of the
unmodified #3467 code average 20-46ms on graph-trajectory-hooks-smoke's
200ms budget; the one observed 1171ms CI failure is far more likely
explained by that round's runner queue (this same PR's other jobs sat
queued 40+ minutes on ordinary infra load) than a real regression.
2026-09-27 15:24:21 -04:00
ruv 5a45b76c80 perf(hooks): restore the in-memory fast path for trajectory lookups
#3467 made loadPendingTrajectory() always do two DB reads (completed +
pending) before returning, even when the trajectory is already tracked
cleanly in-process — turning every trajectory-step/post-task call into
a synchronous round-trip instead of a Map lookup. CI's
graph-trajectory-hooks-smoke (ADR-130 P3, <200ms budget) failed once on
a loaded runner at 1171ms; local runs stayed at 20-46ms, so this was
likely a transient load spike, but the always-hit-disk path was real
overhead regardless. Skip both reads when the id is already a clean
(non-dirty) in-memory hit — the case #3467 didn't change (same-process,
not-yet-restarted). The disk-recovery path #3467 added still runs
exactly when it's needed: on a cache miss (e.g. after an MCP restart).
2026-09-27 15:07:49 -04:00
ruv 1d79068c56 fix(ci): repair CI regressions surfaced by the integrated community fixes
- plugins/ruflo-adr smoke step 20: #3432 correctly split the memory-db
  cwd into a more precise DB_ROOT (nearest .git/.swarm ancestor of ROOT),
  but the smoke check still only recognized the literal `cwd: ROOT`
  string. Accept `cwd: DB_ROOT` too.
- plugins/ruflo-core smoke step 6: #3428 replaced the old "pinned to
  v3.6" CLI compatibility line with an accurate description of the new
  resolve-installed-before-npx-fallback contract. Updated the smoke
  check to verify that contract's env vars are documented instead of a
  version pin that no longer exists.
- session-tools.ts: CodeQL flagged Math.random()-derived session IDs as
  insecure randomness in a security context, newly reachable through
  #3486's activate path. Switched both session ID generators to
  randomUUID(), matching the convention already used in mcp-server.ts
  and autopilot-state.ts.
2026-09-27 13:30:29 -04:00
ruv b23bf44820 chore(security): re-sign helpers manifest after helper content changes from #3433 2026-09-27 13:20:50 -04:00
ruv 2d8bab762f Merge PR #3486: fix(session): restore imported state before reporting activation 2026-09-27 13:15:52 -04:00
ruv 4dc4045111 Merge PR #3485: fix(memory): enforce TTL when retrieving and searching live rows 2026-09-27 13:15:52 -04:00
ruv b9f60a948c Merge PR #3483: fix(tasks): preserve current agent ownership during task retirement 2026-09-27 13:15:51 -04:00
ruv e62e96cc43 Merge PR #3482: fix(session): honor memory exclusion when exporting snapshots 2026-09-27 13:15:51 -04:00
ruv 6161543407 Merge PR #3481: fix(memory): evict cached entries after namespace purge 2026-09-27 13:15:50 -04:00
ruv 1be3f4ca37 Merge PR #3480: fix(memory): preserve namespace and key identity in entry cache 2026-09-27 13:15:50 -04:00
ruv b757009733 Merge PR #3479: fix(session): honor component selectors before restoring stores 2026-09-27 13:15:50 -04:00
ruv c53284abed Merge PR #3478: fix(tasks): align CLI assignment and listing with persisted handlers 2026-09-27 13:15:49 -04:00
ruv 3b379389e5 Merge PR #3477: fix(cli): preserve formatter receivers in threat and cycle reports 2026-09-27 13:15:49 -04:00
ruv a83aa4307a Merge PR #3472: fix(mcp): isolate and bound governance audit logs 2026-09-27 13:15:49 -04:00
ruv b5105bda5e Merge PR #3471: fix(graph): query retained SQL relationships for k-hop 2026-09-27 13:15:48 -04:00
ruv f48d214961 Merge PR #3470: fix(mcp): flag handler errors in tool result envelopes 2026-09-27 13:15:48 -04:00
ruv 7f9b880c03 Merge PR #3469: fix(learning): preserve zero quality and reject invalid scores 2026-09-27 13:15:48 -04:00
ruv 6832f18d19 Merge PR #3468: fix(metaharness): stop help and invalid flags before execution 2026-09-27 13:15:47 -04:00
ruv 3e6a2d5377 Merge PR #3467: fix(learning): recover pending trajectories after MCP restart 2026-09-27 13:15:47 -04:00
ruv 5de84d6040 Merge PR #3466: fix(memory): validate encrypted backup images before recovery 2026-09-27 13:15:46 -04:00
ruv 9cf5509cdb Merge PR #3465: fix(memory): remove default CLI entries from the AgentDB mirror 2026-09-27 13:15:46 -04:00
ruv b7e6083201 Merge PR #3464: fix(adr): retain qualified relations without inventing narrative edges 2026-09-27 13:15:46 -04:00
ruv 2ea6a97c44 Merge PR #3463: fix(memory): honor the selected database in memory stats 2026-09-27 13:15:45 -04:00
ruv 580980a0fe Merge PR #3462: fix(learning): create skills from validated task patterns 2026-09-27 13:15:36 -04:00
ruv 58f4d1a26a Merge PR #3461: fix(memory): confirm cleanup before dispatching deletion 2026-09-27 13:15:01 -04:00
ruv 82ae52a617 Merge PR #3460: fix(memory): preserve user notes when generated indexes grow 2026-09-27 13:15:00 -04:00
ruv 64eb6eecbc Merge PR #3459: fix(config): prevent prototype traversal through dotted keys 2026-09-27 13:14:50 -04:00
ruv 86dbf9218b Merge PR #3458: fix(config): preserve existing files when loading fails 2026-09-27 13:14:15 -04:00
ruv a20cd349d2 Merge PR #3457: fix(memory): isolate backup rotation and restore by store 2026-09-27 13:14:14 -04:00
ruv 57088a8f1b Merge PR #3456: fix(hooks): expire command history and preserve failed outcomes 2026-09-27 13:14:14 -04:00
ruv 955af728ed Merge PR #3455: fix(config): make CLI daemon settings take effect 2026-09-27 13:14:13 -04:00
ruv 19101729f3 Merge PR #3454: fix(memory): decrypt images before initialization checks 2026-09-27 13:14:13 -04:00
ruv aa6cb07191 Merge PR #3453: fix(mcp): report unsupported memory consolidation honestly 2026-09-27 13:14:01 -04:00
ruv 35728975b4 Merge PR #3442: fix(memory): scope bridge failures to canonical database paths 2026-09-27 13:12:41 -04:00
ruv cb484daa63 Merge PR #3440: fix(memory): reject mock embeddings before AgentDB rescue 2026-09-27 13:12:40 -04:00
ruv 34d8f973b5 Merge PR #3435: fix(memory): validate real outcomes before context synthesis 2026-09-27 13:12:38 -04:00
ruv e9c7db1c1e Merge PR #3433: fix(memory): anchor home-level helpers to the active project 2026-09-27 13:12:37 -04:00
ruv 9a9c488543 Merge PR #3425: fix(memory): import into the CLI-selected database 2026-09-27 13:12:33 -04:00
Rudy Celekli 764bbd28da test(memory): register one search mock factory per case 2026-09-27 10:56:54 -04:00
Rudy Celekli 0f5a7f87be test(memory): register one search mock factory per case 2026-09-27 10:56:54 -04:00
Rudy Celekli a3c19d67f2 test(memory): register one search mock factory per case 2026-09-27 10:56:53 -04:00
Rudy Celekli b68b9c53d4 test(memory): register one search mock factory per case 2026-09-27 10:56:53 -04:00
Rudy Celekli f88009c725 test(memory): register one search mock factory per case 2026-09-27 10:56:53 -04:00
Rudy Celekli ce3c37bd14 test(memory): register one search mock factory per case 2026-09-27 10:56:53 -04:00
Rudy Celekli 169f836899 test(memory): register one search mock factory per case 2026-09-27 10:56:53 -04:00
Rudy Celekli b4f851fd4e test(memory): register one search mock factory per case 2026-09-27 10:56:52 -04:00
Rudy Celekli 219cdf1c4a test(memory): register one search mock factory per case 2026-09-27 10:56:52 -04:00
Rudy Celekli 1dc0649349 test(memory): preserve path assertion through leased activation 2026-09-27 10:53:07 -04:00