Skip to content

feat(ADR-058): Phase 3-4 — GGUF engine, Ed25519 signing, IPFS distribution, hot-patch#1252

Merged
ruvnet merged 3 commits intomainfrom
feat/rvfa-phase3-phase4
Feb 28, 2026
Merged

feat(ADR-058): Phase 3-4 — GGUF engine, Ed25519 signing, IPFS distribution, hot-patch#1252
ruvnet merged 3 commits intomainfrom
feat/rvfa-phase3-phase4

Conversation

@ruvnet
Copy link
Owner

@ruvnet ruvnet commented Feb 28, 2026

Summary

  • Phase 3: GGUF inference engine with binary header parsing, node-llama-cpp integration (optional), async streaming, and RVKV KV-cache persistence with SHA256 integrity
  • Phase 4: Ed25519 code signing (PEM key management, canonical JSON digests, tamper detection), IPFS publishing via Pinata, and RVFP hot-patch format with atomic section replacement and rollback
  • Deep review fixes: PEM/DER interop, HTTP timeouts + redirect limits, mandatory cache footer, canonical JSON in patch signatures, signer flag passthrough

New modules (3)

File Lines Purpose
gguf-engine.ts 452 GGUF binary parser + local inference via node-llama-cpp
rvfa-signing.ts 461 Ed25519 signing/verification with PEM key management
rvfa-distribution.ts 406 RVFP patch format + Pinata IPFS publishing

Modified (3)

File Change
ruvllm-bridge.ts Integrated GGUF engine as preferred Tier 2 backend
appliance.ts Wired sign/publish/update subcommands
appliance-advanced.ts Extracted 3 CLI subcommands (500-line limit)

Test plan

  • 75 new tests across 3 test files (26 GGUF, 21 signing, 28 distribution)
  • 59 Phase 1-2 tests pass without regression (134/134 total)
  • Tamper detection: header modification, section modification, footer corruption
  • Round-trip: key generation → save → load → sign → verify
  • Patch lifecycle: create → verify → apply → post-verify with rollback
  • Target mismatch: wrong name, version, nonexistent section
  • Gzip compression round-trip in patches
  • Re-signing replaces old signature cleanly

🤖 Generated with claude-flow

…ution, hot-patch

Phase 3: ruvLLM GGUF inference engine
- gguf-engine.ts: Binary GGUF header parser (v2/v3), model metadata extraction,
  optional node-llama-cpp integration for local inference, RVKV KV-cache
  persistence format, async token streaming
- ruvllm-bridge.ts: Integrated GGUF engine as preferred Tier 2 backend,
  automatic model metadata enrichment on load

Phase 4: Ed25519 code signing + IPFS distribution + hot-patch updates
- rvfa-signing.ts: Ed25519 key generation/storage (PEM), two-pass appliance
  signing (canonical JSON for deterministic digests), signature verification,
  detached patch/section signing
- rvfa-distribution.ts: RVFP binary patch format (magic "RVFP", section-level
  replacement), Pinata IPFS publishing (multipart upload, no external deps),
  11-step atomic patch application with backup + rollback
- appliance-advanced.ts: CLI subcommands (sign, publish, update) extracted
  to keep files under 500 lines

Tests: 75 new tests (26 GGUF + 21 signing + 28 distribution), 134 total passing

Co-Authored-By: claude-flow <ruv@ruv.net>
- Pass --signer flag through to signAppliance() in CLI command
- Auto-detect PEM vs DER key format for cross-module signing interop
- mkdir key directory before saving key pair (prevents ENOENT)
- Add redirect depth limit (max 5) and 30s timeout on HTTP requests
- Use canonical JSON for deterministic patch signature verification
- Make RVKV footer hash mandatory (reject truncated cache files)
- Use llama.cpp token count when available, else chars/4 heuristic
- Remove unused GgufMetadata type import from ruvllm-bridge

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit ce02749 into main Feb 28, 2026
5 of 7 checks passed
@ruvnet ruvnet deleted the feat/rvfa-phase3-phase4 branch February 28, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant