Skip to content

feat(memorize): delete input log entries with memories - #617

Merged
gloryfromca merged 1 commit into
EverMind-AI:mainfrom
chuiwenwei:feat/input-log-delete
Nov 23, 2026
Merged

gloryfromca merged 1 commit into
EverMind-AI:mainfrom
chuiwenwei:feat/input-log-delete

Conversation

@chuiwenwei

Copy link
Copy Markdown
Contributor

Summary

The second half of #537, now that #611 has landed.

  • /memory/delete with session_id removes that session's lines from every
    daily JSONL file;
  • purge (root/app/project) removes the covered .input_log/ directories;
  • memorize.input_log.enabled flips to true by default;
  • reading the log through the API stays out of scope.

A session deletion reports success even if log cleanup fails; purge keeps
its normal retry semantics because its log removal is part of the step.

Refs #537.

Area

  • Architecture method
  • Benchmark
  • Use case
  • Documentation
  • Developer experience
  • CI, build, or release

Verification

pytest tests/unit/test_service/test_memory/test_input_log.py \
       tests/unit/test_service/test_purge    70 passed
make lint                                  passed

@chuiwenwei
chuiwenwei force-pushed the feat/input-log-delete branch from ba94423 to 4782613 Compare November 20, 2026 09:44
@chuiwenwei

Copy link
Copy Markdown
Contributor Author

Updated: if input-log cleanup fails after the memory deletion, the request
now returns DeletionIncompleteError (500) so a retry finishes it, instead
of reporting success while the raw log remains. 70 targeted tests and lint
pass.

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocking: make session-log cleanup cancellation-safe and stop suppressing purge cleanup failures.

I reviewed the repository rules (CLAUDE.md and all path-scoped rules), the complete origin/main...HEAD diff, surrounding delete/add/purge callers, retry and cancellation behavior, the input-log history, backward compatibility/default changes, test changes, and the service/bootstrap architecture boundaries. I found two concrete privacy-deletion failures inline.

Verification: all lint, formatting, import-architecture, repository-policy, datetime, singleton, and OpenAPI gates pass. The 81 focused input-log/session-delete/purge tests pass. A broader unit run was interrupted after 5m29s at 1,248 passed / 4 skipped / 10 failed; all 10 failures were the environment's missing declared NLTK corpora, and after installing them with the repository's documented downloader command, that complete 13-test tokenizer module passed. No tests were weakened or skipped to obtain these results.

Comment thread src/everos/service/memory/__init__.py Resolved
Comment thread src/everos/service/memory/_input_log.py Resolved
The second half of EverMind-AI#537. A /memory/delete that names a session removes
that session's lines from every daily file in the scope; a purge removes
the .input_log directories covered by its root/app/project scope. Both
are best-effort for deletion ordering: a session delete reports success
even if log cleanup fails, while purge retries its step.

The log is now enabled by default, per the issue plan. Reading it through
the API remains out of scope.

Refs EverMind-AI#537.
@chuiwenwei
chuiwenwei force-pushed the feat/input-log-delete branch from 4782613 to 9b4ec0e Compare November 20, 2026 10:00
@chuiwenwei

Copy link
Copy Markdown
Contributor Author

Fixed both in 9b4ec0e:

  • Input-log cleanup now runs inside the supervised deletion coroutine, so
    cancelling the caller no longer skips it. Added a test that cancels while
    the deletion is in flight and asserts delete_session still runs.
  • purge_scope no longer uses ignore_errors=True. Only FileNotFoundError is
    success; other removal failures escape so the purge runner retries the
    step. Added a PermissionError regression test.

72 targeted tests and lint pass.

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No blockers; this can merge as far as I am concerned.

The new revision fixes both prior blockers: input-log cleanup is now part of the cancellation-safe supervised deletion, and purge cleanup failures propagate into the existing retry classification. I replied to and resolved both threads.

I reviewed the full origin/main...HEAD diff and the delta from 4782613d5b20, repository rules, delete/add/purge callers and lifecycle behavior, relevant history, default/backward-compatibility impact, test changes for weakening/skips, and service/bootstrap architecture boundaries. I found no new issue worth raising.

Verification: 87 focused unit/integration tests passed, including the new cancellation and purge-failure regressions. Ruff check/format, all 14 import-architecture contracts, repository policy gates, datetime and singleton checks, and OpenAPI drift check all passed.

@gloryfromca
gloryfromca merged commit 9f2d029 into EverMind-AI:main Nov 23, 2026
11 checks 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.

2 participants