MemoPop Connector API, Phase 6: History and Snapshots
Every saved artifact becomes a jj change the client never sees, and one save backs the firm's whole workspace up to its bucket.
- Path
- plans/MemoPop-Connector-API-Phase-6-History-and-Snapshots.md
- Authors
- Michael Staton
- Augmented with
- Claude Code on Claude Opus 5.5 (1M context)
- Tags
- Plan · MemoPop · Claude-Connector · Jujutsu · TDD
MemoPop Connector API, Phase 6: History and Snapshots
Read the spec (§Storage, §The tools → save_snapshot, §Defaults chosen for
v1, §Tests → History) and the decision
[[jj-Versions-Text-and-Saves-Snapshot-to-the-Bucket]] (in
memopop-ai/context-v/decisions/). Phase 1 is merged into development and
left a no-op History hook in src/connector/workspace.py. Runs in parallel
with phases 4 and 5.
Your files
src/connector/history.py, src/connector/tools/save_snapshot.py,
tests/connector/test_history*.py, test_snapshot*.py. Edit
workspace.py only to wire the hook.
Steps
- Failing tests for the five owned IDs. Tests need the
jjbinary; skip with a clear reason when it’s absent locally, but CI installs it, so in CI they must run. - One jj repository per firm, initialised on first write
(
jj git initin the firm root, with a.gitignoreexcluding any binary material paths). After each saved artifact, record exactly one change with a description naming step, deal, and section; identical content records nothing. Run jj as a subprocess with a fixed author (MemoPop <noreply@didi.sh>) andJJ_CONFIGpointing at a file you write, so the server user’s config never leaks in. save_snapshot: a.tar.gzof the firm’s workspace (including.jj) written to the firm’s bucket undersnapshots/<timestamp>-<label>.tar.gz, with change counts against the previous snapshot from a small manifest kept beside it. Return the fields in the spec.- Isolation (
CONN-HIST-04): two firms, separate repositories and bucket locations, and no path in either reachable from the other’s workspace. - Docs for
save_snapshotcomplete, with executing examples.
Rules and done
As in Phase 1. Done when scripts/check.sh passes, the owned IDs are GREEN,
everything previously green still is, a changelog entry is written, and the
branch is pushed.