Function
isPermanentFailure
(r: TeamMemorySyncPushResult)
Source from the content-addressed store, hash-verified
| 59 | * rate limit — watcher-driven backoff is fine. |
| 60 | */ |
| 61 | export function isPermanentFailure(r: TeamMemorySyncPushResult): boolean { |
| 62 | if (r.errorType === 'no_oauth' || r.errorType === 'no_repo') return true |
| 63 | if ( |
| 64 | r.httpStatus !== undefined && |
| 65 | r.httpStatus >= 400 && |
| 66 | r.httpStatus < 500 && |
| 67 | r.httpStatus !== 409 && |
| 68 | r.httpStatus !== 429 |
| 69 | ) { |
| 70 | return true |
| 71 | } |
| 72 | return false |
| 73 | } |
| 74 | |
| 75 | // Sync state owned by the watcher — shared across all sync operations. |
| 76 | let syncState: SyncState | null = null |
Tested by
no test coverage detected