Skip to content

fix(supermemory): honor auto capture across lifecycle flushes - #78656

Open
CryptoKylan wants to merge 1 commit into
NousResearch:mainfrom
CryptoKylan:fix/supermemory-auto-capture-lifecycle-reviewed
Open

fix(supermemory): honor auto capture across lifecycle flushes#78656
CryptoKylan wants to merge 1 commit into
NousResearch:mainfrom
CryptoKylan:fix/supermemory-auto-capture-lifecycle-reviewed

Conversation

@CryptoKylan

Copy link
Copy Markdown

Summary

Fixes an auto_capture: false policy leak in the bundled Supermemory provider.

sync_turn() already obeyed this setting, but three independent automatic lifecycle flushes bypassed it:

  • gateway transcript ingestion through on_session_end() (including compaction/session boundaries),
  • buffered-turn flushing through on_session_switch(), and
  • the process-termination fallback flush.

All three now honor the same policy. Explicit user-intent writes through supermemory_store and on_memory_write() remain available when automatic capture is disabled.

Follow-up to #21690 / #21692. Replaces #78617, which became stuck on a stale fork head after a reviewed amendment.

Independent review

The final diff was independently reviewed by provenance-verified claude-opus-5 (high confidence; pass_with_watchlist, no blocking defects). One state bookkeeping issue found during the first review was repaired with a failing regression before the second review.

Validation

python -m pytest tests/plugins/memory/test_supermemory_autocapture_guard.py tests/plugins/memory/test_supermemory_provider.py -o 'addopts=' -q\n34 passed\n\nruff check plugins/memory/supermemory/__init__.py tests/plugins/memory/test_supermemory_autocapture_guard.py\nAll checks passed!\n\npython -m py_compile plugins/memory/supermemory/__init__.py\ngit diff --check\n```

@CryptoKylan
CryptoKylan marked this pull request as ready for review August 4, 2026 16:52
@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers P3 Low — cosmetic, nice to have labels Aug 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

@Dhravya @MaheshtheDev Tagging you on this Supermemory provider item as the soft maintainers.

@CryptoKylan
CryptoKylan force-pushed the fix/supermemory-auto-capture-lifecycle-reviewed branch from fbe45db to 8aebbb7 Compare August 11, 2026 01:27
@CryptoKylan

Copy link
Copy Markdown
Author

Refreshed onto current main (33f8e96a72) with authorship and the single-commit shape preserved.

Current validation:

  • full memory-plugin suite: 293 passed
  • Ruff: passed
  • py_compile: passed
  • git diff --check: passed

GitHub now reports the refreshed head 8aebbb7ce7 as mergeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants