First-creation writes disable OCC in hot.md/index.md (concurrent lost update)
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #423 by @Kuldeep2822k — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start with the two writers in src/storage/memory.ts (around lines 401-412 and 521-532), where expectedFingerprint is null for a file that does not exist yet, and the rename step in atomic-write.ts near line 174. Read how the lock and the OCC comparison interact before changing anything. Done means that a first-creation write fails with ECONFLICT when the file appears before the rename, and a concurrent-write test shows no silent overwrite. The expectation model is a design decision, so confirm the approach with the maintainer first.
Written by the indexing model from the issue text.
Description
Location: src/storage/memory.ts:401-412,521-532; atomic-write.ts:174
When hot.md/index.md does not exist yet, both writers capture expectedFingerprint=null, which skips the OCC comparison. The lock serializes writes, but process B overwrites A's just-created file with no ECONFLICT. On concurrent session start/end, one invocation's hot-memory/index content is silently lost (recoverable on next clean rebuild).
Fix: Model non-existence as a distinct expectExists:false expectation and fail if the file appears before rename.
From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 21h 20m
- Merged PRs (30d)
- 176
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Kuldeep2822k/cli#550 ·
Maintainers usually reply within 1 day
-
bug core priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Kuldeep2822k/cli#547 ·
Maintainers usually reply within 1 day
-
bug cli priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Kuldeep2822k/cli#546 ·
Maintainers usually reply within 1 day
-
bug priority: medium security
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Kuldeep2822k/cli#544 ·
Maintainers usually reply within 1 day
-
bug priority: medium storage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kuldeep2822k/cli#543 ·
Maintainers usually reply within 1 day
All issues in Kuldeep2822k/cli
Similar issues
-
Native Web
Difficulty 1/5 Under an hour Newbie friendliness 80/100
digitalfabrik/integreat-app#4517 ·
Maintainers usually reply within 2 days
-
TLS guide repeats certs/ in the certificate directoryPossibly taken @maheshrijal claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
prometheus/docs#3156 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
medusajs/dtc-starter#90 ·
Maintainers usually reply within 1 day
-
usability
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
inmanta/web-console#7632 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zaidmukaddam/scira#261 ·