From 17200763bf501b4c41239274d90f634f98f9fe8c Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 19 Feb 2026 23:36:46 -0600 Subject: [PATCH] store: Cognitive memory auto-pushes to Gitea on every store and relate --- ...-to-gitea-on-every-store-and-rel-ead5ba.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 graph/configurations/cognitive-memory-auto-pushes-to-gitea-on-every-store-and-rel-ead5ba.md diff --git a/graph/configurations/cognitive-memory-auto-pushes-to-gitea-on-every-store-and-rel-ead5ba.md b/graph/configurations/cognitive-memory-auto-pushes-to-gitea-on-every-store-and-rel-ead5ba.md new file mode 100644 index 00000000000..999d8a3b564 --- /dev/null +++ b/graph/configurations/cognitive-memory-auto-pushes-to-gitea-on-every-store-and-rel-ead5ba.md @@ -0,0 +1,21 @@ +--- +id: ead5bac2-a4db-49dd-87ff-b577eacde170 +type: configuration +title: "Cognitive memory auto-pushes to Gitea on every store and relate" +tags: [cognitive-memory, gitea, automation, mcp] +importance: 0.7 +confidence: 0.8 +created: "2026-02-20T05:36:46.569737+00:00" +updated: "2026-02-20T05:36:46.569737+00:00" +--- + +## Setup +Added fire-and-forget git sync to the MCP server's `memory_store` and `memory_relate` handlers. Every time a memory is stored or an edge is created via MCP, `memory-git-sync.sh` runs asynchronously in the background. + +## Components +- **`scripts/memory-git-sync.sh`** — Stages all changes, commits with a summary message (added/modified/deleted counts + edge count), pushes to origin/main. No-ops if nothing changed. +- **`mcp_server.py`** — `_trigger_git_sync()` helper fires the script via `subprocess.Popen` with `start_new_session=True` (non-blocking). +- **Daily timer** — Kept as fallback for CLI-based stores that bypass MCP. + +## Pre-commit hook fix +Edge files in `graph/edges/` were blocked by the frontmatter validation hook which required a `title` field. Updated the hook to validate edges against their own schema: `id`, `type`, `from_id`, `to_id`.