BOLT-1268 P1 — address Bugbot HIGH: publishedAt write failure window on PR #12181
blockedNew Cursor Bugbot HIGH finding on PR #12181 thread PRRT_kwDOJpxUwM6JNiEH: if executeBatch succeeds for some batches but the post-loop workspaceProgramEventRepository.publishWorkspaceProgramEvent (DB write to set publishedAt) throws, devices have received commands but publishedAt stays null. User retry passes idempotency guard and redispatches everything — same class of bug PR fixes for Edit→Schedule.
Fundamental constraint: executeBatch is a network side-effect to supergraph; cannot be atomic with a Prisma write. Real fix is per-batch dispatchedAt tracking on Batch model (file as separate Linear).
This PR scope: add a retry wrapper with bounded attempts (e.g. 3 attempts with exponential backoff) around the publishedAt DB write. If after retries it still fails, log Datadog error explicitly identifying the half-state with the workspaceProgramEventId so on-call can manually flip publishedAt. Add a code comment documenting the residual risk window. Add a test for the retry behavior.
PR #12181 / branch winston/bolt-1268-p1-idempotent-publish.
Event Timeline
created
subagent_spawned
spawn claim: bugbot-pr12181-retry-publishedAt
subagent_completed
subagent done: PR #12181 Bugbot HIGH addressed via fdbb602190; retry wrapper + loud failure log, CI pending
status_change
queued → blocked