Skip to content

fix(openviking): harden session sync and commit recovery - #69191

Merged
kshitijk4poor merged 5 commits into
NousResearch:mainfrom
kshitijk4poor:salvage/pr-58871
Jul 22, 2026
Merged

fix(openviking): harden session sync and commit recovery#69191
kshitijk4poor merged 5 commits into
NousResearch:mainfrom
kshitijk4poor:salvage/pr-58871

Conversation

@kshitijk4poor

@kshitijk4poor kshitijk4poor commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Salvages #58871 with minor cleanup: dead parameters removed, lock-path assignment reordered, redundant exception branch collapsed, and per-turn marker re-writes eliminated.

Changes

  • plugins/memory/openviking/init.py: removed dead current_sid param from _recover_pending_sessions; removed dead cleanup param from _release_owner_run_claim (always True); set _run_lock_path after flock succeeds; collapsed BlockingIOError branch into OSError+errno check; added _pending_marked_sids set to skip re-writing marker file on every sync_turn call
  • tests/plugins/memory/test_openviking_provider.py: updated _recover_pending_sessions call (no args)

Attribution

  • @ehz0ah — session commit recovery, orphan session recovery
  • @NPFernando — OpenViking setup docs
  • @ckorhonen — structured session sync batching

Validation

  • 152/152 tests passed
  • ruff clean, py_compile OK, no Windows footguns
  • E2E real-import smoke test: plugin loads, path traversal blocked, signatures verified, no crashes
  • git diff --check clean

Supersedes

Closes #58871, #31434, #31493

ehz0ah and others added 5 commits July 22, 2026 13:57
(cherry picked from commit a680717)
(cherry picked from commit 6fb4e9a)
Preserve ordered structured turns across OpenViking's 100-message batch limit and resume retries from the first unconfirmed message.

Based on the OpenViking batching work from commit 1a567f7 in NousResearch#58981.
- Remove dead current_sid parameter from _recover_pending_sessions
- Remove dead cleanup parameter from _release_owner_run_claim (always True)
- Set _run_lock_path after flock succeeds, not before
- Collapse redundant BlockingIOError branch (covered by OSError+errno check)
- Track _pending_marked_sids to skip re-writing marker file on every sync_turn
@kshitijk4poor
kshitijk4poor enabled auto-merge (rebase) July 22, 2026 08:32
@kshitijk4poor
kshitijk4poor merged commit c3c80e1 into NousResearch:main Jul 22, 2026
34 checks passed
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers area/sessions Session lifecycle, resume, persistence, history sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 22, 2026
@kshitijk4poor
kshitijk4poor deleted the salvage/pr-58871 branch August 5, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants