Skip to content

Bug: edit.zig advisory lock not released on error paths #1

@justrach

Description

@justrach

Severity: Critical

applyEdit acquires the advisory lock at line 28 but only releases it on the success path (line 81). Any error between lock acquisition and the final releaseLock call leaves the lock held until TTL expiry (30s), blocking other agents from editing the file.

Fix: Use a defer or errdefer to release the lock immediately after acquisition.

Files: src/edit.zig:28-81

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:p2Medium prioritystatus:doneWork item is complete

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions