Research-Stack/4-Infrastructure/infra
Brandon Schneider c9ccc497f8 ene-session-sync: complete Python→Rust port; fix all 6 pre-existing test failures
**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>
2026-05-19 14:44:19 +00:00
..
access_control initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
embedded_surface ene-session-sync: complete Python→Rust port; fix all 6 pre-existing test failures 2026-05-19 14:44:19 +00:00
ene-rds Fix Dependabot vulns: update sqlx 0.7->0.8.6, add ene-rds Cargo.lock 2026-05-19 08:09:34 +00:00
ene-session-sync ene-session-sync: complete Python→Rust port; fix all 6 pre-existing test failures 2026-05-19 14:44:19 +00:00
ene_plugins/tiddlywiki_bridge wip: refined investigation script for Erdős–Gyárfás conjecture 2026-05-08 14:50:03 -05:00
nodes chore: preserve working tree before secure wipe 2026-05-13 17:36:02 -05:00
shims initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
backup-appflowy-db.sh Fix Porkbun DNS, automate postgres backups, fix rds_probe vulns 2026-05-18 11:52:01 -05:00
ec2-configuration.nix Fix Porkbun DNS, automate postgres backups, fix rds_probe vulns 2026-05-18 11:52:01 -05:00
ene_cognitive_refactor_plan.md collapse: prover orchestration layers, FAMM verilator harness, swarm topological prober, spec sheets, virtual FPGA system tests, merge conflict resolution 2026-05-06 23:42:01 -05:00
nixos-setup-cred-server.sh ene-session-sync: complete Python→Rust port; fix all 6 pre-existing test failures 2026-05-19 14:44:19 +00:00
NV2 initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
recover_credential_server.sh ene-session-sync: complete Python→Rust port; fix all 6 pre-existing test failures 2026-05-19 14:44:19 +00:00
RECOVERY.md Add EC2 recovery backup: NixOS config, AppFlowy compose/env template, credential server bootstrap, recovery guide 2026-05-18 10:44:23 -05:00
requirements_knowledge.txt initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00