Skip to content

fix(memory): resolve assistant-only event ranges - #3951

Open
mengcody wants to merge 1 commit into
volcengine:mainfrom
mengcody:fix/range-target-fallback
Open

fix(memory): resolve assistant-only event ranges#3951
mengcody wants to merge 1 commit into
volcengine:mainfrom
mengcody:fix/range-target-fallback

Conversation

@mengcody

Copy link
Copy Markdown

Summary

  • resolve event ranges containing only assistant/tool activity using the unique target established by user-role messages in the session
  • preserve peer isolation by refusing fallback when the session target is ambiguous
  • never treat assistant peer IDs as ownership evidence

Root cause

Event write targets are derived from user-role messages inside each extracted range. Ranges that contain only assistant/tool activity therefore produce no target URI, even when the session has exactly one unambiguous user-owned target, and are later skipped with Missing resolved URI.

Tests

  • PYTHONPATH=. .venv/bin/python -m pytest tests/session/memory/test_memory_isolation_handler.py -q --no-cov (34 passed)
  • PYTHONPATH=. .venv/bin/python -m pytest tests/session/memory/test_memory_updater.py -q --no-cov -k 'unresolved or missing_resolved' (2 passed)
  • uvx ruff check openviking/session/memory/memory_isolation_handler.py tests/session/memory/test_memory_isolation_handler.py
  • uvx ruff format --check openviking/session/memory/memory_isolation_handler.py tests/session/memory/test_memory_isolation_handler.py

The full test_memory_updater.py currently has 6 unrelated failures on main because existing test fakes/mocks do not accept the newly added lease_ref argument.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant