Skip to content

Release v2.7.0 with memory defenses#152

Merged
rolandpg merged 1 commit into
masterfrom
release/v2.7.0-memsad-defenses
May 26, 2026
Merged

Release v2.7.0 with memory defenses#152
rolandpg merged 1 commit into
masterfrom
release/v2.7.0-memsad-defenses

Conversation

@rolandpg

Copy link
Copy Markdown
Collaborator

Summary

  • Release ZettelForge 2.7.0
  • Add write-time MemSAD memory defenses with audit/block/quarantine modes
  • Document governance.memory_defense configuration and RFC-017 threat model
  • Preserve OSINT-enabled baseline and CrewAI integration behavior while adding telemetry actor/caller compatibility

Validation

  • ruff check src/zettelforge/
  • ruff format --check src/zettelforge/ tests/test_memory_defense.py tests/test_llm_client.py tests/test_llm_providers.py tests/test_performance.py
  • pytest -q tests/test_memory_defense.py tests/test_telemetry_collector.py tests/test_telemetry_integration.py tests/test_llm_client.py tests/test_llm_providers.py tests/test_performance.py --tb=short --disable-warnings -> 99 passed, 9 skipped
  • pytest -q --tb=short --disable-warnings -> 742 passed, 13 skipped
  • python3 -m build --outdir <tmp> and python3 -m twine check <tmp>/*

Copilot AI review requested due to automatic review settings May 26, 2026 04:15
@rolandpg rolandpg merged commit 70eeee1 into master May 26, 2026
13 of 14 checks passed
@rolandpg rolandpg deleted the release/v2.7.0-memsad-defenses branch May 26, 2026 04:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c5d7d1050

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cfg = self._config or get_config().governance.memory_defense
path = Path(os.path.expanduser(cfg.quarantine_path)) if cfg.quarantine_path else None
if path is None:
path = get_default_data_dir() / "quarantine" / "memory_anomalies.jsonl"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use active storage dir for quarantine default path

When governance.memory_defense.quarantine_path is unset, quarantine records are written to get_default_data_dir() (AMEM_DATA_DIR/~/.amem) instead of the storage location backing the current MemoryManager instance. In deployments/tests that use a custom data directory (for example via MemoryManager(jsonl_path=...)), blocked notes are quarantined outside the active dataset, which breaks expected artifact locality and can leak data into an unintended global path.

Useful? React with 👍 / 👎.


_p = time.perf_counter()
try:
reference_notes = self.store.get_notes_by_domain(domain)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid full-domain note scan for each remember call

The new defense path loads every note in the domain on each write (get_notes_by_domain) before scoring, even though the gate later trims to max_reference_notes. On large domains this turns remember() into an O(N) read/materialization per write, causing avoidable ingest latency spikes and throughput collapse despite a small configured reference limit.

Useful? React with 👍 / 👎.

@rolandpg rolandpg removed the request for review from Copilot May 26, 2026 04:39
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