fix: prevent user-input activities from leaking into pending approvals projection (#2051)

This commit is contained in:
Marcus Grando authored and GitHub committed 2026-04-16 05:09:29 +00:00
1 parent 5e13f53571
commit d22c6f5280
1 file changed
+8
@@ -1284,6 +1284,14 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
}
return;
}
// Only approval-requested activities should create pending-approval
// rows. Other activity kinds that happen to carry a requestId
// (e.g. user-input.requested / user-input.resolved) must not
// pollute this projection — they have their own accounting via
// derivePendingUserInputCountFromActivities.
if (event.payload.activity.kind !== "approval.requested") {
return;
}
if (Option.isSome(existingRow) && existingRow.value.status === "resolved") {
return;
}