[PR #4388] fix(edit): add per-file lock to prevent read-before-write race #10952

Closed
opened 2026-02-16 18:15:43 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4388

State: closed
Merged: Yes


what the title says.
didn't wrap write.ts and patch.ts with withLock because it doesn't really make sense, but... should I for consistency?

This fixes the read before edit error we got when doing parallel edit calls (reliably?)

Resolves https://github.com/sst/opencode/issues/2882

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4388 **State:** closed **Merged:** Yes --- what the title says. didn't wrap write.ts and patch.ts with withLock because it doesn't really make sense, but... should I for consistency? This fixes the read before edit error we got when doing parallel edit calls (reliably?) Resolves https://github.com/sst/opencode/issues/2882
yindo added the pull-request label 2026-02-16 18:15:43 -05:00
yindo closed this issue 2026-02-16 18:15:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10952