Repository navigation
app: process actions wait for an opening crew owner instead of saying it is not held - #2156
santoshkumarradha wants to merge 5 commits into
Conversation
…s not held findCrewOwner opens a light crew owner once and lets other callers through while that open runs. ProcessActions then read the owner's live conversation, found none yet, and answered from the saved record: Rerun not held and Stop ended for a job whose owner was being opened. It now waits for an open in progress (the open holds the agent's gate until it is live or has failed) before it reads. held() and every other reader are unchanged.
|
Parked, for the owner to decide. This PR stays open and does not ride. Why: #2264 landed after this PR and set the opposite behaviour. Reads of process actions during an owner's open answer at once from saved history, and The decision: prompt reads (#2264), where Rerun can read as unavailable for a moment during an open, or accurate reads that wait for the open (this PR). How often the moment occurs and how fast the desktop app refreshes have not been measured. 🤖 Generated with Claude Code |
|
Closing, because What this PR did: a process-actions read made while a crew owner is still opening waits for the open to finish. What Why porting this one would hurt: it takes the owner's gate with no deadline. That breaks The branch stays as it is, so nothing is lost. |
What changes
Process actions (stop, restart, and the other per-process controls) no longer report "not held" while the light crew owner is still opening. Before, a person could press an action at that moment and get a false refusal, or a fallback branch for a process the app was about to own.
findCrewOwnernow waits for an open that is in progress, through a newliveAfterOpenthat waits on the app's open gate. Earlier it skipped the kept-live owner while it was opening, soProcessActionsreadliveOf() == niland went into the not-held branch.held()is unchanged.Evidence
TestProcessActionsWhileALightCrewOwnerIsStillOpeninguses an open that takes 300 ms. It failed 3 of 3 runs before the fix. After the fix it passes under-race -count=20, together withTestProcessActionsOpensALightCrewOwnerOnce.ProcessActionstests pass under-race. The lock-guard law reports nothing forapplazy.go.Limits
🤖 Generated with Claude Code