Commit 7732c90
authored
fix: honor
* fix: honor OOO grace window in missed updates flow
- persist lastOooUntil when users leave OOO across status mutations and reconciler
- backfill historical userStatus documents with a lastOooUntil timestamp
- filter missed updates candidates using the persisted grace-period cutoff
* fix failing tests
* fix: reuse shared post-ooo grace period constant
* fix(user-status): address review feedback for lastOooUntil helpers
- collapse normalizeTimestamp null guards into a single check
- normalize fallback timestamps when resolving post-OOO exits
- keep null vs undefined distinction so Firestore clears lastOooUntil correctly
* feat(users): add API-driven lastOooUntil migration (#2502)
* feat(users): add API-driven lastOooUntil migration
- move the lastOooUntil backfill into userStatus with batched updates
- expose POST /users/migration/update-last-ooo-until behind auth + rate limiting
- reuse controller routing so ops can trigger the migration via API
- cover superuser success and non-superuser rejection in integration tests
* resolve merge conflicts
* resolve merge conflictsOOO grace window in missed updates flow (#2501)1 parent b83dcd8 commit 7732c90
File tree
9 files changed
+343
-23
lines changed- constants
- controllers
- models
- routes
- test
- integration
- unit/models
- utils
9 files changed
+343
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
1185 | 1198 | | |
1186 | 1199 | | |
1187 | 1200 | | |
| 1201 | + | |
1188 | 1202 | | |
1189 | 1203 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
958 | 959 | | |
959 | 960 | | |
960 | 961 | | |
| 962 | + | |
961 | 963 | | |
962 | 964 | | |
963 | 965 | | |
| |||
1031 | 1033 | | |
1032 | 1034 | | |
1033 | 1035 | | |
1034 | | - | |
1035 | | - | |
| 1036 | + | |
1036 | 1037 | | |
1037 | 1038 | | |
1038 | 1039 | | |
| |||
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
1049 | | - | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1050 | 1057 | | |
1051 | 1058 | | |
1052 | 1059 | | |
| |||
1083 | 1090 | | |
1084 | 1091 | | |
1085 | 1092 | | |
| 1093 | + | |
1086 | 1094 | | |
1087 | 1095 | | |
1088 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1089 | 1105 | | |
1090 | 1106 | | |
1091 | 1107 | | |
| |||
0 commit comments