mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
**New Rust modules (batch 2 — 9 files)** - src/deepseek_adapter.rs — DeepSeek/Ollama chat + DeepSeekProver - src/ene_cloud_credential_manager.rs — ENE cloud credential + node balancer (SQLite) - src/enhanced_swarm.rs — enhanced swarm stub - src/gemma_integration.rs — SQLite task queue for Gemma 4 model tasks - src/hyperbolic_encoding.rs — Poincaré disk math, HyperbolicManifoldEncoder - src/knowledge_ingestion.rs — WolframAlpha, OpenMath, nLab wiki adapters - src/manifold_perception.rs — filesystem manifest scanner / topological report - src/s3c_lean_review.rs — CLI adapter submitting S3C.lean to Gemma4Integration - src/search_adapter.rs — Google (stub) + Brave search providers All 9 wired into main.rs as mod declarations. **Test fixes (6 pre-existing failures → 0)** - s3c.rs: fix shell decomp width formula (a+b not a+b+1); correct test expectations for n=9 (b=7, not b=1); invariant a+b=2k+1 not 2k - math.rs: fix test_avg_chain expected avg to 10/6 (all-pairs average, not just A→* paths) - ene_core.rs: fix AES-GCM decrypt AAD mismatch in retrieve_sensitive_data — SELECT now fetches pkg column and passes it as AAD (matches store path) - hyperbolic_encoding.rs: fix Möbius transform formula to standard gyrovector form: denom = 1+2⟨a,z⟩+‖a‖²‖z‖² (was missing ‖a‖²‖z‖² term, had +‖z‖² instead) — satisfies T_0(z)=z identity **cargo test: 145 passed, 0 failed** **Delete 35 Python source files** now superseded by Rust crate: All 4-Infrastructure/infra/*.py and embedded_surface/server.py removed. **Deploy scripts updated** to use rs-surface binary instead of Python: - gcl_edge_in_place_upgrade.sh: CURRENT_SERVER → rs-surface binary; validate with test -x; smoke-test exec binary directly; rollback saves rs-surface - xen_alpine/install_rs_surface_openrc.sh: SERVER_SRC → musl release binary; drop python3 from apk; install as rs-surface (not server.py) - xen_alpine/run_qemu_alpine_surface.sh: default SURFACE_IMPL=rust; RUST_BIN var for musl binary; else-branch copies rs-surface; boot script exec binary - recover_credential_server.sh: upload rs-surface binary; ExecStart → binary with RS_SURFACE_PORT=8444 (credential endpoint built into rs-surface /credentials) - nixos-setup-cred-server.sh: same — ExecStart uses /opt/rs-surface/rs-surface Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| config | ||
| drivers | ||
| exploit-infra/CATEGORY/TSM | ||
| gpu | ||
| hardware | ||
| infra | ||
| k3s-flake | ||
| kernel | ||
| nano-kernel | ||
| NoDupeLabs | ||
| packaging | ||
| rds_probe | ||
| servo-fetch | ||
| shim | ||
| shims | ||
| storage | ||
| surface | ||
| witness | ||
| AGENTS.md | ||
| README.md | ||
4-Infrastructure
Purpose: Rust/Python shims, GPU duty assignment, cloud storage, web interaction, hardware designs, drivers, and the ENE RDS Rust workspace.
Depends on: 0 through 3
Directory Layout
| Path | Purpose |
|---|---|
infra/ |
Python shims, ENE distributed node, credential server |
infra/ene-rds/ |
ENE RDS Rust workspace (8 crates — Rust replacement for Python RDS stack) |
hardware/ |
FPGA Verilog, FAMM verilator, KiCad templates |
drivers/ |
Hardware drivers |
gpu/ |
WGSL shaders, wgpu compute dispatch |
storage/ |
restic + Garage S3 + rclone storage stack |
storage/storage_agent.py |
Storage observer/optimizer agent |
shim/ |
Stack solidification probes, adversarial harnesses, gate library |
surface/ |
FastAPI/WebSocket surface (spec'd, pending implementation) |
ENE RDS Rust Workspace (infra/ene-rds/)
8-crate Rust workspace replacing the Python RDS stack. Build: cd 4-Infrastructure/infra/ene-rds && cargo build --release.
| Crate | Purpose |
|---|---|
ene-rds-core |
Shared PostgreSQL client, DSN builder, receipts |
ene-rds-wiki |
Wiki CRUD + full-text search + revision tracking |
ene-rds-ephemeral |
EphemeralNode thermal zones, tasks, receipts, scars, metrics |
ene-rds-chat |
Chat session ingestion, keyword/semantic search |
ene-api |
Axum HTTP server on :3000 |
ene-node |
Node identity and gossip primitives |
ene-storage |
S3/Garage object storage client |
ene-sync |
Polls opencode.db SQLite → upserts into RDS chat tables |
sqlx 0.8.6 (Dependabot vuln from 0.7 resolved 2026-05-19).
Storage Stack (storage/)
Three tools, non-overlapping roles. Full contract: 4-Infrastructure/AGENTS.md §Storage Stack.
| Tool | Job |
|---|---|
| restic | Deduplicated, encrypted, content-addressed snapshots |
| Garage v2.3.0 | Self-hosted S3-compatible object store (Tailscale mesh, 5 buckets) |
| rclone | Raw sync between remotes (Garage↔gdrive cold copy) |
Storage agent (storage/storage_agent.py): observe→decide→act loop, systemd timer (every 15 min), Q16_16 thresholds, JSONL hash-chain receipts.
GPU Status
- Device: NVIDIA GeForce RTX 4070
- Memory: 12.3GB total, ~10GB available
- CUDA: 13.0
- Compute dispatch: WGSL → wgpu (Vulkan GPU / lavapipe CPU / WebGPU WASM). Dispatch entry points:
5-Applications/parquet_compressor/src/gpu.rs,gpu/wasmgpu/(47 WGSL shaders)
Components
- ENE RDS — Rust workspace replacing Python RDS (see above)
- Storage Stack — restic + Garage S3 + rclone (see above)
- Lean Shim — Lean ↔ Python bidirectional interface
- ENE Shim — ENE node management from Python
- GPU Duty — WGSL/wgpu compute dispatch (Q16_16 deterministic across all substrates)
- Credential Gateway —
infra/credential_server.py, apiProvider service kind, cupfox routing - Adversarial Harnesses —
shim/adversarial_duals/: Anti-FAMM, Anti-BraidStorm, 20+ gate library entries