Closer/functions/dist
null 4c077c4d7c refactor(functions): B6c split game part-finished trigger + reorder reads (#11)
Split the single broad onGamePartFinished (couples/{coupleId}/{gameType}/{sessionId}
wildcard, which fired a no-op invocation on every write to ANY couple subcollection) into
four narrow, explicitly-pathed triggers sharing one handler:
onThisOrThatPartFinished, onWheelPartFinished, onHowWellPartFinished, onDesireSyncPartFinished.
Behavior is identical for the four game collections; the spurious invocations for
messages/reactions/etc. are eliminated. (Background triggers have no client name dependency;
the old export is dropped and the four deploy fresh — the deploy runbook already accounts for
this.)

onGameSessionUpdate: move the `!change.after.exists` deletion guard ABOVE its four reads
(session/couple/userA/userB) so a delete/no-op event returns before doing any reads. The
delicate exactly-once claim-flag logic is otherwise untouched.

Build clean; 70 tests green. Discovery loads all four split triggers as v2 in us-central1
(36 functions total); old onGamePartFinished gone. dist rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 00:08:18 -05:00
..
backup refactor(functions): B1 migrate 13 Firestore triggers to v2 + harden 2026-07-07 23:46:17 -05:00
billing refactor(functions): B4+B5 migrate webhook to v2 + pin onUserDelete on v1 2026-07-08 00:00:29 -05:00
couples perf(functions): B6b bound the unbounded couple scanners (#10) 2026-07-08 00:05:32 -05:00
dates refactor(functions): B1 migrate 13 Firestore triggers to v2 + harden 2026-07-07 23:46:17 -05:00
games refactor(functions): B6c split game part-finished trigger + reorder reads (#11) 2026-07-08 00:08:18 -05:00
notifications refactor(functions): B3 migrate 12 callables to v2 + harden 2026-07-07 23:58:32 -05:00
questions perf(functions): B6b bound the unbounded couple scanners (#10) 2026-07-08 00:05:32 -05:00
releaseKey refactor(functions): B3 migrate 12 callables to v2 + harden 2026-07-07 23:58:32 -05:00
security refactor(functions): B3 migrate 12 callables to v2 + harden 2026-07-07 23:58:32 -05:00
users refactor(functions): B4+B5 migrate webhook to v2 + pin onUserDelete on v1 2026-07-08 00:00:29 -05:00
index.js refactor(functions): B6c split game part-finished trigger + reorder reads (#11) 2026-07-08 00:08:18 -05:00
index.js.map refactor(functions): B6c split game part-finished trigger + reorder reads (#11) 2026-07-08 00:08:18 -05:00
log.js build(functions): B0 v2 foundation — global options, shared push helper, structured logging 2026-07-07 23:36:16 -05:00
log.js.map build(functions): B0 v2 foundation — global options, shared push helper, structured logging 2026-07-07 23:36:16 -05:00
options.js build(functions): B0 v2 foundation — global options, shared push helper, structured logging 2026-07-07 23:36:16 -05:00
options.js.map build(functions): B0 v2 foundation — global options, shared push helper, structured logging 2026-07-07 23:36:16 -05:00