authorgravatar for eu@marcusgrando.comMarcus Grando <eu@marcusgrando.com> 2026-04-16 02:09:29-03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-04-16 05:09:29+00:00
logd22c6f52800673d954840bd447109aeb707c6e8e
tree42ad998f3b44b7d9d63a6c1e6f1eec7bbf83561b
parent5e13f535716c14554cd1a89c5abfc574c5ecb7ac
signature Signed by PGP key B5690EEEBB952194

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


1 files changed, 8 insertions(+), 0 deletions(-)

apps/server/src/orchestration/Layers/ProjectionPipeline.ts+8
......@@ -1284,6 +1284,14 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
12841284 }
12851285 return;
12861286 }
1287 // Only approval-requested activities should create pending-approval
1288 // rows. Other activity kinds that happen to carry a requestId
1289 // (e.g. user-input.requested / user-input.resolved) must not
1290 // pollute this projection — they have their own accounting via
1291 // derivePendingUserInputCountFromActivities.
1292 if (event.payload.activity.kind !== "approval.requested") {
1293 return;
1294 }
12871295 if (Option.isSome(existingRow) && existingRow.value.status === "resolved") {
12881296 return;
12891297 }