Add repair-semantic-queue command + post-update bridge for the OV poison loop (#2734)#43
Merged
Merged
Conversation
…oison loop (#2734) Temporary bridge until the pinned OpenViking includes upstream PR #2735. - New `threadnote repair-semantic-queue [--apply]` patches the installed OpenViking semantic_processor.py to skip non-directory/missing memory URIs (so a memory file reindexed with mode=semantic_and_vectors cannot poison the AGFS-persisted semantic queue), then restarts the server so a stuck message drains. Idempotent (no-op once OV already has the guard or a prior hot-fix), keeps a .threadnote-bak, and compile-checks the patched file before writing. Locates the package from the OV server's venv, common uv/pipx roots, or the venv python; override with THREADNOTE_OPENVIKING_SEMANTIC_PROCESSOR. - Post-update migration (introducedIn 1.4.3) offers it on `threadnote update` with the usual consent prompt. - Unit tests for the pure idempotent patcher; troubleshooting doc. Marked for removal once DEFAULT_OPENVIKING_VERSION is bumped to an OpenViking release containing PR #2735.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporary bridge so users stuck on the current pinned OpenViking can drain/avoid the semantic-queue poison loop (#2734) without waiting for the upstream release.
A memory file reindexed with
mode=semantic_and_vectorsenqueues a directory-levelcontext_type="memory"semantic message; OpenViking's_process_memory_directorylists the file, fails, and the AGFS-persisted message re-enqueues forever — surviving a server restart and stallingreindex --wait/ memory writes. threadnote 1.4.1 bounded its own waits (no more 31-min hang), but couldn't clear the cause.New command
threadnote repair-semantic-queue [--apply]:semantic_processor.pyto skip non-directory/missing memory URIs (the upstream #2735 / PRvolcengine/OpenViking#2735guard), then restarts the server so a stuck message drains on the next dequeue.stat(dir_uri)guard (or a prior hot-fix marker) is already present. Keeps a.threadnote-bak, and compile-checks the patched source (python -m py_compile) before writing.THREADNOTE_OPENVIKING_SEMANTIC_PROCESSOR.Post-update migration (
introducedIn: 1.4.3): offers the patch onthreadnote updatewith the usual consent prompt (auto-runs only on--yes/interactive-confirm), afterensurePinnedOpenVikingInstalled, so it patches the freshly-installed OV.Marked for removal: a
REMOVE-WHENnote ties this to bumpingDEFAULT_OPENVIKING_VERSIONto an OpenViking release containing #2735 — at which point the command no-ops and the migration can be dropped. The real fix remains the pin bump + existing upgrade path.The pure patcher logic is what's tested.
Test plan
npm run typecheck,npm run lint,npm test(292 tests / 25 files) green.semantic_queue_repair.test.ts: patch inserts the guard at the right indent beforels(dir_uri); idempotent (marker → already-fixed); upstreamstat(dir_uri)guard → already-fixed; no-anchor when the ls call / method is absent.