mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-10-23 14:50:55 +00:00
* feat(gpu-runner): budget-capped vast.ai launcher with auto-destroy
Rust CLI for OpenJev training runs on vast.ai. Hard --max-usd/--max-hours
with a watchdog, idempotent destroy on success/failure/timeout/signal/panic,
verified-host offer filters re-checked client-side, digest-pinned images,
SHA-pinned git checkout, and credential-free uploads via per-object signed
PUT URLs minted by impersonating a keyless objectCreator SA. JSONL audit log,
--dry-run and reap.
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): ADR-007 OpenJev model + v0 implementation plan
Open-weight Jev-contract model for @ruvector/typesafe: bge-small fine-tuned
in candle, weights transplanted into the pinned ONNX graph (ort parity
>= 0.9999 cosine), calibrated on the existing slice. Pre-registered claims
use the campaign's paired sequential test (superior to Jev baseline,
non-inferior to Jev champion), a template-memorisation slice, a hard
train/test hash-leakage abort, and a within-2pp target vs published
Banking77/CLINC150 SOTA.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(gpu-runner): pass --region to sign-url
The keyless signer SA only holds objectCreator, so gcloud cannot auto-detect
the bucket region (needs storage.buckets.get). Pass it explicitly
(--bucket-region, default us-central1) instead of widening the SA.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(typesafe/bench): OpenJev v0 harness — leakage, --model-dir, --no-test, per-item records, vs-jev
ADR-007 plan Step 1 (bench side only; the Rust trainer lives on feat/openjev-train).
- lib/norm.mjs: norm/sha256Norm (NFKC -> lowercase -> [^\p{L}\p{N}]+ -> " " -> trim),
52 golden vectors in bench/test/norm-golden.json, cross-checked against a Rust
reference (unicode-normalization + regex) — the trainer's contract.
- lib/leakage.mjs: Assertion B. train-text-hashes.txt parsed strictly; run.mjs and
optimize.mjs refuse to score (exit 3) when any held-out text hash (tickets test +
transfer + calibration; public test) is in the model's train hashes.
- lib/model-dir.mjs: --model-dir/--manifest resolve ONE sha256-verified entry
(staged manifest or synthesized for a bare dir), passed inline to the engine
(no first-entry fallback) and recorded as embedder_model in receipts.
- run.mjs: --no-test (validation + transfer only, no Jev replay), --train-hashes,
--emit-records; local receipts carry item_records per split.
- optimize.mjs: --model-dir, --manifest, --train-hashes, --no-test (test rows
withheld, test fields null); main() exported with an injectable binding.
- lib/paired.mjs: JS port of PairedSequentialTest (alpha 0.05, lambda 0.5, f32
rounding) proven against Rust-emitted wealth paths (bench/test/paired-golden.json).
- vs-jev.mjs: superior / non-inferior / loses tiers vs Jev baseline and champion,
lexical id order, on full / novel (119) / template (31) slices.
- lib/novel-slice.mjs + fixtures/novel-slice-2026-09-26.json, pinned under
HASHES.json `derived` (hash-fixtures.mjs), leaving the release fixture pin intact.
- fetch-models.mjs: OpenJev download map derived from an immutable HF revision,
openjevManifestEntry() shape, --add-openjev <commit> bootstrap; importable.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(typesafe/bench): path-free OpenJev receipt blocks, honest arms under --no-test, per-arm missing models
- embedder_model / leakage record file names + sha256s, never absolute paths.
- run.mjs --no-test no longer lists the skipped jev arm in receipt.arms.
- optimize.mjs: an unfetched model is a per-arm error again (as before the
model-dir refactor); unpinned/mismatched models and leaks stay fatal.
Verified: local-arm metrics of the release ONNX command are identical before and
after the harness changes (test/validation/transfer, latency excluded).
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(openjev): Rust trainer crate ruvector-typesafe-train (ADR-007 v0)
New workspace crate + `openjev` CLI implementing the OpenJev v0 training
pipeline from docs/research/openjev/v0-plan.md, Rust only:
- prep: rebuilds the bench's exact splits (tickets assignSplit +
excludeHeldOutText; Banking77/CLINC150/HWU64 parsing and ids) from the
frozen fixture and sha256-pinned public files; writes train/val jsonl,
labels.json, heldout-hashes.txt, data-manifest.json. Cross-checked
against the JS loaders: 0 mismatched rows, 136/150 tickets train/val.
- Assertion A: held-out hashes recomputed from sources before the first
step; any train/val collision aborts with exit 3 (planted-collision
tests, unit + real data). norm() passes all 52 bench golden vectors.
- train: own BERT forward (candle-nn 0.9.2 fused LayerNorm/softmax have no
backward), SupCon over P x K batches with label descriptions as
positives, cosine heads (dept/urgent/frustration + 3 public), soft
ambiguous targets, label smoothing, CLINC outlier exposure, AdamW with
param groups + global-norm clip, warmup/linear decay, early stopping.
- transplant: value-matches all 197 float initializers to the ORIGINAL
BAAI safetensors (72 anonymous transposed MatMuls cross-checked against
their consuming node names), requires a bijection, patches payload
bytes in place; identity transplant is byte-identical to the template.
- parity: engine OrtEmbedder on the new ONNX vs candle, cosine >= 0.9999
per probe + identical engine department decisions.
- stage: bench model-dir layout with pinned manifest.
- scripts/openjev/vast-train.sh for ruvector-gpu-runner (CUDA build,
fetch, prep, train, transplant, parity, SHA256SUMS into RVGR_ARTIFACT_DIR).
candle/cudarc/tract/ort/prost are the versions already in Cargo.lock; the
lock change is only the new crate entry. CUDA is an opt-in feature.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(openjev-train): bound GPU memory — detached AdamW moments, graph-free eval, pool trim
Found on the local RTX 5080 end-to-end runs:
- AdamW moments were built from gradient tensors that carry backprop
history, chaining every step's graph (~40 MB/step, OOM at ~400 steps).
Gradients, moments and theta are now detached (regression test).
- Evaluation ran on Var-backed weights and recorded a full autograd graph
per batch. `model::frozen_view` shares the Vars' storage without
tracking (reflects optimizer updates via Var::set; tested); parity uses
it too.
- cudarc allocates from the device's default stream-ordered pool; varying
batch shapes plus full-validation passes ratcheted the reserve past
16 GB at ~1500 v0 steps. `gpu::trim` syncs and cuMemPoolTrimTo(0)s after
every eval and every 25 steps, logging device memory to curves.jsonl.
Full v0 config now peaks ~10 GB and trims back to 3.4-4.9 GB, flat.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(openjev-train): never train on label descriptions that equal a test text
Checking the shipped train-text-hashes.txt against ALL held-out hashes (not
just tickets) found 12 collisions: humanised intent names used as SupCon
extra positives are verbatim public test utterances (CLINC150 goodbye,
directions, time, what_is_your_name, ...; Banking77 pending_transfer; HWU64
play_audiobook). They received gradients with their true label, and the
bench's Assertion B would refuse every public suite (exit 3).
- leakage::colliding_descriptions; prep-check and prep record them in
leakage-report.json (`dropped_descriptions`); train excludes them from
the SupCon positives and from train-text-hashes.txt (which now lists
exactly the texts that produced gradients). Real-data test pins 12.
- The per-run leakage-report.json now carries prep's dropped_duplicates
(was 0) so the model card can quote it verbatim.
- parity reports cosines in f64 (min 0.9999999999993 on the e2e run).
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(openjev): vast-train.sh installs libssl-dev (ort-sys build needs openssl-sys)
Found by running the script in the runner's pinned nvidia/cuda:12.4.1-devel
image: the ort-sys build script downloads onnxruntime via ureq/native-tls.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(openjev): vast-train.sh requires an Ubuntu 24.04 CUDA image (glibc >= 2.38)
ort 2.0.0-rc.13's prebuilt static onnxruntime (engine native path, used by
parity) references __isoc23_strtol and GCC 13 libstdc++ symbols, so linking
fails in the runner's default cuda:12.4.1-devel-ubuntu22.04 (glibc 2.35).
Found by running the script in that pinned image. The script now refuses in
seconds on glibc < 2.38 and documents the pinned replacement image
nvidia/cuda:12.6.3-devel-ubuntu24.04@sha256:392c0df7...
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(openjev): vast-train.sh retries the cargo build once; launch example sets --min-cuda 12.6
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(openjev): glibc preflight read via getconf (ldd|head tripped pipefail)
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(gpu-runner): default to CUDA 12.6 / Ubuntu 24.04 image
ort 2.0.0-rc.13's prebuilt onnxruntime needs glibc >= 2.38; the 22.04 image
(glibc 2.35) fails to link the OpenJev trainer. Digest verified by the
trainer's local image build.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(typesafe): explicit calibration slice + public-suite validation view (OpenJev v1)
- core: Engine::train_with_calibration admits a held-out slice into the bank's
Calibration split; when present, temperature/Platt fit on exactly that slice
and the head on all Train rows. Without it the positional carve is unchanged
(bit-identical; regression-checked on bge-small and OpenJev v0 receipts).
- ffi/wasm: trainJson accepts an optional "calibration" array.
- bench: tickets calibrate on the fixture calibration split by default
(ADR-007 §4); --no-calibration-split restores the carve.
- bench: run.mjs --no-test on banking77/clinc150/hwu64 scores the exporter's
validation slice (lib/public-val.mjs; row-set verified identical to the
trainer's val.jsonl), never test.
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): v1 validation results (5 seeds) + shipped evaluation configuration
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): v1 public-suite validation (5 seeds vs base) + idle latency
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): v1 note — gate scope, data identity, import_bank side effect
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): v1 one-time frozen test results — secondary claim holds, primary + ECE gate not met
Seed 2 on the frozen 150-item test: department 93.3% (non-inferior to Jev),
urgent 92.7% and frustration 86.0% (both superior to Jev baseline and
champion), p95 10.1 ms, zero leakage. ECE 0.0543 fails the 0.05 gate.
Per ADR-007 §6 v1 is not published.
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): renumber OpenJev ADR to typesafe ADR-008; record v1 status
typesafe ADR-007 is taken on main by the ESP32 measured-sensor ADR (#1018),
so the OpenJev ADR becomes ADR-008 and references are updated. Frozen fixture
text (novel-slice comment, golden files, receipts) keeps its original
ADR-007 wording so the sha256 pins stay valid. Status now records the
one-time v1 test result: claim not met, model unpublished.
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(openjev): update remaining ADR-008 references in typesafe scripts
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|---|---|---|
| .. | ||
| benchmark | ||
| build | ||
| ci | ||
| deploy | ||
| lib | ||
| openjev | ||
| patches/hnsw_rs | ||
| publish | ||
| research-gate | ||
| sona-drift | ||
| test | ||
| training | ||
| validate | ||
| adr-index.mjs | ||
| analyze-evolution.js | ||
| analyze-ham10000.js | ||
| build-solver.sh | ||
| build-sonic-ct-wasm.sh | ||
| check_brain_status.sh | ||
| claude-code-decompile.sh | ||
| claude-code-rvf-corpus.sh | ||
| create-brainpedia.py | ||
| deploy-crawl-phase1.sh | ||
| deploy-dragnes.sh | ||
| deploy-gemini-agents.sh | ||
| deploy-wet-job.sh | ||
| deploy_brain_services.sh | ||
| deploy_trainer.sh | ||
| discover_and_train.sh | ||
| extract-ruqu-rvdna-submodules.sh | ||
| frozen-weights-check.mjs | ||
| gemini-agents.js | ||
| generate-rvf-manifest.py | ||
| historical-crawl-import.sh | ||
| publish-rvf.sh | ||
| README.md | ||
| rebuild-all-versions.mjs | ||
| run_mincut_bench.sh | ||
| rvagent-flywheel-evaluator.mjs | ||
| rvforge-parity-check.sh | ||
| rvforge-parity-fixture.cjs | ||
| seed-brain-all.py | ||
| seed-brain.rs | ||
| seed-specialized.py | ||
| setup-gcs-examples.sh | ||
| sift1m_hnswlib_bench.mjs | ||
| sql-audit-v3.sql | ||
| swarm_train_15.sh | ||
| sync-lockfile.sh | ||
| train-lora.py | ||
| train_brain.sh | ||
| training_orchestrator.sh | ||
| upvote_memories.py | ||
| vote-boost.py | ||
| wet-filter-inject.js | ||
| wet-full-import.sh | ||
| wet-job.yaml | ||
| wet-orchestrate.sh | ||
| wet-processor.sh | ||
| workspace-check.mjs | ||
RuVector Automation Scripts
This directory contains automation scripts organized by purpose.
📁 Directory Structure
scripts/
├── README.md # This file
├── benchmark/ # Performance benchmarking
├── build/ # Build utilities
├── ci/ # CI/CD automation
├── deploy/ # Deployment scripts
├── patches/ # Patch files
├── publish/ # Package publishing
├── test/ # Testing scripts
└── validate/ # Validation & verification
🚀 Deployment
Scripts for deploying to production.
| Script | Description |
|---|---|
deploy/deploy.sh |
Comprehensive deployment (crates.io + npm) |
deploy/test-deploy.sh |
Test deployment without publishing |
deploy/DEPLOYMENT.md |
Full deployment documentation |
deploy/DEPLOYMENT-QUICKSTART.md |
Quick deployment guide |
Usage:
# Full deployment
./scripts/deploy/deploy.sh
# Dry run
./scripts/deploy/deploy.sh --dry-run
# Test deployment
./scripts/deploy/test-deploy.sh
📦 Publishing
Scripts for publishing packages to registries.
| Script | Description |
|---|---|
publish/publish-all.sh |
Publish all packages |
publish/publish-crates.sh |
Publish Rust crates to crates.io |
publish/publish-cli.sh |
Publish CLI package |
publish/publish-router-wasm.sh |
Publish router WASM package |
publish/check-and-publish-router-wasm.sh |
Check and publish router WASM |
Usage:
# Set credentials first
export CRATES_API_KEY="your-crates-io-token"
export NPM_TOKEN="your-npm-token"
# Publish all
./scripts/publish/publish-all.sh
# Publish crates only
./scripts/publish/publish-crates.sh
📊 Benchmarking
Performance benchmarking scripts.
| Script | Description |
|---|---|
benchmark/run_benchmarks.sh |
Run core benchmarks |
benchmark/run_llm_benchmarks.sh |
Run LLM inference benchmarks |
Usage:
# Run core benchmarks
./scripts/benchmark/run_benchmarks.sh
# Run LLM benchmarks
./scripts/benchmark/run_llm_benchmarks.sh
🧪 Testing
Testing and validation scripts.
| Script | Description |
|---|---|
test/test-wasm.mjs |
Test WASM bindings |
test/test-graph-cli.sh |
Test graph CLI commands |
test/test-all-graph-commands.sh |
Test all graph commands |
test/test-docker-package.sh |
Test Docker packaging |
Usage:
# Test WASM
node ./scripts/test/test-wasm.mjs
# Test graph CLI
./scripts/test/test-graph-cli.sh
✅ Validation
Package and build verification scripts.
| Script | Description |
|---|---|
validate/validate-packages.sh |
Validate package configs |
validate/validate-packages-simple.sh |
Simple package validation |
validate/verify-paper-impl.sh |
Verify paper implementation |
validate/verify_hnsw_build.sh |
Verify HNSW build |
Usage:
# Validate packages
./scripts/validate/validate-packages.sh
# Verify HNSW
./scripts/validate/verify_hnsw_build.sh
🔄 CI/CD
Continuous integration scripts.
| Script | Description |
|---|---|
ci/ci-sync-lockfile.sh |
Auto-fix lock files in CI |
ci/sync-lockfile.sh |
Sync package-lock.json |
ci/install-hooks.sh |
Install git hooks |
Usage:
# Install git hooks (recommended)
./scripts/ci/install-hooks.sh
# Sync lockfile
./scripts/ci/sync-lockfile.sh
🛠️ Build
Build utility scripts located in build/.
🩹 Patches
Patch files for dependencies located in patches/.
🚀 Quick Start
For Development
-
Install git hooks (recommended):
./scripts/ci/install-hooks.sh -
Run tests:
./scripts/test/test-wasm.mjs
For Deployment
-
Set credentials:
export CRATES_API_KEY="your-crates-io-token" export NPM_TOKEN="your-npm-token" -
Dry run first:
./scripts/deploy/deploy.sh --dry-run -
Deploy:
./scripts/deploy/deploy.sh
🔐 Security
Never commit credentials! Always use environment variables or .env file.
See deploy/DEPLOYMENT.md for security best practices.