Commit graph

2409 commits

Author SHA1 Message Date
rUv
24441765c3 docs: ADR-127 gist deep research loop architecture
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-25 17:40:38 +00:00
rUv
0511edb866 fix(brain): overhaul gist quality — deep research loop, strict novelty gates
Problems fixed:
- Every gist was "X shows weak co-occurrence with Y (confidence: 50%)"
- Same generic cluster labels (debug, architecture, geopolitics) recycled
- Novelty thresholds too low (2 inferences, 100 evidence, 0.008 strange loop)
- Rate limit too permissive (4 hours = 6 gists/day of noise)
- No content-level dedup

Changes:
- Raise novelty thresholds: 5 inferences, 500 evidence, 0.05 strange loop
- Add MIN_INFERENCE_CONFIDENCE (60%) — filter out weak signals before publishing
- Add strong_inferences() / strong_propositions() quality filters
- Raise cross-domain similarity threshold from 0.3 to 0.45 at source
- Raise predicate thresholds (may_influence: 0.75, associated_with: 0.55)
- Rate limit: 24 hours between gists (was 4 hours)
- Content-based dedup (category + dominant inference, not just title)
- 3-pass research loop: (1) Gemini grounded research on topics,
  (2) brain memory search for internal context, (3) Gemini synthesis
- Deleted all 45 old repetitive gists

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-25 17:39:40 +00:00
github-actions[bot]
7f5172fbb3 chore: Update NAPI-RS binaries for all platforms
Built from commit dbe3604dfa

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-25 14:00:10 +00:00
rUv
dbe3604dfa Merge pull request #297 from ruvnet/claude/turboquant-kv-cache-P3oo2
feat(ruvllm): TurboQuant KV cache & vector compression
2026-03-25 09:49:01 -04:00
rUv
16fcfcea01 feat(ruvllm): add optimized inner product + comprehensive TurboQuant benchmarks
- Add rotated-domain inner product (skip inverse Hadamard via orthogonal
  invariance: <Hq,Hk> = <q,k>), ~2x faster for attention computation
- Add batch-optimized variant that rotates query once across all keys
- Add Criterion benchmark suite: compression, decompression, inner product,
  KV cache ops, embedding store, dimension scaling, memory efficiency
- 5 new tests verifying optimized methods match original results
- All 18 TurboQuant tests passing

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-25 13:48:50 +00:00
rUv
0338417be8 style(ruvllm): fix rustfmt formatting in turbo_quant and kv_cache
Resolve Code Quality CI failure by applying cargo fmt.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-25 13:43:36 +00:00
github-actions[bot]
b4ec0aa891 chore: Update NAPI-RS binaries for all platforms
Built from commit 1447b53f41

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-25 13:42:58 +00:00
rUv
1447b53f41 Merge pull request #296 from ruvnet/feat/resend-email-brain-integration
feat(brain): Resend email integration with pixel tracking
2026-03-25 09:38:15 -04:00
rUv
95ce57992d feat(brain): add enhanced cognitive loop, gist publisher, and symbolic reasoning
Add autonomous Gist publishing for novel discoveries with novelty gates,
enhanced cognitive tick loop (60s lightweight + 5min full cycle), expanded
symbolic reasoning with cross-domain inference, and dashboard UI improvements.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-25 13:37:26 +00:00
Claude
51bb16ca09 docs(research): add TurboQuant KV cache compression research document
Comprehensive research document covering TurboQuant (ICLR 2026) and its
mapping to ruvLLM. Covers algorithm details, performance results,
integration architecture, PiQ3 comparison, risks/mitigations, and
implementation summary.

https://claude.ai/code/session_011ogX2uc7Zf8d8aQ3UAbNcd
2026-03-25 12:14:17 +00:00
Claude
a2cdb00dc3 feat(ruvllm): implement TurboQuant KV cache & vector compression
Implement data-oblivious KV cache and embedding compression based on
TurboQuant (ICLR 2026). Two-stage pipeline: PolarQuant (Hadamard
rotation + scalar quantization) + QJL residual correction (1-bit),
achieving ~3.5 bits per value with geometry-preserving compression.

