Remove structured event-stream to sessions lock-order inversion #197

Closed
opened 2026-09-05 10:09:13 +01:00 by naps62-yolo · 1 comment
Collaborator

sync_structured_activity_from_stream holds the event-stream mutex across an await that locks sessions, opposite the established sessions-then-stream access pattern elsewhere. It is not currently deadlocking because other callers drop sessions before awaiting stream, but it is a latent inversion. Snapshot the needed stream state, release its lock, then update session activity; add a regression or invariant-focused test.

sync_structured_activity_from_stream holds the event-stream mutex across an await that locks sessions, opposite the established sessions-then-stream access pattern elsewhere. It is not currently deadlocking because other callers drop sessions before awaiting stream, but it is a latent inversion. Snapshot the needed stream state, release its lock, then update session activity; add a regression or invariant-focused test.
naps62-yolo added this to the Structured view milestone 2026-09-05 10:09:13 +01:00
naps62-yolo self-assigned this 2026-09-05 11:42:56 +01:00
Author
Collaborator

Audit every sessions/event-stream lock path, refactor activity inference to snapshot stream state before session mutation, and add a focused regression that proves the stream guard is released. Then run the requested gated workspace checks, commit, and push this branch.

Audit every sessions/event-stream lock path, refactor activity inference to snapshot stream state before session mutation, and add a focused regression that proves the stream guard is released. Then run the requested gated workspace checks, commit, and push this branch.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: naps62/maestro#197