Skip to content

fix: Fix edge-case crash for empty file input in analyzer#698

Open
gittihub-jpg wants to merge 1 commit into
imDarshanGK:mainfrom
gittihub-jpg:fix/issue-20260530-553
Open

fix: Fix edge-case crash for empty file input in analyzer#698
gittihub-jpg wants to merge 1 commit into
imDarshanGK:mainfrom
gittihub-jpg:fix/issue-20260530-553

Conversation

@gittihub-jpg
Copy link
Copy Markdown

Closes #553

Description

Resolves a crash when the AST analyzer receives empty or whitespace-only file uploads by returning a graceful 200 response with a clear message.

Related Issue

Fixes #553

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Special Notes

  • backend/app/services/ast_analyzer.py: Added input validation and short-circuit logic at the start of the analysis pipeline.
  • backend/tests/test_ast_analyzer.py: Added regression test to verify empty file handling returns a 200 status with expected message.

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Screenshots (if applicable)

Fixes imDarshanGK#553

Signed-off-by: gittihub-jpg <rico@springer-mail.net>
@gittihub-jpg gittihub-jpg marked this pull request as ready for review May 30, 2026 17:22
@gittihub-jpg gittihub-jpg requested a review from imDarshanGK as a code owner May 30, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix edge-case crash for empty file input in analyzer

1 participant