agentd watch: Improve summary lock to be truly atomic

t-389·WorkTask·
·
·
Created1 month ago·Updated1 month ago

Description

Edit

Current file-based lock has race condition when multiple watchers start simultaneously. Use O_EXCL or flock() for proper atomic locking.

Timeline (4)

🔄[human]Open → InProgress1 month ago
💬[human]1 month ago

Switched summary lock to atomic O_EXCL creation in Watch (with stale lock retry) and moved summary writes to resolved events dir; lock now uses events/ (legacy fallback).

🔄[human]InProgress → Done1 month ago