Skip to content

fix(memory): expose reasons for skipped empty-URI operations - #4168

Open
yeshion23333 wants to merge 3 commits into
mainfrom
feat/memory_empty_uri_reason
Open

fix(memory): expose reasons for skipped empty-URI operations#4168
yeshion23333 wants to merge 3 commits into
mainfrom
feat/memory_empty_uri_reason

Conversation

@yeshion23333

@yeshion23333 yeshion23333 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • classify policy- and validation-driven empty-URI memory operations with stable reason codes
  • return intentionally skipped operations as scoped skipped_operations in commit task results and include reason codes in logs
  • persist skipped operations in memory_diff.json with a summary.total_skipped count for archive-level auditing
  • keep deletes in the same streaming apply batch as unresolved upserts, allowing delete execution to be suppressed when an upsert is skipped
  • reuse the existing peer-memory policy without adding config, LLM calls, or telemetry

Scope

  • policy and validation skips are treated as expected skips and do not fail the commit task
  • unexplained empty URIs keep the existing behavior: they remain internal MemoryUpdateResult.errors and are not promoted to task errors, failed operations, or memory_diff.json skipped records
  • memory_diff.json keeps skipped operations as top-level audit metadata; its operations section continues to contain only applied file changes
  • delete suppression applies to file deletion only; it does not make replacement processing atomic or change the existing ordering of replacement link migration

Compatibility

  • normal URI resolution and writes are unchanged
  • peer_memory_enabled propagates the existing MemoryPolicy.peer_enabled decision and is not a new configuration option
  • the new parameter is appended to the public extraction signature so existing positional callers keep their parameter bindings

Testing

  • targeted tests cover reason classification, streaming batch isolation, compressor and commit-task propagation, memory diff generation and merging, and legacy positional compatibility
  • memory-diff regression tests pass (17 passed); ruff check, format checks, and git diff --check pass for the touched files

Related to #4131

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