rdmbair15m5-changelog-20260829-1307-ainetnode-m2-consensus-enhancements
rdmbair15m5-changelog-20260829-1307-ainetnode-m2-consensus-enhancements
Implemented Milestone 2 AINetNode Consensus Enhancements including multi-factor adaptive load balancing request scheduler, automated VRAM threshold alerts (80% BUSY / 90% RELAYING) with 1-click KV cache purge, and instant parallel multi-point connection diagnostics across the macOS AI mesh.
Scope
- Hosts:
rdmbair15m5(local work),rdmsm4x(fleet canonical) - Targets:
AINetNodeCore,AINetNode-app,AINetNodeTests
Files Touched
Sources/AINetNodeCore/Router/AdaptiveMeshScheduler.swift(NEW): Multi-factor scoring formula weighting VRAM free/total, chip architecture (Apple Silicon ANE/MLX vs Intel Xeon/Radeon Pro), prompt eval tok/s, network latency ms, and workload-aware routing with automatic >85% congestion load shedding.Sources/AINetNodeCore/Router/MemoryPressureMonitor.swift(NEW): Real-time local and peer memory pressure monitoring, 80% warning (BUSY) / 90% critical (RELAYING) alerts via ActivityLogger, automated & 1-click KV cache purge, and native Mach kernel memory sampling.Sources/AINetNodeCore/Mesh/ConnectionDiagnosticsEngine.swift(NEW): Instant parallel multi-probe network diagnostic matrix covering Bonjour mDNS, Tailscale Mesh, Cloudflare/MagicDNS, SSH port 22 key-auth reachability, and OpenAI Gateway endpoint RTT.Sources/AINetNodeCore/Mesh/BonjourAdvertiser.swift: AddedisCurrentlyAdvertisingstate inspector.Sources/AINetNodeCore/Mesh/MultiDiscoveryCoordinator.swift: IntegratedAdaptiveMeshSchedulerandMemoryPressureMonitortelemetry evaluation.Sources/AINetNodeCore/Server/OpenAIGatewayServer.swift: Integrated adaptive scheduler request routing, added/v1/diagnosticsand/v1/memory/alertsREST endpoints.Sources/AINetNodeCore/Permissions/AINetPermissionsManager.swift: Fixed redundant@preconcurrencywarning.Sources/AINetNode-app/Views/NodesDetailView.swift: Added VRAM alert badges (⚠️ VRAM > 80%,🚨 VRAM > 90%), telemetry progress bar coloring, and 1-click Purge VRAM button with live feedback.Sources/AINetNode-app/Views/ServicesHealthBar.swift: Added real-time VRAM alert pill and top bar 1-click Purge VRAM action.Sources/AINetNode-app/Views/DetailedSettingsView.swift: Added interactive Connection Diagnostics matrix section with per-probe RTT ms, status badges, and Run Diagnostics button.Sources/AINetNode-app/Views/MainMeshView.swift: Added Diagnostics sidebar navigation and content mapping.Tests/AINetNodeTests/AINetNodeTests.swift: Added 6 new unit tests covering workload classification, vision routing to Apple Silicon ANE, batch/embedding routing to Intel Mac Pro, load shedding under congestion, memory pressure thresholds & purges, and multi-point network probes.
Verification Evidence
swift test: 12/12 passed (100% pass rate) with zero compiler warnings under Swift 6 strict concurrency mode.swift build -c release: Succeeded cleanly with zero warnings/errors.