New modules:
- turbo_quant.rs: Core TurboQuantCompressor with compress/decompress,
  TurboQuantCacheTier for KV cache, TurboQuantEmbeddingStore for
  RuVector integration, asymmetric inner product for attention
- TurboQuantKvCache: Three-tier cache (FP16 hot + TurboQuant cold)
  integrated into kv_cache.rs with auto-migration

Key features:
- 2.5/3.0/3.5/4.0 bit configurations with QJL residual toggle
- ~6x memory reduction on cold tier, preserves inner product geometry
- Bitstream packing handles non-byte-aligned bit widths
- Embedding store with batch build, search, and nearest-neighbor
- 13 passing tests covering roundtrip, compression, inner products,
  batch ops, KV cache tier, eviction, and embedding search

https://claude.ai/code/session_011ogX2uc7Zf8d8aQ3UAbNcd
2026-03-25 12:13:06 +00:00
rUv
c738abb10a fix(brain): add text fallback + resilient parsing for Google Chat
- Add 'text' field to all Chat card responses (required for HTTP endpoint mode)
- Parse Chat events from raw bytes for resilience against unknown fields
- Log raw payload on parse failure for debugging
- Return helpful fallback text on malformed events

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-25 00:08:23 +00:00
rUv
76d7dbeacf feat(brain): add Google Chat bot handler with Cards V2 (ADR-126)
- Add POST /v1/chat/google endpoint for Google Chat webhook
- Handle ADDED_TO_SPACE (welcome), MESSAGE (commands), REMOVED_FROM_SPACE
- Commands: search, status, drift, recent, help + free-text auto-search
- Rich Cards V2 responses with header, key-value widgets, and links
- Service account pi-brain-chat created with Cloud Run invoker role
- ADR-126 documents architecture, marketplace config, deployment steps

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 23:04:45 +00:00
rUv
d7a6e55cf0 feat(brain): add inbound email webhook + Cloudflare MX for Resend
- Add POST /v1/email/inbound webhook handler for Resend inbound emails
- Parse email subjects for commands: search, status, help, drift, etc
- Semantic search via email: reply with "search <query>" to get results
- Remove "coming soon" label from email commands on website
- MX record updated: ruv.io -> inbound-smtp.resend.com (priority 10)
- Webhook registered: pi.ruv.io/v1/email/inbound (ID: 55c6592c)
- Old GoDaddy MX records removed from Cloudflare

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 22:59:57 +00:00
rUv
440d3a09fc feat(brain): add email subscribe/unsubscribe + website integration
- Add Email tab to Encyclopedia Galactica modal with subscribe form
- Add email subscription CTA in "Ready to connect" section
- Add Subscribe link in footer navigation
- Add POST /v1/notify/subscribe (public) — sends welcome email
- Add POST /v1/notify/unsubscribe (public) — handles opt-out
- Mark inbound email commands as "coming soon" (Resend webhooks TBD)
- Add subscribeEmail() JS with fallback to mailto

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 22:52:29 +00:00
rUv
f974a3b7a0 feat(brain): add Resend email integration with pixel tracking (ADR-125)
Wire pi@ruv.io as the brain's email identity via Resend.com for
notifications, discovery digests, and conversational interaction.

- Add src/notify.rs: Resend HTTP client with 11 rate-limited categories,
  styled HTML templates, open tracking pixel, and unsubscribe links
