Page MenuHomePhabricator

cirrus SuggestScoringTest randomized testing found failure case
Closed, ResolvedPublic

Description

As a cirrus developer i would like the actual score the explain score to be the same so i have accurate debugging information when investigating problems.

Initial failure was in 628938 (ci logs).

Reproduction from shell.php:

>>> $page = [                                                                                                                                                       
...     'incoming_links' => 77,                                                                                                                             
...     'external_link' => null,                                                                                                                            
...     'text_bytes' => 172086,                                                                                                                             
...     'heading' => null,                                                                                                                                  
...     'redirect' => null,                                                                                                                                 
...     'popularity_score' => 0.0010121457489879,                                                                                                           
...     'templates' => [ 'Good' ],                                                                                                                          
... ]
=> [                                                                                                                                                        
     "incoming_links" => 77,                                                                                                                                
     "external_link" => null,                                                                                                                               
     "text_bytes" => 172086,                                                                                                                                
     "heading" => null,                                                                                                                                     
     "redirect" => null,                                                                                                                                    
     "popularity_score" => 0.0010121457489879,                                                                                                              
     "templates" => [                                                                                                                                       
       "Good",                                                                                                                                              
     ],
   ]
>>> $scorer = new CirrusSearch\BuildDocument\Completion\PQScore(['Good' => 2, 'Bad' => 0.5]);
=> CirrusSearch\BuildDocument\Completion\PQScore {#2565}  
>>> $scorer->score($page)
=> 7402597
>>> $scorer->explain($page)['value']
=> 4545454

Event Timeline

Change 628308 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Fix edge case on comp suggest score explanation

https://gerrit.wikimedia.org/r/628308

dcausse triaged this task as Medium priority.
dcausse moved this task from needs triage to elastic / cirrus on the Discovery-Search board.
dcausse moved this task from Incoming to Needs review on the Discovery-Search (Current work) board.

Change 628308 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Fix edge case on comp suggest score explanation

https://gerrit.wikimedia.org/r/628308