Skip to content

fix(claude-sync): skip only flow-test-sandbox memory, not all $TMPDIR projects - #531

Merged
Data-Wise merged 1 commit into
devfrom
feature/claude-sync-narrow-skip
Sep 23, 2026
Merged

Data-Wise merged 1 commit into
devfrom
feature/claude-sync-narrow-skip

Conversation

@Data-Wise

Copy link
Copy Markdown
Owner

Summary

#530 skipped every ~/.claude/projects/-private-var-folders-* memory folder. That turned out to be too broad. A session whose working folder was $TMPDIR itself produces a project named -private-var-folders-…-T, and those can hold real memory. Two do on this machine, with 5 memory files between them, one edited 2026-09-21. Since #530, their future edits would no longer sync.

  • The chezmoi add filter and the commit-time exclude both now match only *-flow-test-sandbox-*, the mktemp name tests/run-all.sh uses (line 71: mktemp -d "${TMPDIR:-/tmp}/flow-test-sandbox.XXXXXX"). This also covers sandboxes created under /tmp.
  • The code comments explain why the narrower pattern is needed.

Tests

New test_syncs_real_memory_of_tmpdir_rooted_project: a project named -private-var-folders-xn-abc-T must reach the remote. It failed against #530's pattern (9 of 10 passed) and passes now (✓ All tests passed: 10/10). The two earlier tests for skipping sandboxes use …-flow-test-sandbox-… names and still pass.

On the real ~/.claude/projects: 71 memory folders, 11 skipped (all *-flow-test-sandbox-*). The two real folders (-private-var-folders-ks-…-T, -private-var-folders-xn-…-T) are kept. Their current contents are already in dotfiles fc776f6.

Full suite ./tests/run-all.sh: 86 passed, 3 failed. The failures are the same 3 as on #529 and #530 (test-doctor, e2e-em-dispatcher, test-atlas-contract), and they fail on dev without this change too.

🤖 Generated with Claude Code

… projects

#530 skipped every -private-var-folders-* project, but a session whose cwd
was $TMPDIR itself (-private-var-folders-...-T) can hold real memory: two
such projects here have 5 memory files, one edited 2026-09-21. Narrow both
the chezmoi-add filter and the commit-time exclude to *-flow-test-sandbox-*,
the mktemp name run-all.sh uses. Real dirs: 71 total, 11 skipped, both real
TMPDIR projects kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Data-Wise
Data-Wise merged commit 508a625 into dev Sep 23, 2026
3 checks passed
@Data-Wise
Data-Wise deleted the feature/claude-sync-narrow-skip branch September 23, 2026 18:28
Data-Wise added a commit that referenced this pull request Sep 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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