Skip to content

fix(ai): handle filter-only searches and JSON-safe tool errors - #86

Merged
vitorhugo-dotnet merged 3 commits into
mainfrom
fix/85-gemini-search-json-errors
Sep 16, 2026
Merged

vitorhugo-dotnet merged 3 commits into
mainfrom
fix/85-gemini-search-json-errors

Conversation

@vitorhugo-dotnet

@vitorhugo-dotnet vitorhugo-dotnet commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Closes #85

What changed

  • allow searchApplications without a free-text query when at least one meaningful structured filter is present
  • reject completely unfiltered searches
  • skip FULLTEXT/LIKE predicates for filter-only searches and preserve deterministic ordering
  • mark nullable search parameters as optional in the Spring AI tool schema
  • make Spring AI tool execution errors JSON-safe at the exception-processor boundary for Gemini

Tests

  • service regression for null/blank free-text with structured filters
  • repository SQL regression proving filter-only searches do not use MATCH/LIKE
  • contextual CWI follow-up regression through AssistantTools
  • application-context regression proving tool errors are valid JSON
  • mvn -B -ntp clean verify ✅ (GitHub Actions)

TDD evidence

  • RED: regression commit reproduced 4 failures + 1 error across the acceptance scenarios
  • GREEN: workflow run 35042918961, job 104626448677 completed successfully

@github-actions github-actions Bot added the tests label Sep 16, 2026
@github-actions

Copy link
Copy Markdown

Qodana for JVM

3 new problems were found

Inspection name Severity Problems
Nullability and data flow problems 🔶 Warning 1
Mismatched query and update of 'StringBuilder' 🔶 Warning 1
Simplifiable conditional expression 🔶 Warning 1
View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@vitorhugo-dotnet
vitorhugo-dotnet marked this pull request as ready for review September 16, 2026 01:14
@vitorhugo-dotnet
vitorhugo-dotnet merged commit d6dbb10 into main Sep 16, 2026
6 checks passed
@vitorhugo-dotnet
vitorhugo-dotnet deleted the fix/85-gemini-search-json-errors branch September 16, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: prevent Gemini assistant crash on empty search query and non-JSON tool errors

1 participant