Skip to content

Commit 2c1982c

Browse files
committed
updated essenece
1 parent e408a54 commit 2c1982c

1 file changed

Lines changed: 51 additions & 109 deletions

File tree

essence.rst

Lines changed: 51 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -15,107 +15,62 @@ Root Directory
1515
High-level project configuration and documentation.
1616

1717
- ``.`` (**Root**)
18-
- ``Cargo.toml``: **[FILE]** Workspace definition. Manages shared dependencies and members (kernel, node, ffi, etc.).
19-
- ``README.md``: **[FILE]** Primary entry point. Contains architecture overview, quickstart guides, and project status.
20-
- ``architecture.md``: **[FILE]** Detailed architectural blueprint (Layered design, Determinism specs).
21-
- ``all-functions.md``: **[FILE]** Auto-generated reference of all kernel functions.
22-
- ``build.log``: **[FILE]** Log file capturing build outputs (useful for debugging CI/Build failures).
23-
- ``Dockerfile``: **[FILE]** Docker container definition for packaging the Valori Node server.
24-
- ``LICENSE``: **[FILE]** AGPLv3 License text.
25-
- ``COMMERCIAL_LICENSE.md``: **[FILE]** Commercial licensing terms.
26-
- ``test_replication_e2e.py``: **[TEST]** Top-level end-to-end Python script verifying Leader-Follower replication.
27-
- ``valori_ffi.pyd``: **[FILE]** Compiled Python extension module (shared object) for direct FFI usage.
28-
29-
crates/ (Core Libraries)
30-
------------------------
31-
The workspace holding the fundamental Rust libraries.
18+
- ``Cargo.toml``: **[FILE]** Workspace definition. Defines the root ``valori-workspace`` crate and members.
19+
- ``src/``: **[DIR]** **CORE KERNEL**. The pure, ``no_std``, deterministic core logic of Valori.
20+
- ``lib.rs``: Kernel entry point.
21+
- ``config.rs``: Kernel-level configuration.
22+
- ``error.rs``: ``KernelError`` definitions.
23+
- ``event.rs``: ``KernelEvent`` enum definitions (Event Sourcing).
24+
- ``proof.rs``: Cryptographic state hashing and proof generation.
25+
- ``verify.rs``: Logic to verify proofs and signatures.
26+
- ``replay.rs``: Command replay logic (Legacy).
27+
- ``replay_events.rs``: Event Log replay logic (Current).
28+
- ``fxp/``: **[DIR]** Fixed-Point Arithmetic (Q16.16).
29+
- ``mod.rs``, ``qformat.rs``, ``ops.rs``: Deterministic math primitives.
30+
- ``graph/``: **[DIR]** Knowledge Graph.
31+
- ``node.rs``, ``edge.rs``: Graph primitives.
32+
- ``adjacency.rs``: Graph traversal logic.
33+
- ``index/``: **[DIR]** Vector Indexing.
34+
- ``brute_force.rs``: Deterministic baseline search.
35+
- ``math/``: **[DIR]** Vector Math.
36+
- ``l2.rs``, ``dot.rs``: Distance calculations.
37+
- ``quant/``: **[DIR]** Quantization (Placeholder).
38+
- ``snapshot/``: **[DIR]** Snapshot Serialization.
39+
- ``encode.rs``, ``decode.rs``, ``hash.rs``: Deterministic save/load.
40+
- ``state/``: **[DIR]** State Management.
41+
- ``kernel.rs``: ``KernelState`` struct (The Truth).
42+
- ``storage/``: **[DIR]** Vector Storage.
43+
- ``record.rs``: Data storage.
44+
- ``types/``: **[DIR]** Core Types.
45+
- ``vector.rs``, ``id.rs``: Basic data structures.
46+
- ``tests/``: **[DIR]** Kernel Unit Tests.
47+
- ``determinism_tests.rs``, ``multi_arch_determinism.rs``: Critical safety checks.
48+
- ``README.md``: **[FILE]** Project overview.
49+
- ``architecture.md``: **[FILE]** Architecture specs.
50+
- ``all-functions.md``: **[FILE]** Function reference.
51+
- ``build.log``: **[FILE]** Build output log.
52+
- ``Dockerfile``: **[FILE]** Node container definition.
53+
- ``LICENSE``, ``COMMERCIAL_LICENSE.md``: Licensing.
54+
- ``test_replication_e2e.py``: **[TEST]** Top-level system test.
55+
- ``valori_ffi.pyd``: **[FILE]** Compiled extension.
56+
57+
crates/ (Workspace Members)
58+
---------------------------
59+
Auxiliary libraries and legacy wrappers.
3260

