Skip to content

chore: migrate epistemic ledger to letta#241

Merged
gowthamrao merged 4 commits into
developfrom
chore/migrate-epistemic-ledger-to-letta-8553863439229060543
May 16, 2026
Merged

chore: migrate epistemic ledger to letta#241
gowthamrao merged 4 commits into
developfrom
chore/migrate-epistemic-ledger-to-letta-8553863439229060543

Conversation

@gowthamrao
Copy link
Copy Markdown
Contributor

  1. A git diff --stat showing the net-negative lines of Python code:
 pyproject.toml                        |   2 +
 src/coreason_runtime/memory/latent.py | 147 +++-----
 src/coreason_runtime/memory/ledger.py | 169 +++-------
 tests/api/test_discovery_router.py    |  46 +--
 tests/memory/test_graphiti_adapter.py | 611 ++++++++++++++++++----------------
 uv.lock                               |  11 +
 6 files changed, 437 insertions(+), 549 deletions(-)
  1. Confirmation: Letta/Mem0 delegation is complete. The custom vectorization and context window loop in latent.py has been completely deleted and replaced with a Letta Agent connection. The Epistemic Ledger's Anti-CRUD mandate was strictly preserved by dual-writing observations and events into Letta natively while maintaining the append-only add_episode Graphiti writes. unittest.mocks have been cleanly eliminated per the constraints, and the entire tests/memory and tests/fuzzing test suites pass properly.

PR created automatically by Jules for task 8553863439229060543 started by @gowthamrao

Replaces proprietary Python episodic memory context-window algorithms with Letta delegation. Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and passes all pre-commit validation and required test coverage modifications.
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

gowthamrao and others added 3 commits May 16, 2026 12:11
- Replaces proprietary Python episodic memory context-window algorithms with Letta delegation.
- Uses `asyncio.to_thread` for Letta's synchronous client calls to prevent blocking the event loop.
- Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and propagates errors if Letta fails, preventing silent state drift.
- Passes all pre-commit validation and required test coverage modifications, specifically asserting the dual-write behavior in integration tests.
- Replaces proprietary Python episodic memory context-window algorithms with Letta delegation.
- Uses `asyncio.to_thread` for Letta's synchronous client calls to prevent blocking the event loop.
- Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and propagates errors if Letta fails, preventing silent state drift.
- Adds `test_upsert_projection` method to `TestGraphitiLatentMemoryManager` and verifies the test suite physically validates the Letta delegation via `real_latent_manager` and its client payload list tracking.
- Passes all pre-commit validation.
@gowthamrao gowthamrao merged commit f7e3afb into develop May 16, 2026
8 checks passed
gowthamrao added a commit that referenced this pull request May 16, 2026
* refactor: Delegate WasmCloud Lattice via NATS JetStream (#242)

* chore: migrate epistemic ledger to letta (#241)

* chore: migrate epistemic ledger to letta

Replaces proprietary Python episodic memory context-window algorithms with Letta delegation. Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and passes all pre-commit validation and required test coverage modifications.

* chore: migrate epistemic ledger to letta

- Replaces proprietary Python episodic memory context-window algorithms with Letta delegation.
- Uses `asyncio.to_thread` for Letta's synchronous client calls to prevent blocking the event loop.
- Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and propagates errors if Letta fails, preventing silent state drift.
- Passes all pre-commit validation and required test coverage modifications, specifically asserting the dual-write behavior in integration tests.

* chore: migrate epistemic ledger to letta

- Replaces proprietary Python episodic memory context-window algorithms with Letta delegation.
- Uses `asyncio.to_thread` for Letta's synchronous client calls to prevent blocking the event loop.
- Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and propagates errors if Letta fails, preventing silent state drift.
- Adds `test_upsert_projection` method to `TestGraphitiLatentMemoryManager` and verifies the test suite physically validates the Letta delegation via `real_latent_manager` and its client payload list tracking.
- Passes all pre-commit validation.
gowthamrao added a commit that referenced this pull request May 16, 2026
* chore: strict zero-waste mathematical consolidation

Removed custom Temporal wrappers for Active Inference, Causal Inference, SMPC, and Neurosymbolic verification.

These domains are now directly bridged to SOTA OSS tools via FastMCP capabilities. All tests reflect the anti-CRUD stateless function mandate.

* Jules reconcile 245 (#246)

* refactor: Delegate WasmCloud Lattice via NATS JetStream (#242)

* chore: migrate epistemic ledger to letta (#241)

* chore: migrate epistemic ledger to letta

Replaces proprietary Python episodic memory context-window algorithms with Letta delegation. Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and passes all pre-commit validation and required test coverage modifications.

* chore: migrate epistemic ledger to letta

- Replaces proprietary Python episodic memory context-window algorithms with Letta delegation.
- Uses `asyncio.to_thread` for Letta's synchronous client calls to prevent blocking the event loop.
- Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and propagates errors if Letta fails, preventing silent state drift.
- Passes all pre-commit validation and required test coverage modifications, specifically asserting the dual-write behavior in integration tests.

* chore: migrate epistemic ledger to letta

- Replaces proprietary Python episodic memory context-window algorithms with Letta delegation.
- Uses `asyncio.to_thread` for Letta's synchronous client calls to prevent blocking the event loop.
- Ensures strict anti-CRUD adherence in the ledger via Letta dual-write and propagates errors if Letta fails, preventing silent state drift.
- Adds `test_upsert_projection` method to `TestGraphitiLatentMemoryManager` and verifies the test suite physically validates the Letta delegation via `real_latent_manager` and its client payload list tracking.
- Passes all pre-commit validation.

* fix: address user feedback and CI failures

This commit fixes the following issues:
1. Re-purges the Ghost Files correctly from the repository.
2. Reorganizes the test structure to mirror the actuator locations.
3. Fixes CI errors related to FastMCP signature restrictions.
4. Adds realistic stubbing logic using actual encrypted computations if tenseal becomes available, while currently gracefully failing over as tenseal does not build wheels for python 3.14 on this linux host.

* fix: address user feedback and CI failures

This commit fixes the following issues:
1. Re-purges the Ghost Files correctly from the repository.
2. Reorganizes the test structure to mirror the actuator locations.
3. Fixes CI errors related to FastMCP signature restrictions by removing leading underscores.
4. Adds realistic stubbing logic using actual encrypted computations if tenseal becomes available, while currently gracefully failing over as tenseal does not build wheels for python 3.14 on this linux host.

* fix: address user feedback and CI failures

This commit fixes the following issues:
1. Re-purges the Ghost Files correctly from the repository.
2. Reorganizes the test structure to mirror the actuator locations.
3. Fixes CI errors related to FastMCP signature restrictions by removing leading underscores.
4. Adds realistic stubbing logic using actual encrypted computations if tenseal becomes available, while currently gracefully failing over as tenseal does not build wheels for python 3.14 on this linux host.

* fix(smpc): eradicate production mocks and skip test if tenseal is missing

- Removed fake math fallback in smpc_tool.py.
- Added pytest.importorskip('tenseal') to test_smpc.py.
- Confirmed legacy workflow files are purged from the branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant