mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
11e04bfc52ca97d0d8ea3fdd82ea778a633b5cb7
13
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3b81e1c096 |
fix(parser): subcommand's non-boolean flag overrides global boolean set
The parser's `getBooleanFlags()` walks every registered command + subcommand and adds every boolean-typed option into ONE flat set. That set is then used by `parseFlag()` to decide whether a flag consumes the next argv as its value. Consequence: if ANY command declares a flag as boolean (e.g. `swarm start --parallel`), that name is treated as boolean everywhere — even on a subcommand that declares it as `type: 'number'` (e.g. `hooks route --parallel N`). `--parallel 7` then parses as `parallel:true` and drops the `7`. This bug forced the `--moa-parallel` rename in v3.32.13. Fix: `getScopedBooleanFlags(resolvedCmd)` now REMOVES flags from the boolean set when the resolved subcommand declares them as a non-boolean type. Narrowest-scope wins. Backward compatible for the common case (a flag that's boolean on the resolved subcommand stays boolean; a flag that's boolean-elsewhere-only is only removed here when this subcommand re-declares it as non-boolean). Also restores the canonical `--parallel` flag on `hooks route` (with short `-p`) and keeps `--moa-parallel` as a deprecated compat alias for anyone who upgraded to v3.32.13 in the 15-minute window. Parser regression tests: 55/55 → 56/56 (new test guards that a numeric --parallel on hooks route survives when swarm start declares it as boolean). E2E matrix on `hooks route --mode moa`: --parallel 5 → 5 ✓ --moa-parallel 6 → 6 ✓ (compat alias) -p 4 → 4 ✓ (default) → 3 ✓ both + precedence → canonical --parallel wins ✓ Refs: #2778 (dream-cycle), documented as follow-up in the #2778 commit. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
810b13dcd6 |
fix: tracker-sweep 2026-07-26 (v3.32.10) — 9 bugs + promo seed + follow-ups (#2788)
* fix: tracker sweep 2026-07-26 — 9 bug fixes + promo seed Closes: #2770 #2774 #2776 #2777 #2781 #2782 #2785 #2786 (Codex follow-up) Refs: #2775 (memory upsert semantics) - Statusline promo row blank on new installs — restored cold-start local seed pool that ADR-311 had emptied. Remote Cognitum-served pool (funnel.ruv.io/v1/messages) remains authoritative via eligibleMessagesFromPools (remote wins by id); seed only fills the ≤ 60s cold-start window before first successful remote fetch. - #2777 — ruflo init no longer imports the entire ruvnet/ruflo repo (97 MB, 384 SKILL.md) into .agents/skills/ruflo/. Materializes single platform SKILL.md; detects "bloated" prior install and re-materializes. - #2781 — ruflo-adr adr-index no longer silently drops ADR data: status regex accepts "- **Status**: proposed"; single-line and wrapped relation lines parse fully; CLI_CORE=1 warns and unifies namespace. - #2770 — Windows: browser-session MCP tools + two init execFileSync npx sites now set shell: process.platform === 'win32' so cmd.exe resolves npx.cmd. POSIX behavior unchanged. - #2782 — WorkerDaemon.saveState + autopilot-state.saveState + appendLog no longer race on shared .tmp filename; all three call writeFileAtomic (pid + timestamp + random-suffixed temp). - #2785 — ruflo hooks post-task accepts --task/-t and --store-results flags matching CLAUDE.md-documented usage; routing outcomes finally persist to the namespace hooks_metrics reads. - #2786 — AgentDB no longer silently fails to initialize under CLAUDE_FLOW_ENCRYPT_AT_REST=1. New getAgentDbPath() returns agentdb-memory.db in the same directory as memory.db, so the ControllerRegistry native better-sqlite3 opens a distinct file from the sql.js CRUD writer's encrypted memory.db. - #2776 — Statusline security STALE/IN_PROGRESS branches reachable via local overlay recomputing freshness on every render from .claude/security-scans/scan-*.json. Env: RUFLO_SCAN_STALE_HOURS (24), RUFLO_SCAN_PENDING_CAP_MIN (30). STALE renders dim gray. - #2774 — Codex MCP generator registers dedicated stdio server binary claude-flow-mcp instead of the management CLI ruflo mcp start that never answers initialize. All 7 wrong-command sites fixed (initializer.ts + 6 template sites in generators/config-toml.ts + 2 in migrations/index.ts + generators.test.ts:653 assertion). - #2775 — Memory store to existing key no longer dead-ends: bridgeStoreEntry uses INSERT ... ON CONFLICT with tombstone auto-resurrect; UNIQUE returns typed error instead of null (no more misleading demotion into #2735 guard); bridgeDeleteEntry runs wal_checkpoint(PASSIVE); CLI memory store --upsert default materialized locally (parser.applyDefaults bug). - Stale ruflo-rebrand assertion in codex/tests/generators.test.ts:192 updated Co-Authored-By: claude-flow → ruflo-bot. - #2786 fix-2/3 (hooks_metrics reads dead .claude-flow/memory/store.json; bridgeRecordFeedback calls non-existent agentdb API) — architectural rewire, needs separate PR. - #2775 defect #3 root cause (parser.ts applyDefaults doesn't apply subcommand-declared defaults) — flagged by agent, other subcommands affected too. - #2775 memory-tools.ts MCP tool schema still defaults upsert:false (parity fix flagged). Co-Authored-By: RuFlo <ruv@ruv.net> * fix(parser): applyDefaults now walks subcommand + command options (#2775 follow-up) Previously only `this.globalOptions` were walked. Any subcommand-declared `default: <value>` silently dropped and the action handler received `undefined`. The immediate victim was `memory store --upsert` (per #2775), but the bug is generic — every subcommand that relies on a per-flag default was affected. Fix: applyDefaults now accepts optional command + subcommand, walks all three layers narrow-to-broad (subcommand > command > global), and the first layer to supply a value wins (because it only writes when the flag is `undefined`, so earlier writers stick). Parser tests: 52/52 pass. Build: tsc exit 0. Refs: #2775 (root cause behind the CLI --upsert workaround already in `commands/memory.ts`; the workaround is now redundant but harmless). Co-Authored-By: RuFlo <ruv@ruv.net> * fix(mcp): memory_store defaults upsert=true for CLI parity (#2775 follow-up) The CLI `memory store` command defaults `--upsert=true` (issue #2594, fix |
||
|
|
a73a2cbe32 |
fix(routing): stale route cache + --explore false (3.10.8) (#2229)
* feat(workflows): add native Workflow JS orchestration surface (ADR-0002) ruflo-workflows now documents both workflow surfaces: the existing 10 workflow_* MCP tools and the native Claude Code Workflow JS capability (.claude/workflows/*.js — agent/parallel/pipeline/phase fan-out). - ADR-0002 (Accepted): adopts native orchestration alongside the MCP surface - Reference workflow .claude/workflows/plugin-contract-audit.js (fans smoke contracts across all plugins, diagnoses failures in parallel) - README: native orchestration section + four-hook API + surface decision table - workflow-create/workflow-run skills, workflow-specialist agent, /workflow command made surface-aware - plugin.json 0.3.0 -> 0.4.0; native-workflow keywords + component block - smoke.sh reconciled (stale version + ADR-0001 status) and extended 11 -> 15 checks; smoke-gaia.sh version assertion bumped to 0.4.0 Co-Authored-By: RuFlo <ruv@ruv.net> * fix(routing): #bugB stale route cache + #bugC --explore false (3.10.8) Two routing-learning correctness bugs from the intelligence audit's remaining punch-list (docs/reviews/intelligence-system-audit-2026-05-29.md §Remediation). - Bug B (stale route cache): QLearningRouter.update() only invalidated the whole route cache every 50 updates, so a freshly-learned Q-update stayed hidden behind a stale cached decision — feedback appeared to have no effect on routing in-process until 50 updates accumulated. Now update() invalidates the updated state's cache entry immediately (new invalidateCacheEntry). Verified: learned route flips coder→researcher within 10 updates (was 50+). - Bug C (--explore false ignored): boolean flags dropped an explicit space-form value, forcing a default-true boolean (explore) to true even with , so exploitation could never be forced. parser.ts now consumes a true/false literal for boolean flags (--explore false / -e false), while --explore=false and --no-explore keep working. Verified deterministic. +4 regression tests (15/15 bug-cluster pass); 52/52 parser tests pass; cli build clean. Audit doc updated with full remediation status (3.10.7 + 3.10.8 shipped; SONA-default/MicroLoRA/EWC-Fisher/per-task-bandit deferred with honest rationale — the latter two need an ADR/upstream fix, not a patch). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
08b3623759 |
fix+perf+docs(intelligence): self-learning audit, hardening fixes, honest perf numbers (3.10.7) (#2228)
* docs(review): empirical capability audit of the intelligence/self-learning system 6 parallel auditors ran real measurements against built dist (not docs). - Self-learning loop is REAL, measured end-to-end (pattern confidence + Q-routing change persist cross-process; MoE gating converges; SONA WASM adapt 0.0042ms; Int8 3.92x; RaBitQ 32x memory — all CONFIRMED). - Performance multipliers largely UNSUBSTANTIATED: HNSW 150x-12,500x measured 1.48x peak; Flash Attention 2.49-7.47x fabricated via Math.random() at runtime; embeddings 75x / RaBitQ 2.70x retrieval never benchmarked. - 1 critical bug: CLI inverts negative reward (route feedback -r -1.0 -> +1.00). - Real-but-inert: WASM MicroLoRA apply(), MCP consolidation gradient (synthetic), hooks_intelligence_learn (cosmetic), CLI trajectory-* (no-op stubs), silent mock-embedding mislabel. No source modified — audit branch only. Prioritized fix list in the report. Co-Authored-By: RuFlo <ruv@ruv.net> * fix+perf(intelligence): harden self-learning system + replace fabricated/unsubstantiated perf numbers with measured ones Implements the prioritized fix list from docs/reviews/intelligence-system-audit-2026-05-29.md. FIXES - CRITICAL (audit #1, #2222 follow-up): CLI inverted negative reward — route feedback -r -1.0 / --reward -1.0 parsed as +1.00, so negative feedback REINFORCED the bad agent. Fixed in src/parser.ts (isFlagValue accepts negative numeric literals). All three syntaxes now yield -1.0; +6 regression assertions; 52/52 parser tests pass. - audit #2: removed fabricated Flash Attention speedup (randomized/midpoint telemetry) in attention-coordinator (swarm + integration) -> unmeasured sentinel + unverified. - audit #3: generateEmbedding returns backend:onnx|mock, surfaced in bridge_status / import_claude so mock embeddings are never mislabeled as real ONNX. - audit #4/#5: trajectory-end no longer feeds EWC a synthetic sine gradient; hooks_intelligence_learn runs a real distill/consolidate cycle. New test added. OPTIMIZE (HNSW, measured): root cause — HNSW never ran (no storagePath -> native DB lock held by daemon -> silent catch{} -> brute force). Fixed vector-db.ts (unique storagePath, hnswConfig m:32/efC:200, visible fallback warning). Same-harness before->after: N=5000 0.92x->3.2-4.7x, N=20000 0.95x->1.89x; N=1000 below crossover (reported honestly); reverted m16/efC64 (recall loss). BENCHMARK: new scripts/benchmark-intelligence.mjs (HNSW N=1k-50k, Int8 3.84x/cos 0.99999, RaBitQ 32x/0.60ms, SONA 0.0043ms, MoE 0.13->0.88, embedding backend). DOCS: README + 3x CLAUDE.md + READMEs perf tables now show MEASURED values or unverified/target; HNSW 150x-12,500x & Flash 2.49-7.47x marked NOT reproduced. Verification: cli build clean (tsc); 161/161 targeted tests pass. Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): bump 3.10.6 → 3.10.7 (intelligence hardening + honest perf docs) Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
7ebdaf580b |
fix(cli): pre-load lazy commands so short flags scope correctly (#1791.2) (#1803)
`ruflo hive-mind task -d "smoke"` was silently rejecting the short flag:
$ ruflo hive-mind task -d "smoke"
[ERROR] Task description is required
even though `taskCommand` defines `{ name: 'description', short: 'd' }`.
Root cause is the lazy-command path in the parser. When the parser walks
argv in pass 1 and encounters a name registered via `registerLazyCommandName`
(hive-mind, neural, performance, security, ruvector, …), it `break`s out
without resolving subcommands — by design, since the lazy module hasn't
been imported yet. That means `buildScopedAliases()` only ever sees the
parent's options, and the subcommand's short flags never make it into
the alias map. `-d` falls through to global resolution, gets stored as
`flags.d = "smoke"`, and the action handler reading `flags.description`
sees `undefined`.
Fix: in `CLI.run()`, before calling `parser.parse()`, eagerly load any
lazy command that appears as the first non-flag positional, then
`registerCommand()` it as a normal command. Parse then sees the full
subcommand tree and scopes flags correctly.
Cost: lazy commands now load on first use rather than after the parser
identifies them as the dispatch target — but they would have loaded
moments later anyway, so the wall-clock impact is essentially zero.
Commands the user doesn't invoke still don't load.
Adds `parser.isLazyOnly(name)` helper so the CLI can ask the question
without reaching into private state.
Closes #1791 (sub-bug 2).
|
||
|
|
01070ede81 |
fix: Tier A blockers #1596, #1567, #1556 (v3.5.80) (#1598)
* fix: resolve Tier A blockers #1596, #1567, #1556 #1596 — CLI lazy-command routing: `ruflo daemon start` was mis-routed to the top-level `start` command because the parser only registered the 10 core sync commands and its greedy Pass 1 walk happily matched `start` as the command with `daemon` left as a positional. Teach the parser about lazy command names via `registerLazyCommandName()`, stop Pass 1 at the first non-flag positional, and recognize lazy names in Pass 2 so commandPath becomes `['daemon', 'start']`. The existing positional-based subcommand fallback in CLI.run() then dispatches correctly. Affects every lazy-loaded command (daemon, doctor, embeddings, neural, config, workflow, hive-mind, ...). #1567 — agent_spawn Zod field mismatch: validate-input.ts was passing `{ agentType, name }` to @claude-flow/security's SpawnAgentSchema, which expects `{ type, id }`, so every MCP agent_spawn call failed with `type: Required`. Align the field names. Also swallow `invalid_enum_value` issues because the schema enumerates only 15 built-in agent types — we support custom types and the inline identifier validator already gated unsafe input. #1556 — AutoMemoryBridge destroys hand-curated MEMORY.md: `curateIndex()` fired on every Stop hook tick and overwrote MEMORY.md with a single-line title stub whenever none of the files in memoryDir matched the 7 hardcoded DEFAULT_TOPIC_MAPPING filenames — which is exactly the situation for any project using Claude Code's native `<type>_<topic>.md` memory convention. Skip the write entirely when there are no sections to curate and emit `index:skipped` instead; `curate` must be non-destructive when there's nothing to curate. Tests: - __tests__/parser.test.ts: 4 new cases cover lazy command routing, bare lazy commands, and global flags before a lazy command. - __tests__/validate-input-agent-spawn.test.ts: built-in type, custom type, bad identifier, and no-domain cases. - src/auto-memory-bridge.test.ts: new #1556 case + updated empty-file case to assert the new non-destructive semantics. All 120 CLI + 74 memory tests pass locally. Co-Authored-By: claude-flow <ruv@ruv.net> * chore: bump to 3.5.80 / memory 3.0.0-alpha.14 for Tier A fixes - @claude-flow/cli 3.5.78 → 3.5.80 - @claude-flow/memory 3.0.0-alpha.13 → 3.0.0-alpha.14 - claude-flow umbrella 3.5.78 → 3.5.80 - ruflo umbrella 3.5.78 → 3.5.80 Also fixes memory package's prebuild script to clean tsconfig.tsbuildinfo so tsc --incremental produces fresh output after rm -rf dist. Matches published npm artifacts for issues #1596, #1567, #1556. Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
8c4cecfb14 |
fix: v3.5.43 — resolve 9 issues, replace 22 stubs, fix healthcare tests (#1435)
Resolves #1395, #1397, #1403, #1404, #1413, #1422, #1423, #1425, #1428, #1431 - Fix headless worker stdin pipe + nested session bypass - Fix daemon PID singleton + SIGKILL fallback - Fix model alias resolution (short names → dated IDs) - Fix MCP array schema missing `items` - Fix hive-mind MCP tool preference enforcement - Fix swarm commands with real MCP calls + state persistence - Fix vector dimension mismatch (1536→384) - Replace 22 fake-success stubs with honest errors - Fix healthcare plugin (MCPToolResult type, RBAC case, Zod defaults) - Fix misleading README CLI examples Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
0120fad1f7 |
fix: 7 critical audit fixes, Windows settings, ADR-063 (v3.5.21)
- Parser: scoped alias resolution (two-pass) fixes global -t flag collision - Neural: --pattern-type flag now recognized, predict threshold lowered for hash-fallback - Hooks: pre-task --task-id optional, added notify subcommand - Agent metrics: real data from .swarm/ state instead of hardcoded demo - Security audit: dynamic timestamps from file state instead of 2024 demo data - Settings generator: Windows-compatible %CLAUDE_PROJECT_DIR% env var - ADR-063: documents all findings from deep capability audit Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
7ef200e83b |
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-14T22:09:52Z - Changes: 5 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
e1794dfbd0 |
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-12T20:00:23Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
d193005de3 |
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-12T20:00:12Z - Changes: 4 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
bad2be3919 |
feat(claims): Complete ADR-016 claims module implementation
- Add @claude-flow/claims package with 161 passing tests - Implement ClaimService, WorkStealingService, LoadBalancer - Add domain types, events, rules per ADR-016 spec - Create 17 MCP tools for claiming, stealing, load balancing - Add CLI commands for issue management - Fix type errors: ClaimStatus, status transitions, exports - Enable auto-commit and auto-push in settings.json - Update v3 packages and configurations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
53cfd8a534 |
checkpoint: File edit:
🚀 Generated with [Claude Code](https://claude.com/claude-code) 📊 V3 Development Progress Checkpoint Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> |