writeDraftCheckpoint OCC can lose a crash-recovery checkpoint under concurrent checkpointing
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 57/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- database
Research direction
Start in writeDraftCheckpoint in src/storage/memory.ts around lines 639-650, and trace how atomicWrite reports ECONFLICT and how isConflictError is used elsewhere in the same file. The checkpoint path currently lets that error propagate instead of re-reading the fingerprint and retrying. Done means a conflicting checkpoint write retries and succeeds, and a concurrent DRAFT-S-* checkpoint is no longer lost.
Written by the indexing model from the issue text.
Description
Location: src/storage/memory.ts:639-650
Two writers checkpointing the same DRAFT-S-* id read the same fingerprint; the second gets ECONFLICT from atomicWrite, which is not caught here and propagates. The checkpoint write - whose purpose is to prevent data loss on unexpected exit - is the thing lost.
Fix: Retry on isConflictError (re-read fingerprint and rewrite) for the checkpoint path.
From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 167
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No 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 Kuldeep2822k/cli
-
core priority: medium tests
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Kuldeep2822k/cli#484 ·
Maintainers usually reply within 1 day
-
bug core priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Kuldeep2822k/cli#343 · 1 comment ·
Maintainers usually reply within 1 day
-
bug core priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Kuldeep2822k/cli#342 · 1 comment ·
Maintainers usually reply within 1 day
-
build dependencies documentation refactor
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Kuldeep2822k/cli#531 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Kuldeep2822k/cli#522 ·
Maintainers usually reply within 1 day
All issues in Kuldeep2822k/cli
Similar issues
-
数据界面的横向滚动条缺失Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zilliztech/attu#1037 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openclaw/openclaw#181212 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apify/apify-mcp-server#1684 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/data-liberation-agent#953 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
siteboon/claudecodeui#1642 ·
Maintainers usually reply within 5 days