Repository navigation
Commit 458b3ab
Address review: callback is a persistence path; bind mark_persisted to the saved set; timeout everywhere
Rivet's review of #2 (three P2s):
1. on_token_refresh is a persistence path, so it now runs BEFORE publication
inside the same pending transition as store.save, for both managers; a
raising/blocked callback keeps the set pending and surfaces
WefunderTokenPersistenceError. Callback barrier/failure/retry tests, sync
and async.
2. timeout now reaches the token managers and the re-mint closures in both
constructors, and exchange_code / async_exchange_code forward it. Recorder
tests cover expired-token refresh, the initial mint, and code exchange,
sync and async.
3. mark_persisted(tokens) takes the exact set that was saved and is a no-op
(False) for a stale acknowledgment, so an older r2 save can never publish
an unsaved r3 — deterministic public-API test included.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 7005bd6 commit 458b3ab
4 files changed
Lines changed: 221 additions & 88 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
529 | 531 | | |
530 | 532 | | |
531 | 533 | | |
| 534 | + | |
532 | 535 | | |
533 | 536 | | |
534 | 537 | | |
| |||
540 | 543 | | |
541 | 544 | | |
542 | 545 | | |
| 546 | + | |
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
147 | | - | |
148 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
149 | 156 | | |
150 | | - | |
151 | | - | |
| 157 | + | |
| 158 | + | |
152 | 159 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 160 | + | |
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
| |||
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
167 | 176 | | |
168 | 177 | | |
169 | 178 | | |
170 | 179 | | |
171 | | - | |
172 | | - | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
| |||
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
242 | | - | |
243 | | - | |
| 249 | + | |
| 250 | + | |
244 | 251 | | |
245 | | - | |
246 | | - | |
| 252 | + | |
| 253 | + | |
247 | 254 | | |
248 | | - | |
249 | | - | |
250 | | - | |
| 255 | + | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
257 | 262 | | |
| 263 | + | |
| 264 | + | |
258 | 265 | | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
262 | | - | |
263 | | - | |
264 | 269 | | |
265 | 270 | | |
266 | 271 | | |
| |||
0 commit comments