Commit graph

19 commits

Author SHA1 Message Date
Brandon Schneider
aba1fba7ad fix(adversarial-review): resolve 35 critical coding bugs across 8 subsystems
Security & correctness fixes from full adversarial review:

Lean (7 fixes):
- FixedPoint.lean: guard false theorem with n > 0 precondition
- QFactor.lean: remove double-scaling error in energy decrease
- AVMIsa/Step.lean: implement addSatQ16/subSatQ16 primitives
- BraidEigensolid.lean: fix crossStep second output argument swap
- SSMS.lean: complete ACI preservation proof (with rounding caveat)
- HouseholderQR.lean: add n > 0 precondition to spectral theorem

Verilog (7 fixes):
- q16_lut_core.v: fix multiply shift (16 → 32 bits)
- q16_lut_top.v: fix valid bit (0 → 1)
- cff_accelerator.v: fix SHA-256 padding (len < 448 check)
- research_stack_top.v: fix trigger aliasing (unique counters)
- Blitter6502OISC_small.v: fix address width (15 → 16 bits)
- spatial_hash_bram.v: add OOB write guard
- tmr_oepi_safety_fsm.v: fix double-increment race

WGSL (6 fixes):
- shaders.wgsl: atomicAdd for concurrent writes
- frustration_qubo.wgsl: double-buffer + CAS loop
- braid_fft.wgsl: workgroupBarrier synchronization
- burgers_scar_filter.wgsl: atomic E_bins array

Rust (9 fixes):
- thermodynamic.rs: Arc::from_raw → Arc::clone (double-free)
- thermodynamic.rs: Box::into_raw → Box (leak)
- tools/src/lib.rs: shell injection → shlex.quote
- ene-node/src/lib.rs: LRU caps, constant-time HMAC, peer caps

Python (6 fixes):
- similarity/__init__.py: pickle.load → RestrictedUnpickler
- AI-Feynman: torch.load → weights_only=True (14 calls)
- fetch_arxiv.py, fetch_s2.py: eval → ast.literal_eval
- topology.py: os.system → shutil.copy2
- SSH pipe: os.system → base64 pipe

Build: lake build 3572 jobs, 0 errors
2026-05-31 23:38:03 -05:00
Brandon Schneider
6679908f7b fix(arch): enforce Lean-first hierarchy across project — remove all secondary-Lean language
Project-wide sweep to find and fix every place Lean was treated as secondary,
optional, or subordinate to Python/Rust. The invariant: Lean is the source of
truth. Python and Rust are extraction targets only; they contain no logic, no
invariant checks, no decisions.

Changes:

1-Distributed-Systems/ene/src/lib.rs
  - CRITICAL: Remove 'Rust is the canonical implementation language for
    operational components' — replace with correct extraction-target framing

1-Distributed-Systems/agents/claw/README.md
  - Remove 'canonical implementation lives in rust/' and 'source of truth is
    ultraworkers/claw-code' blanket claims — scope to CLI binary only;
    add Research Stack domain-logic note (Lean is source of truth per AGENTS.md)
  - 'canonical Rust workspace' → 'Rust workspace (I/O extraction target)'

1-Distributed-Systems/agents/claw/src/Tool.py
  - 'Python-first porting summary' → 'Lean-to-Python extraction summary'

1-Distributed-Systems/agents/claw/src/projectOnboardingState.py
  - python_first: bool = True → lean_first: bool = True (Lean always leads)

6-Documentation/docs/specs/ENE_MEMORY_ATLAS_SPEC.md
  - CRITICAL: 'Python first (reference) ... Lean-formal next' → correct order:
    Lean specification first, Python extraction shim, Verilog hardware extraction

6-Documentation/docs/recovered/geocognition_equation_types_map.mmd
  - 'Lean owns logic; Rust owns boundary' → 'Lean owns all logic and decisions;
    Rust is boundary shim only'

6-Documentation/docs/semantics/HYPER_DIMENSIONAL_PHYSICS_INTRO.md
  - 'Python implementation ... Lean formalization' → 'Lean specification (source
    of truth) ... Python extraction shim'

6-Documentation/docs/geometry/GEOMETRY_TAXONOMY_FOR_NLOCAL_ADAPTATION.md
  - 'reference specification for the Python implementation' → 'source of truth;
    Python is an extraction shim against this spec'

6-Documentation/docs/protocols/TM_MCP_SPECIFICATION.md
  - 'Python reference implementation' → 'Python extraction shim' (×2)

