Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/sheet_scoring/openai_sheets_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ def process_sheet_by_content(self,
sources: List[Dict[str, Union[str, Dict[str, str]]]],
add_full_commentary=False) -> SheetScoringOutput:
"""Score a single sheet based on its content."""

logger.info(f"Scorer got sheet {sheet_id}")

if not expanded_refs:
request_status_message = f"No expanded refs for sheet {sheet_id}, skipping"
logger.info(request_status_message)
Expand Down Expand Up @@ -789,6 +792,7 @@ def process_sheet_by_content(self,
return self.create_failure_output(sheet_id=sheet_id,
request_status_message=request_status_message)

logger.info(f"Returning results for sheet {sheet_id}")
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log message "Returning results for sheet {sheet_id}" is misleading because it only covers the successful return path. The function has other return paths at lines 755, 770, and 792 that also return results. Consider using a more specific message like "Successfully scored sheet {sheet_id}" or "Returning successful GPT-based scores for sheet {sheet_id}" to clarify that this log applies only to the successful GPT analysis path.

Suggested change
logger.info(f"Returning results for sheet {sheet_id}")
logger.info(f"Returning successful GPT-based scores for sheet {sheet_id}")

Copilot uses AI. Check for mistakes.
return SheetScoringOutput(
sheet_id=sheet_id,
ref_levels=gpt_analysis[self.REF_LEVELS_FIELD],
Expand Down
Loading