@@ -368,8 +368,10 @@ async def process_chunk(chunk_index: int, chunk: str):
368368 self .get_extraction_prompt (maintainer_filename , content ),
369369 pydantic_model = MaintainerInfo ,
370370 )
371- self .logger .info ("Maintainers file content analyzed by AI" )
372- self .logger .info (f"Maintainers response: { maintainer_info } " )
371+ info_count = len (maintainer_info .output .info ) if maintainer_info .output .info else 0
372+ self .logger .info (
373+ f"Maintainers file content analyzed by AI (found={ info_count } , cost={ maintainer_info .cost :.4f} )"
374+ )
373375 if maintainer_info .output .info is not None :
374376 return AggregatedMaintainerInfo (
375377 output = AggregatedMaintainerInfoItems (info = maintainer_info .output .info ),
@@ -381,7 +383,7 @@ async def process_chunk(chunk_index: int, chunk: str):
381383 )
382384 else :
383385 self .logger .error (
384- f"Expected a list of maintainer info or an error message, got: { str ( maintainer_info ) } "
386+ f"Expected a list of maintainer info or an error message, got error= { maintainer_info . output . error } "
385387 )
386388 raise MaintanerAnalysisError (
387389 error_message = "Unexpected response from AI for Maintainers analysis" ,
@@ -599,7 +601,7 @@ async def analyze_and_build_result(self, filename: str, content: str) -> Maintai
599601 if fname not in self .KNOWN_PATHS or fname in self .SECTION_FILTERED_PATHS :
600602 extracted = self ._section_extractor .extract (fname , content , self .SCORING_KEYWORDS_SET )
601603 if extracted :
602- self .logger .info (f"Using extracted sections for '{ filename } ' { extracted } " )
604+ self .logger .info (f"Using extracted sections for '{ filename } '" )
603605 content = extracted
604606 else :
605607 self .logger .debug (f"No sections extracted for '{ filename } ', using full content" )
@@ -682,12 +684,6 @@ def _attach_metadata(result: MaintainerResult) -> MaintainerResult:
682684 root_candidates , subdir_candidates = await self .find_candidate_files (repo_path )
683685 all_candidates = root_candidates + subdir_candidates
684686 candidate_files = [(path , score ) for path , _ , score in all_candidates ][:100 ]
685- self .logger .debug (
686- f"Detection step 2: { len (root_candidates )} root candidate(s), "
687- f"{ len (subdir_candidates )} subdir candidate(s); "
688- f"root={ [p for p , _ , _ in root_candidates ]} , "
689- f"subdir_top={ [p for p , _ , _ in subdir_candidates [:3 ]]} "
690- )
691687
692688 # Step 3: Try root-level files first (in score order), then top subdirectory file
693689 failed_candidates : set [str ] = set ()
@@ -775,7 +771,6 @@ def _attach_metadata(result: MaintainerResult) -> MaintainerResult:
775771 f"Passing { len (ai_input_files )} files to AI for maintainer file detection "
776772 f"(total repo files: { len (file_names )} )"
777773 )
778- self .logger .debug (f"AI input files: { [f for f , _ in ai_input_files ]} " )
779774 ai_file_name , ai_cost = await self .find_maintainer_file_with_ai (ai_input_files )
780775 ai_suggested_file = ai_file_name
781776 total_cost += ai_cost
0 commit comments