Conversation
Issue #12 - Rust WAL NDJSON migration: crates/chronomemory/src/wal.rs: remove binary magic header + bincode. Each WAL entry is now one NDJSON line. Hash = SHA256 of sorted-key JSON matching Python: {seq,ts,op,record_id,record,prev_hash,recursion_depth}. WalEntry.record field (was payload) aligns with Python WalEvent.record. crates/chronomemory/src/replay.rs: bincode::deserialize -> serde_json. crates/chronomemory/src/lib.rs: bincode::serialize -> serde_json::to_value. Cargo.toml: remove bincode, add hex. TEST-ESDB-002 (replay test) now enabled - was previously #[ignore]. Result: 20/20 Rust tests pass, 0 ignored. Issue #13 - PyO3 Python bindings: crates/chronomemory-py/: new cdylib crate _chronomemory_rust. Cargo.toml (workspace): add chronomemory-py member. Exposes RustRecord and RustChronoStore wrapping the Rust Esdb engine. __init__.py: try-import _chronomemory_rust, fall back silently to Python. RUST_BACKEND bool exported to let callers detect which backend is active. pyproject.toml: [rust] optional extras, [tool.maturin] config. Build: maturin develop --manifest-path crates/chronomemory-py/Cargo.toml All checks: Python: 192/192 tests, ruff clean, mypy clean. Rust: 20/20 tests (0 ignored), PyO3 crate builds clean. Co-Authored-By: Oz <oz-agent@warp.dev>
feat(phase3): NDJSON WAL migration + PyO3 Python bindings
| RustChronoStore = _rust.RustChronoStore | ||
| RustRecord = _rust.RustRecord | ||
| RUST_BACKEND = True | ||
| except ImportError: |
… fmt - pyo3 0.22.6 had buffer overflow risk in PyString::from_object (RUSTSEC-2025-0020). Upgraded to 0.24.2 which patches this. - cargo fmt --all applied to wal.rs and chronomemory-py/src/lib.rs to pass CI rust lint (fmt) check. - cargo audit: 0 vulnerabilities. Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs develop into main with Phase 3 changes (PRs #12, #13 resolved):
Co-Authored-By: Oz oz-agent@warp.dev