Skip to content

v3.32.23 β€” reader/writer store fixes: metrics, backup, swarm status (#2797 #2798 #2799)

Choose a tag to compare

@ruvnet ruvnet released this 28 Jul 03:21

Three "clean exit, no real work reflected" bugs reported by @vidaunited on v3.32.22 β€” all reader/writer store-shape mismatches. Each fixed and validated E2E on the published package.

Fixed

#2797 β€” hooks metrics Pattern Learning always 0. The pattern reader filtered on key.includes('pattern') || metadata.type==='pattern' || key.startsWith('learned-'), but no writer produces that shape. The post-task dual-write (#2786 fix-2) persists learned patterns as routing-decision:* entries in the patterns namespace. Fix: broaden the pattern filter to count namespace==='patterns' and metadata.type==='routing-decision'. Shipped validation: patterns.total 0 β†’ 1 after one hooks post-task --store-results.

#2798 β€” Nightly memory backup silent no-op under CLAUDE_FLOW_ENCRYPT_AT_REST. Same class as #2786: backupMemoryDb() opened the RFE1-encrypted .swarm/memory.db with better-sqlite3's online-backup API β†’ "file is not a database" β†’ recorded as skipped while the worker reported 100% success. Users with encryption had zero backups behind a green status. Fix: fall back to a plain byte copy (valid β€” sql.js rewrites the encrypted file wholesale per flush). Shipped validation: RFE1 source β†’ 176 KB snapshot written.

#2799 β€” swarm status always Total 0 agents. swarm status read .swarm/agents/*.json (never written); agent spawn records the count in .claude-flow/metrics/swarm-activity.json. Fix: reconcile against the activity file agent spawn actually writes when the agents dir is empty. Shipped validation: spawn 4 β†’ swarm status Total 0 β†’ 4 (matches agent list).

Verification

  • Regression tests: 3/3 pass (hooks-metrics-swarm-backup-2797-2798-2799.test.ts, real execFileSync repros)
  • Post-publish: all three fixes re-validated on npx ruflo@3.32.23

Upgrade

npx ruflo@latest --version   # β†’ 3.32.23

Closes: #2797 #2798 #2799.