Skip to content

Commit 4a87b2c

Browse files
author
Senior Platform Engineer
committed
fix: reset gateBlockCount on deliverableType change
Root cause: gateBlockCount was only reset when assignee or status changed, but NOT when deliverableType changed. When agents patched deliverableType to fix missing verification gates (e.g. setting deliverable_type_required), the gateBlockCount kept incrementing without reset — causing agents to be skipped on subsequent wakeups. Fix: - Add deliverableType to updateIssueSchema so it can be patched via API - Add gateBlockCount reset when deliverableType changes (mirrors existing resets for assignee and status changes) DLD-3465
1 parent 97569f8 commit 4a87b2c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/shared/src/validators/issue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const updateIssueSchema = createIssueSchema.partial().extend({
7474
reopenEvidence: z.string().min(1).optional(),
7575
interrupt: z.boolean().optional(),
7676
hiddenAt: z.string().datetime().nullable().optional(),
77+
deliverableType: z.string().optional().nullable(),
7778
});
7879

7980
export type UpdateIssue = z.infer<typeof updateIssueSchema>;

server/src/routes/issues.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,6 +2819,13 @@ export function issueRoutes(
28192819
(updateFields as Record<string, unknown>).gateBlockCount = 0;
28202820
}
28212821

2822+
// Reset gate-block counter when deliverableType changes — the issue may now satisfy
2823+
// previously-blocked gates (e.g. deliverable_type_required or verification_target_required).
2824+
const existingDeliverableType = (existing as unknown as { deliverableType: string | null }).deliverableType ?? null;
2825+
if (req.body.deliverableType !== undefined && req.body.deliverableType !== existingDeliverableType) {
2826+
(updateFields as Record<string, unknown>).gateBlockCount = 0;
2827+
}
2828+
28222829
let issue;
28232830
try {
28242831
issue = await svc.update(id, updateFields);

0 commit comments

Comments
 (0)