3361
- ``crates/`` (**Workspace**)
34-
- ``kernel/``: **[DIR]** **THE HEART**. The pure, `no_std`, deterministic core.
35-
- ``Cargo.toml``: Dependencies for the kernel (minimal).
62+
- ``kernel/``: **[DIR]** **LEGACY / WRAPPER**. Thin wrapper around the root kernel or legacy location.
3663
- ``src/``:
37-
- ``lib.rs``: Kernel library entry point. Re-exports core modules.
38-
- ``error.rs``: Defines ``KernelError`` types (CapacityExceeded, etc.).
39-
- ``event.rs``: Defines ``KernelEvent`` enum for Event Sourcing (InsertRecord, CreateNode, etc.).
40-
- ``proof.rs``: Cryptographic proof generation logic (State Hashing).
41-
- ``verify.rs``: logic to verify proof signatures/hashes.
42-
- ``replay.rs``: Traits/Logic for replaying commands from logs.
43-
- ``replay_events.rs``: Logic for replaying *Events* (Phase 23+).
44-
- ``config.rs``: Kernel-level configuration constants/structs.
45-
- ``fxp/``: **[DIR]** Fixed-Point Arithmetic (Q16.16)
46-
- ``mod.rs``: Module definition.
47-
- ``qformat.rs``: The ``FxpScalar`` type definition (i32 wrapper).
48-
- ``ops.rs``: Deterministic implementation of Add, Sub, Mul, Div, Sqrt.
49-
- ``graph/``: **[DIR]** Knowledge Graph Components
50-
- ``mod.rs``: Module exposure.
51-
- ``node.rs``: ``Node`` struct definition (ID, Kind, pointers).
52-
- ``edge.rs``: ``Edge`` struct definition (From, To, Kind).
53-
- ``pool.rs``: Static memory pool implementation for Nodes/Edges.
54-
- ``adjacency.rs``: Adjacency list logic for graph traversal.
55-
- ``index/``: **[DIR]** Vector Indexing
56-
- ``mod.rs``: Indexing traits.
57-
- ``brute_force.rs``: Baseline sequential scan search (Deterministic reference).
58-
- ``math/``: **[DIR]** Vector Math
59-
- ``mod.rs``: Math traits.
60-
- ``l2.rs``: Euclidean distance calculation (using FXP).
61-
- ``dot.rs``: Dot product calculation.
62-
- ``quant/``: **[DIR]** Quantization (Future)
63-
- ``mod.rs``: Traits for vector quantization.
64-
- ``snapshot/``: **[DIR]** State Serialization
65-
- ``mod.rs``: Snapshot traits.
66-
- ``encode.rs``: Deterministic serialization of KernelState.
67-
- ``decode.rs``: Deserialization logic.
68-
- ``hash.rs``: Computing the cryptographic hash of the state.
69-
- ``blake3.rs``: Wrapper around BLAKE3 hasher.
70-
- ``state/``: **[DIR]** State Machine
71-
- ``mod.rs``: State module.
72-
- ``kernel.rs``: **MAIN STRUCT** ``KernelState``. Holds storage, graph, and index.
73-
- ``command.rs``: ``Command`` enum for Legacy WAL operations.
74-
- ``storage/``: **[DIR]** Vector Storage
75-
- ``mod.rs``: Storage traits.
76-
- ``record.rs``: ``Record`` struct (ID + Vector data).
77-
- ``pool.rs``: Static memory pool for Records.
78-
- ``types/``: **[DIR]** Core Types
79-
- ``mod.rs``: Type exports.
80-
- ``vector.rs``: Generic ``FxpVector`` struct.
81-
- ``scalar.rs``: Scalar type aliases.
82-
- ``id.rs``: Strongly typed IDs (RecordId, NodeId, EdgeId).
83-
- ``enums.rs``: Enumerations (NodeKind, EdgeKind).
84-
- ``tests/``: **[DIR]** **[TEST]** Kernel Unit Tests
85-
- ``mod.rs``: Test module setup.
86-
- ``determinism_tests.rs``: Tests verifying cross-arch output stability.
87-
- ``fxp_tests.rs``: Tests for fixed-point math precision/overflow.
88-
- ``graph_tests.rs``: Tests for graph operations (add node/edge).
89-
- ``index_tests.rs``: Tests for search correctness.
90-
- ``math_tests.rs``: Tests for distance functions.
91-
- ``proof_tests.rs``: Tests for state hashing.
92-
- ``quant_tests.rs``: Tests for quantization.
93-
- ``snapshot_tests.rs``: Tests for save/restore roundtrips.
94-
- ``state_tests.rs``: Tests for basic kernel state operations.
95-
- ``storage_tests.rs``: Tests for record pool management.
96-
- ``e2e_tests.rs``: Internal end-to-end flows.
97-
98-
- ``persistence/``: **[DIR]** Persistence Abstractions
99-
- ``Cargo.toml``: Dependencies.
64+
- ``lib.rs``: Re-exports.
65+
- ``kernel.rs``: Wrapper struct.
66+
- ``hnsw.rs``: HNSW implementation (moved from core).
67+
- ``persistence/``: **[DIR]** Persistence Layer
10068
- ``src/``:
101-
- ``lib.rs``: Library entry.
102-
- ``error.rs``: Persistence-specific errors.
103-
- ``fixtures.rs``: Helpers for creating test data (WALs, Snapshots).
104-
- ``idx.rs``: Logic for handling index files.
105-
- ``snapshot.rs``: Traits for reading/writing snapshots.
106-
- ``wal.rs``: Traits for Write-Ahead Log interaction.
107-
69+
- ``wal.rs``, ``snapshot.rs``: Disk I/O traits and implementations.
10870
- ``cli/``: **[DIR]** Command Line Interface
109-
- ``Cargo.toml``: Dependencies (Clap, etc.).
110-
- ``tests/``: Integration tests for CLI arguments.
111-
- ``src/``:
112-
- ``main.rs``: CLI entry point.
113-
- ``commands/``: (If present) Subcommand implementations.
114-
115-
- ``demo-generator/``: **[DIR]** Data Generator
116-
- ``Cargo.toml``: Dependencies.
117-
- ``src/``:
118-
- ``main.rs``: Executable to generate synthetic vector/graph data for demos.
71+
- ``src/main.rs``: CLI entry point.
72+
- ``demo-generator/``: **[DIR]** Demo Data Generator
73+
- ``src/main.rs``: Synthetic data tool.
11974