5-Applications/scripts/snn/README.md
  - 'deterministic Python reference' → 'Python extraction shim / golden-vector
    harness'; add TODO(lean-port) note; RTL must match 'Python shim (pending
    Lean golden vector)' not 'Python reference'

6-Documentation/docs/METAPROBE_APPROACH.md
  - 'DeltaGCLCompression.lean — Lean implementation / scripts/delta_gcl_encoder.py
    — Python reference implementation' → Lean is source of truth / Python is
    extraction shim

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-26 22:40:03 -05:00
Allaun Silverfox
a5e010f12c feat(mcp): route Lean-defined tools via external cmd map 2026-05-26 18:58:49 -05:00
Allaun Silverfox
342a7f475b feat(runtime): register mcp_surface_router module 2026-05-26 18:26:44 -05:00
Allaun Silverfox
724c7a71ff feat(runtime): add generic Lean surface tool command router (CLAW_MCP_TOOL_CMD_MAP) 2026-05-26 18:25:03 -05:00
Allaun Silverfox
f4ef3622c3 feat(runtime): register ene_context_tools shim module 2026-05-26 18:12:56 -05:00
Allaun Silverfox
78268478e2 feat(runtime): add ENE context tool dispatch shim (command-based) 2026-05-26 18:11:39 -05:00
Allaun Silverfox
2f6cc3aa88 docs(runtime): update Lean manifest cmd example to ENE surface toolsJson 2026-05-26 18:06:56 -05:00
Allaun Silverfox
c37a52bbb2 feat(runtime): register lean_mcp_manifest module 2026-05-26 17:50:05 -05:00
Allaun Silverfox
cbe66373cc feat(runtime): source tools/list from Lean manifest env var when spec.tools empty 2026-05-26 17:49:55 -05:00
Allaun Silverfox
75c1f48768 feat(runtime): load MCP tools list from Lean manifest JSON (shim-only) 2026-05-26 17:42:33 -05:00
Brandon Schneider
cdc6706e99 fix(servo-fetch): align dom query with smoothie 2026-05-20 23:07:32 -05:00
dependabot[bot]
f99015c5ad Bump sha2 in /1-Distributed-Systems/agents/claw/rust
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.9 to 0.11.0.
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.9...sha2-v0.11.0)

---
updated-dependencies:
- dependency-name: sha2
  dependency-version: 0.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 01389c38c76d42f311b1192b0965010b8761d378)
2026-05-20 23:02:44 -05:00
dependabot[bot]
eb2425aaa1 Bump crossterm in /1-Distributed-Systems/agents/claw/rust
Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.28.1 to 0.29.0.
- [Release notes](https://github.com/crossterm-rs/crossterm/releases)
- [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossterm-rs/crossterm/commits/0.29)

---
updated-dependencies:
- dependency-name: crossterm
  dependency-version: 0.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 34f19a92ddb59783f09b3f530061f8407a4c391b)
2026-05-20 23:01:47 -05:00
dependabot[bot]
7d6793ae92 Bump tokio
Bumps the claw-cargo-minor-patch group in /1-Distributed-Systems/agents/claw/rust with 1 update: [tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.50.0 to 1.52.3
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.50.0...tokio-1.52.3)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.52.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: claw-cargo-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 71653e6c767f33b589f5a3ea497df94a5236eaca)
2026-05-20 23:01:47 -05:00
Brandon Schneider
c0641ea875 integrate stashed changes: math model data updates + 4 receipt dirs + container config
- Update 3-Mathematical-Models JSON datasets (NUVMAP index, mass proofs,
  math_centric_samples, math_raw_summary, math_self_discovered +1.5M lines,
  structural_discovery, unified_9pattern_samples, unknown_discovery_report)
- Add adjacent_coprime_classification receipt (Lean proof + manifest)
- Add codebase-memory-receipt (Rust crate + manifests)
- Add desi_model_projection receipt (Lean proofs + manifest)
- Add deterministic_build_receipt (Lean build proof)
- Add Containerfile, run-container.sh, cupfox-config.nix
- Restore .github assets and changes.zip
2026-05-17 12:03:19 -05:00
Brandon Schneider
d440fa3f47 Scrub tracked API key material 2026-05-11 22:25:43 -05:00
Brandon Schneider
eb50a316b4 Fix Dependabot dependency alerts 2026-05-08 15:04:30 -05:00
Brandon Schneider
5f88abf618 initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00