Stale lock takeover is undetectable by the losing holder; non-OCC writes can clobber
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
- 28/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with updateHeartbeat in src/storage/lock.ts (lines 382-392 and 501-509), focusing on the ENOENT path that leaves lockData set and the timer running. Then check the atomicWrite call in adopt.ts line 114, which passes no fingerprint. Done means a lost lock is reported to the caller and the timer stops, and existing-file overwrites require a fingerprint. Expect to need the lock semantics in depth before changing anything.
Written by the indexing model from the issue text.
Description
Location: src/storage/lock.ts:382-392,501-509; adopt.ts:114
When a stalled holder is reclaimed, its updateHeartbeat hits ENOENT and no-ops but does not clear lockData or stop the timer, so it still believes it holds the lock. The only backstop is OCC, but some atomicWrite calls pass no fingerprint (adopt.ts:114), so two processes can both write with no guard -> silent lost update under heartbeat starvation.
Fix: Have updateHeartbeat report loss (clear state, stop timer, surface to caller); require a fingerprint for existing-file overwrites.
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
-
createAI: the ai peer range allows ai@6, which the provider cannot work withPossibly taken @akhil9tiet claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 83/100
cloudflare/agents#2690 · 3 comments ·
Maintainers usually reply within 1 day
-
[fullsend] E2E: theme — global-header ignores app.branding.fullLogo (RHDHBUGS-3670)Possibly taken @fullsend-ai-coder claimed this today. Opene2e-failure ready-to-code
Difficulty 1/5 Under an hour Newbie friendliness 78/100
redhat-developer/rhdh-plugin-export-overlays#4503 · 1 comment ·
Maintainers usually reply within 1 day
-
needs triage 📥
Difficulty 1/5 Under an hour Newbie friendliness 86/100
ethereum/ethereum-org-website#19601 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cloudscape-design/components#5184 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agilepathway/label-checker#805 ·
Maintainers usually reply within 1 day