Skip to content

Surface engine failures in waza suggest#330

Merged
spboyer merged 3 commits into
mainfrom
copilot/fix-waza-suggest-error-reporting
Jun 16, 2026
Merged

Surface engine failures in waza suggest#330
spboyer merged 3 commits into
mainfrom
copilot/fix-waza-suggest-error-reporting

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

waza suggest was parsing empty output after engine-level failures and reporting a misleading YAML error. The actual failure was already present in ExecutionResponse.ErrorMsg but was ignored.

  • Engine response handling
    • Check ExecutionResponse.Success after both suggest passes:
      • grader selection
      • eval generation
    • Return the engine error message before attempting to parse model output.
if err := engineResponseError(resp); err != nil {
    return nil, fmt.Errorf("getting suggestions: %w", err)
}
  • Parse diagnostics

    • Report empty model output distinctly as empty suggest response.
    • Preserve existing invalid-YAML behavior for non-empty malformed responses.
  • Regression coverage

    • Added tests for pass-1 and pass-2 engine failures.
    • Added coverage for empty suggest responses.

Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:10
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:15
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:20
Copilot AI changed the title [WIP] Fix waza suggest to surface real engine errors Surface engine failures in waza suggest Jun 16, 2026
Copilot AI requested a review from spboyer June 16, 2026 15:23
@spboyer spboyer requested a review from Copilot June 16, 2026 15:48
@spboyer spboyer marked this pull request as ready for review June 16, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves waza suggest error reporting by detecting engine-level failures (via ExecutionResponse.Success / ErrorMsg) before attempting to parse model output, avoiding misleading YAML parse errors. It also adds a distinct error for empty suggest responses and extends tests to prevent regressions.

Changes:

  • Check ExecutionResponse.Success after grader-selection (pass 1) and eval-generation (pass 2) and return the engine error message early.
  • Treat empty model output as a distinct parsing error (empty suggest response) while preserving existing invalid-YAML behavior for non-empty malformed output.
  • Add regression tests covering pass-1 failure, pass-2 failure, and empty suggest responses.
Show a summary per file
File Description
internal/suggest/suggest.go Adds engine failure detection before parsing and introduces distinct empty-response parsing behavior.
internal/suggest/suggest_test.go Adds regression tests for engine failures in both passes and for empty suggest responses.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@spboyer spboyer merged commit 9a1dcb5 into main Jun 16, 2026
11 checks passed
@spboyer spboyer deleted the copilot/fix-waza-suggest-error-reporting branch June 16, 2026 18:46
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.

3 participants