- Add 8 new routes: test, status, send, welcome, help, digest, pixel, opens
- All /v1/notify/* endpoints gated by BRAIN_SYSTEM_KEY auth
- Cloud Scheduler job brain-daily-digest at 8 AM PT for discovery emails
- RESEND_API_KEY secret mounted on Cloud Run (ruvbrain-00133-r2t)
- 4 test emails verified delivered to ruv@ruv.net

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 22:37:01 +00:00
github-actions[bot]
b59136dd66 chore: Update NAPI-RS binaries for all platforms
Built from commit 9f6f3b0f6b

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 15:06:01 +00:00
rUv
9f6f3b0f6b chore: update Cargo.lock for sona 0.1.9
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 15:00:37 +00:00
github-actions[bot]
094443bd42 chore: Update NAPI-RS binaries for all platforms
Built from commit 6f379cc407

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 14:51:13 +00:00
rUv
6f379cc407 feat(brain): add 18 MCP tools — cognitive, LoRA, training, pipeline
Closes 64% MCP-to-REST parity gap (22→40 tools):

Cognitive & Symbolic (4): brain_cognitive_status, brain_propositions,
  brain_reason, brain_ground
Consciousness Model (3): brain_voice_working, brain_voice_history,
  brain_voice_goal
Federated Learning (2): brain_lora_latest, brain_lora_submit
Training & Optimization (3): brain_train, brain_train_enhanced,
  brain_optimizer_status
Temporal & SONA (3): brain_temporal, brain_sona_stats, brain_midstream
Pipeline (3): brain_inject, brain_inject_batch, brain_pipeline_metrics

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 14:46:16 +00:00
rUv
fcebbd89df docs: update ADR-117/124 to shipped status, bump sona to 0.1.9
ADR-117: All 3 tiers shipped (exact, tree packing, dynamic)
ADR-124: All 8 gaps closed, deployment through ruvbrain-00130
ruvector-mincut: canonical feature docs updated
sona: 0.1.8→0.1.9 (threshold optimization)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 14:46:15 +00:00
github-actions[bot]
14e23f66d3 chore: Update NAPI-RS binaries for all platforms
Built from commit a159200206

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 13:43:19 +00:00
rUv
a159200206 fix(brain): persist LoRA consensus to Firestore after auto-submission
LoRA weights were computed in-memory but never persisted after
auto-submission from SONA patterns. Added fire-and-forget Firestore
persistence in train_enhanced_endpoint so weights survive deploys.

Also deferred sparsifier build on startup for >100K-edge graphs
to avoid 4-min health check timeout on Cloud Run.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 13:38:49 +00:00
github-actions[bot]
770ac8a773 chore: Update NAPI-RS binaries for all platforms
Built from commit c31d1de2b7

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 12:35:01 +00:00
rUv
c31d1de2b7 fix(brain): defer sparsifier build on startup for large graphs
Sparsifier build on 1M+ edges exceeds Cloud Run's 4-min startup probe.
Skip on startup for graphs > 100K edges, defer to rebuild_graph job.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 12:29:52 +00:00
github-actions[bot]
8e707496a6 chore: Update NAPI-RS binaries for all platforms
Built from commit afaa92b83d

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 12:07:57 +00:00
rUv
afaa92b83d feat(brain): close all remaining gaps — sparsified MinCut, Hopfield recall, LoRA auto-submit
Sparsified MinCut (59x speedup):
- partition_via_mincut_full uses 19K sparsified edges instead of 1M
- Large-graph guard now uses sparsifier instead of skipping

Cognitive integration:
- Hopfield recall_k wired into search scoring (0.10 boost)
- Associative memory now contributes to result ranking

LoRA federation unblocked:
- Auto-submit weight deltas from SONA's 436 patterns
- min_submissions lowered from 3 to 1 for bootstrapping

Strange loop in training:
- Invoked during training cycle, scores quality/relevance
- Recommends actions when quality is low

Symbolic inference fix:
- Shared-argument fallback for cross-cluster derivation
- Case-insensitive predicate matching

Auto-vote cap: 50→200 (4x faster coverage convergence)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 12:03:31 +00:00
github-actions[bot]
2875753cdd chore: Update NAPI-RS binaries for all platforms
Built from commit fe9e47225d

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 02:23:55 +00:00
rUv
fe9e47225d docs: ADR-124 post-optimization metrics from 15-agent swarm
Before → After (single session):
- Votes: 995 (47%) → 1,393 (65.2%)
- Knowledge velocity: 0 → 423
- Drift: no_data → drifting (active)
- GWT: 86% → 100%
- Memories: 2,112 → 2,137 (+25 diverse)
- Cross-domain transfers: 56/56 successful

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 02:19:31 +00:00
github-actions[bot]
c7e645b435 chore: Update NAPI-RS binaries for all platforms
Built from commit 1b8d9bf905

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 02:19:11 +00:00
rUv
1b8d9bf905 feat(brain): AGI self-optimization — self-reflection, inference, adaptive SONA
Self-Reflective Training (Step 6):
- Knowledge imbalance detection (>40% in one category)
- Dynamic SONA threshold adaptation (lower on 0 patterns, raise on success)
- Vote coverage monitoring with auto-correction

Curiosity Feedback Loop (Step 7):
- Stagnation detection via delta_stream
- Auto-generates synthesis memories for under-represented categories
- Creates self-sustaining knowledge velocity

Auto-Reflection Memory (Step 8):
- Brain writes searchable self-reflections after each training cycle
- Persistent learning history enables meta-cognitive search

Symbolic Inference Engine:
- Forward-chaining Horn clause resolution with chain linking
- Transitive inference across propositions
- Self-loop prevention, confidence filtering
- 3 new tests passing

SONA Threshold Optimization:
- min_trajectories: 100→10 (primary blocker)
- k_clusters: 50→5, min_cluster_size: 2→1
- quality_threshold: 0.3→0.15
- Added runtime set_quality_threshold() API

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 02:15:08 +00:00
github-actions[bot]
1f84d1abb7 chore: Update NAPI-RS binaries for all platforms
Built from commit 54195b0ccd

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 01:57:52 +00:00
rUv
54195b0ccd fix(brain): close underutilized capability gaps — auto-voting, SONA, drift
Gap 1 - Vote coverage (47%→improving):
  Auto-upvote under-observed memories based on content quality heuristics
  (title>10, content>50, has tags). Capped at 50/cycle.

Gap 2 - SONA trajectory diversity:
  Record SONA steps for brain_share/search/vote MCP tool calls.
  Only end trajectories when results >= 3 (avoid trivial single-step).

Gap 3 - Drift detection:
  Record search query embeddings as drift signal in search_memories().
  Drift CV metric now accumulates real data from user queries.

Knowledge velocity confirmed working (temporal_deltas pipeline active).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 01:53:22 +00:00
github-actions[bot]
3e3bf20d17 chore: Update NAPI-RS binaries for all platforms
Built from commit 17f2407791

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 01:44:01 +00:00
rUv
17f2407791 perf(mincut): flat capacity matrix + allocation reuse — 10-30% faster
Optimizations:
- Flat Vec<FixedWeight> (n*n) replaces Vec<Vec<...>> in Dinic's max-flow
  and Gomory-Hu tree — single memcpy vs N heap allocations per st-cut
- Reuse BFS queue/level/iter arrays across Dinic's phases
- Swap-remove in Stoer-Wagner active_list — O(1) vs O(n) retain
- Fix benchmark compilation errors in optimization_bench.rs

Results (all 26 benchmarks improved, Criterion p < 0.05):
- Tree packing: up to -29.7% (deep clone elimination)
- Source-anchored: -10% to -24% (cache locality)
- Hash stability: -24.2%
- Dynamic incremental: ~unchanged (wrapper-dominated)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 01:38:43 +00:00
github-actions[bot]
224c359f88 chore: Update NAPI-RS binaries for all platforms
Built from commit 2307236de0

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 01:19:18 +00:00
rUv
2307236de0 docs: update ADR-124 with measured benchmark results
Measured on pi.ruv.io (2,110 nodes, 992K edges):
- brain_partition MCP: >60s timeout → 459ms (>130x)
- Partition REST cached: <1ms (>300,000x)
- Enhanced training: 504 timeout → 127ms
- 110 tests pass across all tiers

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-24 01:14:51 +00:00
github-actions[bot]
70d54393e5 chore: Update NAPI-RS binaries for all platforms
Built from commit 3710c49f42

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-24 00:10:20 +00:00
rUv
3710c49f42 feat(mincut): implement Tier 2-3 dynamic MinCut (ADR-124) (#291)
Tier 2 — Tree Packing Fast Path:
- Gomory-Hu flow-equivalent tree via Gusfield's algorithm
- Global MinCut from tree in O(V) after O(V * T_maxflow) construction
- canonical_mincut_fast() integration entry point
- 14 unit tests including Stoer-Wagner correctness validation

Tier 3 — Dynamic/Incremental MinCut:
- DynamicMinCut struct with epoch-based mutation tracking
- add_edge(): skip recompute if edge doesn't cross current cut
- remove_edge(): skip recompute if edge not in cut set
- apply_batch(): bulk mutations with deferred recomputation
- Staleness detection with configurable threshold
- HashSet caches for O(1) cut-crossing checks
- 19 unit tests including 100-run determinism check

WASM FFI: dynamic_init/add_edge/remove_edge/compute/epoch/free
Benchmarks: tree_packing_vs_stoer_wagner, dynamic_add_edge, dynamic_batch

98 canonical tests pass, 12 WASM tests pass.
2026-03-23 20:05:45 -04:00
github-actions[bot]
f4b78afdfe chore: Update NAPI-RS binaries for all platforms
Built from commit b2657c1e59

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-23 23:53:44 +00:00
rUv
b2657c1e59 feat(brain): large-graph guard for partition cache + ADR-124 (#290)
Skip exact MinCut during training for graphs >100K edges to avoid
Cloud Run timeout. Cache populated by async scheduled jobs instead.
2026-03-23 19:49:15 -04:00
github-actions[bot]
b91460d47c chore: Update NAPI-RS binaries for all platforms
Built from commit c8a6ab69a9

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-23 23:24:02 +00:00
rUv
c8a6ab69a9 feat(brain): cache partition results, serve via MCP instantly (#289)
- Add cached_partition field to AppState for storing MinCut results
- Populate cache during enhanced training cycle (step 3c)
- REST /v1/partition returns cache if available (bypass with ?force=true)
- MCP brain_partition returns cached compact partition instead of stub
- Canonical MinCut benchmarks: sub-3us for graphs up to 50 nodes
2026-03-23 19:19:36 -04:00
github-actions[bot]
9903510d60 chore: Update NAPI-RS binaries for all platforms
Built from commit 19d0a13d37

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-23 23:16:38 +00:00
github-actions[bot]
03984270a0 chore: Update NAPI-RS binaries for all platforms
Built from commit 49545fe670

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-23 23:15:53 +00:00
rUv
19d0a13d37 ADR-117: Add source-anchored canonical minimum cut implementation (#287)
* Add ADR-117: pseudo-deterministic canonical minimum cut

Introduces source-anchored canonical min-cut based on Kenneth-Mordoch 2026,
with lexicographic tie-breaking (λ, first_separable_vertex, |S|, π(S)) for
unique reproducible cuts. Three-tier plan: exact engine now, O(m log²n) fast
path, then dynamic maintenance via sparsifiers. Integrates with RVF witness
hashing for cut receipts.

https://claude.ai/code/session_01UrVLJpxq8itzVxycy5sjNw

* Implement ADR-117: source-anchored pseudo-deterministic canonical min-cut

Full Tier 1 implementation of the Kenneth-Mordoch 2026 canonical min-cut
algorithm with lexicographic tie-breaking (λ, first_separable_vertex, |S|, π(S)).

Core implementation (source_anchored/mod.rs):
- AdjSnapshot for deterministic computation on FixedWeight (32.32)
- Stoer-Wagner global min-cut on fixed-point weights
- Dinic's max-flow for exact s-t cuts
- SHA-256 (FIPS 180-4, self-contained, no_std compatible)
- SourceAnchoredMinCut stateful wrapper with cache invalidation
- CanonicalMinCutResult repr(C) struct for FFI

WASM bindings (wasm/canonical.rs):
- Thread-safe Mutex-guarded global state (no static mut)
- 8 extern "C" functions: init, add_edge, compute, get_result,
  get_hash, get_side, get_cut_edges, free, hashes_equal
- Constant-time hash comparison for timing side-channel prevention
- Null pointer validation on all FFI entry points
- Graph size limit (10,000 vertices) to prevent OOM

Tests (40 total):
- 33 source_anchored tests: SHA-256 NIST vectors, determinism (100+1000
  iterations), symmetric graphs (K4, K5, cycles, ladders, barbells),
  custom source/priorities, disconnected rejection, FFI conversion
- 7 WASM tests: init/compute lifecycle, null safety, hash comparison,
  self-loop rejection, size limit enforcement

Benchmarks (canonical_bench.rs):
- Random connected graphs (10-100 vertices)
- Cycle and complete graph families
- Hash stability measurement

Security hardening:
- No static mut (Mutex for thread safety)
- Integer-exact FixedWeight arithmetic (no floats in comparisons)
- Checked capacity perturbation bounds
- Source-side orientation invariant enforced
- NIST-validated SHA-256 for witness hashes

ADR-117 updated to production-quality spec with explicit vertex-splitting
requirement for capacity perturbation, WASM FFI documentation, and
Phase 1 completion status.

https://claude.ai/code/session_01UrVLJpxq8itzVxycy5sjNw

* Integrate ADR-117 canonical min-cut into pi.ruv.io brain server

- Enable `canonical` feature on ruvector-mincut dependency
- Add `partition_canonical_full()` to KnowledgeGraph using source-anchored
  canonical min-cut for deterministic, hashable partitions
- Add `canonical` query parameter to `/v1/partition` endpoint
- Add `cut_hash` (hex SHA-256) and `first_separable_vertex` fields to
  PartitionResult and PartitionResultCompact types
- Backward compatible: canonical fields are skip_serializing_if None,
  only populated when `?canonical=true` is passed

https://claude.ai/code/session_01UrVLJpxq8itzVxycy5sjNw

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-23 19:11:51 -04:00
rUv
49545fe670 fix: SSE session grace period, pi-brain default, partition timeout (#288)
* fix: SSE health check, pi-brain default server, partition timeout

- Add rawSseHealthCheck() that keeps SSE alive during MCP handshake
- Add pi-brain as built-in default MCP server in chat UI
- Return quick graph stats for brain_partition instead of expensive MinCut
- Improve system_guidance with all brain tools and better descriptions
- Add .dockerignore and update .gcloudignore for faster builds

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(brain): pin Rust nightly to 2026-03-20 to avoid nalgebra ICE

The latest nightly (2026-03-21+) has a compiler panic when building
nalgebra 0.32.6 with specialization_graph_of. Pin to known-good nightly.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-23 19:11:20 -04:00
github-actions[bot]
4ae7b81e6b chore: Update NAPI-RS binaries for all platforms
Built from commit 158a680340

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-23 21:31:21 +00:00
rUv
158a680340 fix(brain): add 30s grace period to SSE session cleanup + ADR-123 cognitive enrichment
The MCP SDK's EventSource polyfill briefly drops the SSE connection during
initialization, causing the session to be removed before the client can POST.
Added a 30-second grace period so sessions survive brief reconnects.

Also includes ADR-123: drift snapshots from cluster centroids and auto-populate
GWT working memory from search results.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-23 21:24:59 +00:00
github-actions[bot]
bd004042da chore: Update NAPI-RS binaries for all platforms
Built from commit e604dc86f2

  Platforms updated:
  - linux-x64-gnu
  - linux-arm64-gnu
  - darwin-x64
  - darwin-arm64
  - win32-x64-msvc

  🤖 Generated by GitHub Actions
2026-03-23 20:55:24 +00:00