Skip to content

Store Memory history in Git - #6

Merged
hamzamerzic merged 3 commits into
mobius-os:mainfrom
hamzamerzic:fix/git-backed-memory-history
Jul 16, 2026
Merged

Store Memory history in Git#6
hamzamerzic merged 3 commits into
mobius-os:mainfrom
hamzamerzic:fix/git-backed-memory-history

Conversation

@hamzamerzic

@hamzamerzic hamzamerzic commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace full-copy Memory generations with one Git repository and an atomic commit pointer
  • import every safe legacy generation into Git while retaining the old directory as an explicit recovery source
  • recognize app ownership only through managed_by: memory frontmatter; content hashes never authorize overwrite or deletion
  • support confined text-only Claude and Codex analysts in the configured Background agents order
  • reject topology changes that demote surviving specifically filed nodes into the generated Unfiled fallback
  • record running, published, degraded, and failed outcomes with run id, UID, provider/model, commit, and topology provenance
  • pin graph, note, and retrieval reads to one immutable commit while keeping offline caching

Safety model

Scheduled maintenance and manual rollback share one non-blocking operation lock. Each publication fsyncs and commits a validated complete tree before atomically advancing .ready. A crash, rejected proposal, unavailable provider, or topology regression leaves the previous pointer readable, and the next run resets the worktree to that published commit.

Claude receives the prompt over stdin with an explicit empty tool set. Codex runs ephemerally in an empty directory, read-only sandbox, with user instructions ignored and shell, app, browser, computer, delegation, image, and goal features disabled. Neither child receives platform or app credentials.

Testing

  • npm test — 36 JavaScript tests, offline harness, and 29 Python tests passed
  • provider isolation, degraded-run visibility, topology regression, explicit ownership, migration recovery, rollback, and crash consistency are covered
  • git diff --check — passed

Dependency

Requires mobius-os/mobius#73 for the confined /api/storage/shared-git/{repo} read endpoint.

@hamzamerzic
hamzamerzic merged commit 1c771a4 into mobius-os:main Jul 16, 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.

1 participant