[Bug]: WatchStore recovery overwrites its readable backup
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by locating FileWatchStore.initialize() and its snapshot save and recovery paths; the issue does not name file paths or tests. Trace how the readable backup is used and how the primary is rewritten, then look for tests covering invalid primary JSON and a failed final move. Done means a retry can still recover the watch from the backup after that move fails.
Written by the indexing model from the issue text.
Description
Issue Origin
Observed or reproduced in a real environment. The reproduction uses the real local RAGFS backend and on-disk snapshots.
Bug Description
When the primary watch-task snapshot is invalid JSON and the backup is readable, FileWatchStore.initialize() recovers the task rows from the backup. While rewriting the primary, the normal save path rotates the invalid primary over the only readable backup. If installing the recovered primary fails after that rotation, no readable snapshot remains.
Steps to Reproduce
- Use a local
FileWatchStoreand create a watch. Update it once to generate a valid backup. - Write invalid JSON to
.watch_tasks.json. - Reopen the store. Inspect the backup after initialization. To exercise a failed restore, reject only the move from the temporary snapshot to the primary and then retry initialization.
Expected Behavior
Restore the primary from the readable backup without rotating the corrupt primary over it. If the final move fails, a retry should still be able to load the watch from the same backup.
Actual Behavior
The backup contains the corrupt primary bytes after both a successful restore and a simulated failure of the final move.
OpenViking Version
Current main at 5043e1f, with the local RAGFS Python binding from the OpenViking 0.5.3 macOS wheel.
Python Version
Python 3.12.
Operating System
macOS arm64.
Additional Context
#7133 and #7086 cover startup when snapshots cannot be read. This reproduction starts from a readable backup and fails during the recovery write. It was investigated and reproduced with AI assistance.
- Dominant language
- Python
- Stars
- 41.8k
- Forks
- 3.4k
- Avg merge
- 19h 29m
- Merged PRs (30d)
- 500
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from volcengine/OpenViking
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
volcengine/OpenViking#7485 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
volcengine/OpenViking#7210 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
volcengine/OpenViking#7205 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: Retrieval rerank fallback statistics stay zero after provider failurePossibly taken @97Three claimed this 8 days ago. Openbug kernel
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
volcengine/OpenViking#7014 ·
Maintainers usually reply within 1 day
-
[Bug]: memory.prefetch_search_topn is inert above 5 (call site omits limit), plus two docstrings state the wrong defaultsPossibly taken @peterzhang987723 claimed this 8 days ago. Openkernel
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
volcengine/OpenViking#6923 · 2 comments ·
Maintainers usually reply within 1 day
All issues in volcengine/OpenViking
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
FinanceFlash/unvibecode#699 ·
Maintainers usually reply within 1 day
-
enhancement Website
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OWASP/OWASP-Hunting#96 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
micropython/micropython#19942 ·
Maintainers usually reply within 1 day
-
A rebuild posts "not part of this build" success to the commit's failed `nix-build` gate and effectsPossibly taken @Padraic-O-Mhuiris claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
`epoch.Integer` raises a raw OverflowError for integers too large to convert to a floatPossibly taken @arindam77 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pydantic/pydantic-extra-types#479 ·
Maintainers usually reply within 1 day