Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ jobs:
run: uv run python -c "import sqlite3, sqlite_vec; db = sqlite3.connect(':memory:'); db.enable_load_extension(True); sqlite_vec.load(db); db.close()"
# Temporary stores and copies of release-written ones, real
# writer/watcher/locks; no provider calls.
- run: SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q tests/test_memory_backend_memtomem_integration.py tests/test_memory_gc_process.py tests/test_frozen_memory_real.py
- run: SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q tests/test_memory_backend_memtomem_integration.py tests/test_memory_gc_process.py tests/test_frozen_memory_real.py tests/test_frozen_memory_schema1_real.py
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ uv run syncmill status # check the selected memory backend
uv run syncmill serve # read-only MCP gateway over `shared` (stdio; --http/--host/--port)
uv run syncmill memory migration plan --from memtomem --to mem0 # source-retaining snapshot; apply/verify/rollback by id
SYNCMILL_TEST_MEMORY_MIGRATION_REAL=1 uv run pytest -q tests/test_memory_migration_integration.py # required before changing migration adapters
SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q tests/test_memory_backend_memtomem_integration.py tests/test_frozen_memory_real.py # required before changing MemtomemBackend's replicated add flow or the memtomem pin (the second file reads release-written stores)
SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q tests/test_memory_backend_memtomem_integration.py tests/test_frozen_memory_real.py tests/test_frozen_memory_schema1_real.py # required before changing MemtomemBackend's replicated add flow or the memtomem pin (the last two read release-written stores)
SYNCMILL_TEST_LANGGRAPH_REAL=1 uv run pytest -q tests/test_memory_backend_langgraph_integration.py # required before changing LangGraph SDK pins/API calls
uv add <pkg> # add a dependency (edits pyproject.toml + uv.lock)
uv sync --group dev # install dev deps (pytest)
Expand Down Expand Up @@ -184,7 +184,7 @@ Rules that must hold:
- **Write-path invariants — do not change without the real smoke.** Each write invalidates the search result cache; writes go to namespace-suffixed day files `{date}.{ns}.md`; each entry gets an explicit unique heading (`_entry_title`); payloads open with a **bold** label, never `## ` (heading-led content skips the unique title).
- **Locking — do not change without the real smoke.** A write takes the namespace lock (`_namespace_lock_path`) before selecting its day file, then holds the resolved file's L2 sidecar (`memory_lock_path`) across mix-check → append → index; `purge_namespace` holds the namespace lock plus every owned source's sidecar, removes sources before rows, and raises when a purge cannot be proven complete. `add_and_share` (#117) holds ONE span over both appends: both namespace locks, then both day files' sidecars, from before the clock is read until the last copy is indexed; its copies share one `index_file` and are matched to their source chunks by `shared-from=`, never by index order. **Ordering rule** (on `_namespace_lock_path`; tested): every namespace lock before any sidecar, never a namespace lock while holding a sidecar, and within each level ascending `str(lock_path)`, deduplicated (`_namespace_lock_order`; sidecars by `memory_lock_path`). An unlocked append lets the watcher index the file first and strand the chunk in the wrong namespace.
- **Protected targets.** An unattended append refuses a symlinked day file, a non-`user` tier, a read-only source and an excluded source. `purge_namespace` refuses, before deleting anything, a symlinked source, one in a `read_only_memory_dirs` root, and one in a `project_shared` tier (a `project_local` source may be purged).
- **Pins.** `memtomem>=0.6.8,<0.7` and `mcp>=2.0.0,<3` move together; bump only with `SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q tests/test_memory_backend_memtomem_integration.py tests/test_frozen_memory_real.py`.
- **Pins.** `memtomem>=0.6.8,<0.7` and `mcp>=2.0.0,<3` move together; bump only with `SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q tests/test_memory_backend_memtomem_integration.py tests/test_frozen_memory_real.py tests/test_frozen_memory_schema1_real.py`.

### Interactive collaboration (human drives one agent, syncmill runs the rest)

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Some changes require an opt-in real smoke before they can be reviewed:
```bash
SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q \
tests/test_memory_backend_memtomem_integration.py \
tests/test_frozen_memory_real.py # the memtomem add flow or pin
tests/test_frozen_memory_real.py \
tests/test_frozen_memory_schema1_real.py # the memtomem add flow or pin
SYNCMILL_TEST_MEMORY_MIGRATION_REAL=1 uv run pytest -q \
tests/test_memory_migration_integration.py # migration adapters
SYNCMILL_TEST_LANGGRAPH_REAL=1 uv run pytest -q \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,8 @@ Opt-in real memory tests use temporary stores and copies of release-written ones
SYNCMILL_TEST_MEMTOMEM_REAL=1 uv run pytest -q \
tests/test_memory_backend_memtomem_integration.py \
tests/test_memory_gc_process.py \
tests/test_frozen_memory_real.py
tests/test_frozen_memory_real.py \
tests/test_frozen_memory_schema1_real.py
```

## Contributing
Expand Down
3 changes: 2 additions & 1 deletion docs/architecture/persisted-contracts.md

Large diffs are not rendered by default.

Loading
Loading