Skip to content

fix(memory): exclude archived nodes from associative recall 🤖🤖🤖 - #275

Open
Sampoornnagpal wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
Sampoornnagpal:fix/memory-archived-recall
Open

fix(memory): exclude archived nodes from associative recall 🤖🤖🤖#275
Sampoornnagpal wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
Sampoornnagpal:fix/memory-archived-recall

Conversation

@Sampoornnagpal

@Sampoornnagpal Sampoornnagpal commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

An archived memory can reappear in associative recall and receive another access entry. It can also relay activation to other memories through a multi-hop path. Check that each graph target exists, is active, and matches the requested owner scope before adding it to the next frontier.

Add regressions for archived results and archived bridges, both with and without an owner filter. The four regression cases fail before the fix.

Related issues

No matching open issue found.

Validation

uv run pytest -q packages/nooa-memory/tests/memory/test_memory_retrieval.py packages/nooa-memory/tests/memory/test_memory_owner.py packages/nooa-memory/tests/memory/test_memory_owner_roles.py — 33 passed.

Validated on Windows/Python 3.12 with external import-only compatibility helpers for the existing fcntl and SIGUSR2 blockers (#84/#85). The helpers are not included in this PR and do not validate POSIX locking or signals. No live model calls were used.

Checklist

  • Ruff lint and formatting pass.
  • Regression and owner-isolation tests pass.
  • Traversal docstring updated.
  • Existing SPDX headers retained.

Summary by CodeRabbit

  • Bug Fixes
    • Archived memories are excluded from retrieval results and explanations.
    • Archived memories no longer receive activation or relay it to other memories.
    • Retrieval continues to include relevant active memories while respecting owner visibility.

Signed-off-by: Sampoorn Nagpal <nagpalsampoorn@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7652937f-ead0-4694-bdcb-856904fe17f4

📥 Commits

Reviewing files that changed from the base of the PR and between 7985a64 and ba32692.

📒 Files selected for processing (2)
  • packages/nooa-memory/src/nooa_memory/retrieval.py
  • packages/nooa-memory/tests/memory/test_memory_retrieval.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/nooa-memory/tests/memory/test_memory_retrieval.py
  • packages/nooa-memory/src/nooa_memory/retrieval.py

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Retrieval now excludes archived memories from recall and associative spreading. Tests cover unrestricted and owner-filtered retrieval, explanations, access updates, and archived bridge memories.

Changes

Archived Memory Retrieval

Layer / File(s) Summary
Retrieval archive filtering and coverage
packages/nooa-memory/src/nooa_memory/retrieval.py, packages/nooa-memory/tests/memory/test_memory_retrieval.py
Spread validates each memory record, rejects archived memories, and preserves owner filtering. Tests verify recall results, explanations, access updates, and associative traversal.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ba326

Archived memories are excluded from recall results and traversal propagation, with regression coverage for archived results and bridge nodes. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: excluding archived nodes from associative memory recall. The emojis add minor noise but do not make the title misleading or unclear.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Sampoorn Nagpal <nagpalsampoorn@gmail.com>
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