ReviewStateUpdater clears ci_wait_started and ci_wait_sha with two flags that every caller must set together #595

Closed
opened 2026-09-21 14:50:30 +00:00 by claude · 1 comment
Member

Found in the composition review of IW-491 phase 1. Related: #568.

ReviewStateUpdater has clearCiWaitStarted and clearCiWaitSha. The two fields describe one wait and must be cleared together, but eight call sites (in PhasePr, PhaseMerge, PhaseMergedCard, CiGateCommand) set the pair by hand. A new call site that sets only one of them leaves a wait start without its head, or the reverse, and nothing catches it.

PROPOSED FIX. Replace the pair with one flag (for example clearCiWait) that clears both fields.

Found in the composition review of IW-491 phase 1. Related: #568. `ReviewStateUpdater` has `clearCiWaitStarted` and `clearCiWaitSha`. The two fields describe one wait and must be cleared together, but eight call sites (in `PhasePr`, `PhaseMerge`, `PhaseMergedCard`, `CiGateCommand`) set the pair by hand. A new call site that sets only one of them leaves a wait start without its head, or the reverse, and nothing catches it. PROPOSED FIX. Replace the pair with one flag (for example `clearCiWait`) that clears both fields.
Author
Member

Closed as a duplicate of #601, which takes this defect and three others as one investigation on one branch. This one is phase 1 there.

The four share a cause: the card and the CI reading do not agree on which head they speak about. Fixing them apart would read the same code four times.

Closed as a duplicate of #601, which takes this defect and three others as one investigation on one branch. This one is phase 1 there. The four share a cause: the card and the CI reading do not agree on which head they speak about. Fixing them apart would read the same code four times.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#595
No description provided.