Skip to content

fix(memory): preserve curated profile during core sync#262

Merged
lidge-jun merged 1 commit into
lidge-jun:mainfrom
GSL-R:fix/preserve-profile-core-sync
Jul 3, 2026
Merged

fix(memory): preserve curated profile during core sync#262
lidge-jun merged 1 commit into
lidge-jun:mainfrom
GSL-R:fix/preserve-profile-core-sync

Conversation

@GSL-R

@GSL-R GSL-R commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve existing structured profile content when MEMORY.md changes
  • isolate legacy core-memory synchronization in a replaceable managed block
  • keep source_hash and updated_at freshness metadata current
  • add regression tests for first sync and repeated sync

Problem

syncCoreProfile() rebuilt memory/structured/profile.md entirely from the small legacy memory/MEMORY.md file whenever its hash changed. Any independently curated profile sections were silently deleted. In a long-running instance this reduced a 21 KB user profile to a minimal 663-byte file after a memory flush.

Verification

  • npx tsx --test tests/unit/memory-core-profile-sync.test.ts
  • npx tsc --noEmit
  • git diff upstream/main...HEAD --check

All passed.

@GSL-R
GSL-R marked this pull request as ready for review June 27, 2026 16:52
@lidge-jun
lidge-jun merged commit a96a191 into lidge-jun:main Jul 3, 2026
1 check passed
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.

2 participants