store: Fix: memory repo pre-commit hook blocking edge files missing title field

This commit is contained in:
Cal Corum 2026-02-19 23:39:51 -06:00
parent 7b53b80d37
commit dd06afcc31

View File

@ -0,0 +1,39 @@
---
id: c3f6fbc2-04d0-41ef-87c2-8685d8769ac3
type: fix
title: "Fix: memory repo pre-commit hook blocking edge files missing title field"
tags: [cognitive-memory, git, pre-commit-hook, fix, edge-files]
importance: 0.6
confidence: 0.8
created: "2026-02-20T05:39:51.522395+00:00"
updated: "2026-02-20T05:39:51.522395+00:00"
---
# Pre-commit Hook Fix: Edge Files Have Different Schema
## Problem
The `~/.claude/memory` repo pre-commit hook required `id`, `type`, and `title` fields on all markdown files under `graph/`. Edge files use a different schema with no `title` field:
```yaml
# Edge file schema
id: <uuid>
type: <relation_type>
from_id: <uuid>
to_id: <uuid>
from_title: <string>
to_title: <string>
```
This caused all edge commits to be blocked with a validation error about the missing `title` field.
## Fix
Added a path check in the pre-commit hook:
- Files matching `graph/edges/` validate against edge schema: `(id, type, from_id, to_id)`
- All other files continue to require `(id, type, title)`
## Location
`~/.claude/memory/.git/hooks/pre-commit` (or equivalent hook script)