@@ -30,6 +30,7 @@ import {
3030 fixedPullRequestFromCommitPullsForTest ,
3131 formatRecentClosedRows ,
3232 ghRetryKind ,
33+ ghRetryWaitMs ,
3334 hotIntakeRecencyMs ,
3435 isCodexReviewCommentBody ,
3536 isInfrastructureFailedReviewForTest ,
@@ -13754,6 +13755,7 @@ test("review capacity probes use REST actions run listing", () => {
1375413755 assert . match ( block , / u p d a t e d A t : \. u p d a t e d _ a t / ) ;
1375513756 assert . match ( block , / S T A L E _ Q U E U E D _ C U T O F F / ) ;
1375613757 assert . doesNotMatch ( block , / g h r u n l i s t / ) ;
13758+ assert . match ( block , / g h r u n v i e w / ) ;
1375713759 }
1375813760} ) ;
1375913761
@@ -13949,20 +13951,10 @@ test("github activity workflow scopes cancellation to matching item activity", (
1394913951 assert . match ( workflow , / C h e c k c o r e A P I b u d g e t / ) ;
1395013952 assert . match ( workflow , / C L A W S W E E P E R _ M I N _ C O R E _ R E M A I N I N G / ) ;
1395113953 assert . match ( workflow , / c o n t e n t s : w r i t e / ) ;
13952- assert . match ( workflow , / D i s p a t c h s p a m c o m m e n t i n t a k e c a n d i d a t e s / ) ;
13953- assert . match ( workflow , / c l a w s w e e p e r _ s p a m _ c o m m e n t _ i n t a k e / ) ;
13954- assert . match ( workflow , / \[ " i s s u e _ c o m m e n t " , " p u l l _ r e q u e s t _ r e v i e w _ c o m m e n t " \] / ) ;
13955- assert . match ( workflow , / \[ " c r e a t e d " , " e d i t e d " \] / ) ;
13956- const dispatchStep = workflow . slice (
13957- workflow . indexOf ( "- name: Dispatch spam comment intake candidates" ) ,
13958- workflow . indexOf ( "\n - uses: actions/checkout@v6" ) ,
13959- ) ;
13960- const dispatchScript = dispatchStep
13961- . slice ( dispatchStep . indexOf ( " run: |\n" ) + " run: |\n" . length )
13962- . split ( "\n" )
13963- . map ( ( line ) => line . replace ( / ^ { 10 } / , "" ) )
13964- . join ( "\n" ) ;
13965- execFileSync ( "bash" , [ "-n" ] , { input : dispatchScript } ) ;
13954+ assert . doesNotMatch ( workflow , / D i s p a t c h s p a m c o m m e n t i n t a k e c a n d i d a t e s / ) ;
13955+ assert . match ( workflow , / D i s p a t c h s p a m s c a n c a n d i d a t e / ) ;
13956+ assert . match ( workflow , / r e p a i r : s p a m - c o m m e n t - i n t a k e - - - - w r i t e - r e p o r t / ) ;
13957+ assert . doesNotMatch ( workflow , / g h a p i " r e p o s \/ \$ \{ G I T H U B _ R E P O S I T O R Y \} \/ d i s p a t c h e s " / ) ;
1396613958 assert . match ( concurrencyBlock , / c a n c e l - i n - p r o g r e s s : t r u e / ) ;
1396713959 assert . doesNotMatch (
1396813960 concurrencyBlock ,
@@ -14802,6 +14794,10 @@ test("GitHub retry classifier distinguishes throttle and transient failures", ()
1480214794 const throttled = new Error ( "API rate limit exceeded for user ID 1" ) ;
1480314795 assert . equal ( ghRetryKind ( throttled ) , "throttle" ) ;
1480414796 assert . equal ( shouldRetryGh ( throttled ) , true ) ;
14797+ assert . equal ( ghRetryKind ( new Error ( "gh: HTTP 429: Too Many Requests" ) ) , "throttle" ) ;
14798+ assert . equal ( ghRetryWaitMs ( "throttle" , 0 ) , 30_000 ) ;
14799+ assert . equal ( ghRetryWaitMs ( "throttle" , 3 ) , 60_000 ) ;
14800+ assert . equal ( ghRetryWaitMs ( "transient" , 0 ) , 2_000 ) ;
1480514801
1480614802 const eof = Object . assign ( new Error ( "Command failed: gh api repos/openclaw/openclaw/issues" ) , {
1480714803 stderr : 'Get "https://api.github.com/repos/openclaw/openclaw/issues?page=54": unexpected EOF\n' ,
@@ -14813,6 +14809,7 @@ test("GitHub retry classifier distinguishes throttle and transient failures", ()
1481314809 "Post https://api.github.com/graphql: read: connection reset by peer" ,
1481414810 ) ;
1481514811 assert . equal ( ghRetryKind ( connectionReset ) , "transient" ) ;
14812+ assert . equal ( ghRetryKind ( new Error ( "read: connection reset" ) ) , "transient" ) ;
1481614813
1481714814 const badGateway = Object . assign ( new Error ( "gh: HTTP 502: Bad Gateway" ) , { stderr : "" } ) ;
1481814815 assert . equal ( ghRetryKind ( badGateway ) , "transient" ) ;
@@ -14830,6 +14827,9 @@ test("GitHub retry classifier distinguishes throttle and transient failures", ()
1483014827 { stderr : "invalid character '<' looking for beginning of value\n" } ,
1483114828 ) ;
1483214829 assert . equal ( ghRetryKind ( htmlInsteadOfJson ) , "transient" ) ;
14830+ assert . equal ( ghRetryKind ( new Error ( "dial tcp: connection refused" ) ) , "transient" ) ;
14831+ assert . equal ( ghRetryKind ( new Error ( "Could not resolve host: api.github.com" ) ) , "transient" ) ;
14832+ assert . equal ( ghRetryKind ( new Error ( "request timed out" ) ) , "transient" ) ;
1483314833
1483414834 const authFailure = Object . assign ( new Error ( "gh: HTTP 401: Bad credentials" ) , {
1483514835 stderr : "Bad credentials" ,
0 commit comments