12075
node/ (Server Implementation)
12176
-----------------------------
@@ -278,20 +233,7 @@ Standalone verification utilities.
278233
- ``src/``
279234
- ``main.rs``: CLI tool to verify database integrity offline.
280235

281-
src/ (Root Source?)
282-
-------------------
283-
*Note: This appears to be a separate crate source directory at the root level, likely for the `src` member defined in root `Cargo.toml` if applicable. It mirrors `crates/kernel/src` structure. It serves as the primary compiled source for the `valori` crate if defined in root.*
284236

285-
- ``src/``
286-
- ``lib.rs``: Entry point.
287-
- ``config.rs``: Configuration.
288-
- ``error.rs``: Error definitions.
289-
- ``event.rs``: Event definitions.
290-
- ``proof.rs``: Proof logic.
291-
- ``verify.rs``: Verify logic.
292-
- ``replay.rs``, ``replay_events.rs``: Replay logic.
293-
- ``fxp/``, ``graph/``, ``index/``, ``math/``, ``quant/``, ``snapshot/``, ``state/``, ``storage/``, ``types/``: **[DIR]** Mirrors of Kernel modules.
294-
- ``tests/``: **[DIR]** Unit tests.
295237

296238
demo_db/
297239
--------

0 commit comments

Comments
 (0)