Research-Stack/4-Infrastructure
Brandon Schneider 835299fd9a fix(lean+shim): enforce lean-coding rules across audit surface
## Lean fixes

- RRCLogogramProjection.lean: replace `native_decide` → `decide` in 5
  compiler-surface theorem witnesses (semantic_tear_projects_after_repair,
  semantic_tear_does_not_merge, semantic_tear_uses_quarantine_lane,
  unrepaired_tear_does_not_project, ordinary_logogram_projects_and_merges).
  All 5 pass under `decide`; no logic change.

- PistSimulation.lean: add `-- expect: <value>` to every `#eval`/`#eval!`
  block across §6–§11 (~104 annotation lines). Document 8 undocumented
  `ofRawInt` magic integers in fixtureSpectralWindow (10.0, 20.0, 100.0,
  40.0, 20.0, 10.0, 5.0, 5.0 × 65536).

- DynamicCanal.lean: add `-- expect:` to all 15 #eval witness blocks in
  §17 (fixed-point constructors, DIAT encoding, coarse-graining tests).

- MISignal.lean: add `-- expect: 131072` to both #eval witnesses.

- Functions/BracketedCalculus.lean: add `-- expect: 327680` to #eval.

- AVMIsa/Emit.lean, RRC/Emit.lean, RRC/ReceiptDensity.lean, ReceiptCore.lean:
  previously-staged `-- expect:` additions (from prior session) carried
  forward in this commit.

## Python shim fixes

- Add `# PARTIAL BOUNDARY: contains domain logic; not a provable surface.
  Port to Lean/RRC before treating as authoritative.` to 9 shim files:
  pist_trace_classify_mcp.py, genus0_sphere_shell_demo.py,
  routing_benchmark.py, route_repair_v14a.py, pist_prove_and_classify.py,
  label_canary_theorems.py, validate_rrc_predictions.py,
  pist_receipt_density_injector.py, rrc_pist_shape_alignment.py.

## Build baseline

  lake build Compiler  →  3311 jobs, 0 errors
  lake build           →  3567 jobs, 0 errors

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-26 23:17:40 -05:00
..
auto archive: remove dated receipts, experimental probes, and uncompiled prototypes 2026-05-25 16:51:58 -05:00
bin initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
config initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
docs WIP: accumulated changes 2026-05-25 16:24:21 -05:00
drivers initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
exploit-infra/CATEGORY/TSM initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
hardware Track remaining source and documentation inventory 2026-05-11 22:18:31 -05:00
infra chore(pending): quarantine python ENE ContextStream MCP surface (Lean-first unification) 2026-05-26 17:59:30 -05:00
k3s-flake chore(tests): gitignore Playwright test-results and node_modules 2026-05-26 21:12:00 -05:00
kernel chore: preserve working tree before secure wipe 2026-05-13 17:36:02 -05:00
nano-kernel Track remaining source and documentation inventory 2026-05-11 22:18:31 -05:00
NoDupeLabs Scrub tracked API key material 2026-05-11 22:25:43 -05:00
packaging 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
rds_probe Fix Dependabot vulns: update sqlx 0.7->0.8.6, add ene-rds Cargo.lock 2026-05-19 08:09:34 +00:00
scripts feat(pist): Route-Repair v1.1 — 60 failure flexures ingested, obstruction-type voting 2026-05-26 12:17:42 -05:00
servo-fetch fix(servo-fetch): align dom query with smoothie 2026-05-20 23:07:32 -05:00
shim fix(lean+shim): enforce lean-coding rules across audit surface 2026-05-26 23:17:40 -05:00
shims initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
storage WIP: accumulated changes 2026-05-25 16:24:21 -05:00
surface initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
witness Refactor provenance sources for open witness backends 2026-05-12 05:57:04 -05:00
AGENTS.md docs(agents): project-wide AGENTS.md audit — cross-refs, baseline, contracts 2026-05-26 22:34:46 -05:00
README.md docs: full documentation + roadmap refresh (2026-05-19) 2026-05-19 09:12:16 +00:00

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 Gatewayinfra/credential_server.py, apiProvider service kind, cupfox routing
  • Adversarial Harnessesshim/adversarial_duals/: Anti-FAMM, Anti-BraidStorm, 20+ gate library entries