Skip to content

fix: remove dead compute_analysis call that crashes /ai/analyze_stream on every request (closes #2084) - #2089

Merged
riteshbonthalakoti merged 1 commit into
riteshbonthalakoti:gssocfrom
namann5:fix/analyze-stream-compute-analysis-nameerror
Jun 7, 2026
Merged

fix: remove dead compute_analysis call that crashes /ai/analyze_stream on every request (closes #2084)#2089
riteshbonthalakoti merged 1 commit into
riteshbonthalakoti:gssocfrom
namann5:fix/analyze-stream-compute-analysis-nameerror

Conversation

@namann5

@namann5 namann5 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Description

Removes a dead function call that crashes POST /ai/analyze_stream on every request.

The Bug

backend/main.py:3722 calls compute_analysis(request_body, api_endpoint="/ai/analyze_stream"). This function was never defined in the codebase. Inside the SSE event generator, this throws NameError: name 'compute_analysis' is not defined, which causes a 500 error for every streaming analysis request.

The result variable is also never consumed — the endpoint duplicates the full analysis logic inline starting at line 3724.

Fix

Remove the 2-line dead code block. The remaining inline logic performs the correct analysis.

Closes #2084

closes riteshbonthalakoti#2084)

Line 3722 calls compute_analysis() which was never defined in the
codebase. The result variable is also never consumed - the streaming
endpoint duplicates the full analysis logic inline afterward.
This dead code was left behind during a refactor.

Fix: remove the 2-line dead code block entirely.
@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

@namann5 is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d29f6798-c241-4745-bb4c-bcd8d3be731c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@riteshbonthalakoti riteshbonthalakoti added gssoc GirlScript Summer of Code gssoc:approved GSSoC Approved PR level:critical Critical level difficulty quality:exceptional Exceptional code quality type:bug Bug fix labels Jun 7, 2026
@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Superb implementation, @namann5! I've successfully resolved all conflicts in your PR and queued it for merging into gssoc.

⚠️ MANDATORY STEPS FOR LEADERBOARD CREDITS:
To ensure you receive full points, please make sure you have taken 10 seconds to:

Keep up the outstanding work! Let's build together! 🔥

@riteshbonthalakoti
riteshbonthalakoti merged commit a293d65 into riteshbonthalakoti:gssoc Jun 7, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC Approved PR gssoc GirlScript Summer of Code level:critical Critical level difficulty quality:exceptional Exceptional code quality type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants