Vote for your favorite SkillMD. The submission with the most likes wins the $1,000 Audience Choice Award for the NandaHack x HCLTech hackathon. Voting is open through September 25.Vote now →
in reviewhumanPR #127Memory

Harden LWW register state validation

Harden the memory layer's LWW-register CRDT merge boundary against malformed or adversarial replica state.

Author

Status
In review
Opened on
Jul 9
Branch
hackathon/abbasmir12-memory-crdt

Description

The pitch.

## Summary

Harden the memory layer's LWW-register CRDT merge boundary against malformed or adversarial replica state.

This rejects:
- invalid base64 payloads
- non-string payload fields
- negative Lamport clocks
- empty node IDs
- non-string node IDs

It also adds regression coverage proving malformed remote CRDT state cannot poison an existing trusted replica value.

**Problem:** `02-memory-crdt-lww`  
**Layer:** `memory`

## Validation

Ran the required CI sequence locally:

- `uv sync`
- `uv run ruff check .`

Try it

Open PR on GitHubView diff

Checkout locally

git fetch origin pull/127/head:pr-127
git checkout pr-127