Skip to content

fix(memory): define config before v2 memory lock retry settings access#1317

Merged
yeshion23333 merged 1 commit intovolcengine:mainfrom
heaoxiang-ai:fix_compressor_v2
Apr 9, 2026
Merged

fix(memory): define config before v2 memory lock retry settings access#1317
yeshion23333 merged 1 commit intovolcengine:mainfrom
heaoxiang-ai:fix_compressor_v2

Conversation

@heaoxiang-ai
Copy link
Copy Markdown
Contributor

Description

Fix a NameError in openviking/session/compressor_v2.py when the v2 memory extraction path enters the lock acquisition retry branch.

SessionCompressorV2.extract_long_term_memories() reads config.memory.v2_lock_retry_interval_seconds and config.memory.v2_lock_max_retries, but config was not defined in that method scope. This change initializes the OpenViking config before those settings are
accessed so v2 memory extraction can retry lock acquisition as intended.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Initialize OpenViking config inside SessionCompressorV2.extract_long_term_memories()
  • Fix access to memory.v2_lock_retry_interval_seconds and memory.v2_lock_max_retries in the lock retry path
  • Verify the lock retry branch with the existing targeted compressor v2 test

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

  • This is a minimal bug fix scoped to the v2 memory lock retry path.
  • The targeted pytest run passed, but the full test suite was not run in this session.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 95
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

@yeshion23333 yeshion23333 merged commit 5f14619 into volcengine:main Apr 9, 2026
5 of 9 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants