Commit ffca8ca
authored
(SP: 3)[Shop][DB] Reduce Neon compute: throttle janitor + relax checkout polling + add sweep indexes (#375)
* (SP: 3) [Backend] add internal janitor (jobs 1-4), claim/lease + runbook (G0-G6)
* (SP: 3) [Backend] add provider selector, fix payments gating, i18n checkout errors
* Add shop category images to public
* (SP: 3) [Shop][Monobank] I1 structured logging: codes + logging safety checks
* (SP: 3) [Shop][Monobank] Fail-closed non-browser origin posture for webhook + janitor (ORIGIN_BLOCKED)
* (SP: 3) [Shop][Monobank] [Shop][Monobank] J gate: add orders status ownership test and pass all pre-prod invariants
* (SP: 3) [Shop][Monobank] review fixes (tests, logging, success UI)
* (SP: 1) [Shop][Monobank] Tighten webhook log-code typing; harden DB tests; minor security/log/UI cleanups
* (SP: 1) [Shop][Monobank] harden Monobank webhook (origin/PII-safe logs) and remove duplicate sha256 hashing
* (SP: 1) [Cart] adding route for user orders to cart page
* (SP: 1) [Cart] fix after review cart mpage and adding index for orders
* (SP: 1) [Cart] Fix cart orders summary auth rendering and return totalCount for orders badge
* (SP: 1) [Cart] remove console.warn from CartPageClient to satisfy monobank logging safety invariant, namespace localStorage cart by user and reset on auth change
* (SP: 1) [Cart] rehydrate per cartOwnerId (remove didHydrate coupling)
* (SP: 2)[Backend] shop/shipping schema migrations foundation
* (SP: 2)[Backend] shop/shipping public routes + np cache + sync
* (SP: 2)[Backend] shop/shipping: shipping persistence + currency policy
* (SP: 2)[Backend] shop/shipping: webhook apply + psp fields + enqueue shipping
* (SP: 2)[Backend] shop/shipping: shipments worker + internal run + np mock
* (SP: 2)[Backend] shop/shipping: admin+ui shipping actions
* (SP: 2)[Backend] shop/shipping: retention + log sanitizer + metrics
* (SP: 1)[Backend] stabilize Monobank janitor (job1/job3) and fix failing apply-outcomes tests
* (SP: 1) [db]: add shop shipping core migration
* (SP: 1) [FIX] resolve merge artifacts in order details page
* (SP: 1) [FIX] apply post-review fixes for shipping and admin flows
* (SP: 1) [FIX] align cart shipping imports (localeToCountry + availability reason code)
* (SP: 1) [FIX] hard-block checkout when shipping disabled + i18n reason mapping
* (SP: 1) [FIX] harden webhook enqueue + shipping worker + NP catalog + cart fail-closed
* (SP: 1) [FIX] Initialize shippingMethodsLoading to true to avoid premature checkout.
* (SP: 1) [FIX] migration 17
* (SP: 1) [DB] migrarion to testind DB and adjusting tests
* (SP: 1)[DB] slow down restock janitor + enforce prod interval floor
* (SP: 1) [DB] add order status lite view (opt-in) + instrumentation
* (SP: 1) [DB] replace checkout success router.refresh polling with backoff API polling
* (SP: 1) [DB] throttle sessions activity heartbeat + use count(*) (PK invariant)
* (SP: 1)[DB] enforce production min intervals for internal shipping jobs
* (SP: 1) [DB] add minimal partial indexes for orders sweeps + rollout notes
* (SP: 1) [DB] refactor sweep claim step to FOR UPDATE SKIP LOCKED batching
* (SP: 1)[DB]: slow janitor schedule to every 30 minutes
* (SP: 1)[DB] increase polling delays for MonobankRedirectStatus
* (SP: 1)[FIX] harden webhooks + fix SSR hydration + janitor/np gates + sweeps refactor
* (SP: 1)[FIX] harden shipping enqueue gating + apply NP interval floor1 parent b94a599 commit ffca8ca
27 files changed
Lines changed: 5564 additions & 520 deletions
File tree
- .github/workflows
- frontend
- app
- [locale]/shop/checkout/success
- api
- sessions/activity
- shop
- internal
- orders/restock-stale
- shipping
- np/sync
- retention/run
- shipments/run
- orders/[id]/status
- webhooks/stripe
- drizzle
- meta
- lib
- services
- orders
- shop/shipping
- tests
- helpers
- shop
- validation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
| |||
181 | 202 | | |
182 | 203 | | |
183 | 204 | | |
| 205 | + | |
184 | 206 | | |
185 | 207 | | |
186 | 208 | | |
| |||
Lines changed: 166 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
14 | 104 | | |
15 | 105 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 106 | + | |
21 | 107 | | |
22 | | - | |
| 108 | + | |
23 | 109 | | |
24 | 110 | | |
25 | 111 | | |
26 | 112 | | |
27 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
28 | 126 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
34 | 175 | | |
35 | | - | |
36 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
37 | 179 | | |
38 | | - | |
39 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
40 | 186 | | |
41 | 187 | | |
42 | 188 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
20 | 34 | | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
24 | | - | |
| 38 | + | |
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
28 | | - | |
| 42 | + | |
| 43 | + | |
29 | 44 | | |
30 | 45 | | |
31 | 46 | | |
| |||
44 | 59 | | |
45 | 60 | | |
46 | 61 | | |
47 | | - | |
| 62 | + | |
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
| |||
0 commit comments