Skip to content

Enforce schema validation on headless structured outputs#3689

Merged
DavidBakerEffendi merged 9 commits into
masterfrom
dave/fix-headless-response-schema-enforcement
May 29, 2026
Merged

Enforce schema validation on headless structured outputs#3689
DavidBakerEffendi merged 9 commits into
masterfrom
dave/fix-headless-response-schema-enforcement

Conversation

@DavidBakerEffendi

Copy link
Copy Markdown
Collaborator

Summary

  • Add post-generation validation for schema-backed outputs in JobRunner and CustomAgentExecutor so malformed JSON now fails instead of being treated as success.
  • Keep the existing provider-side response format request, but surface invalid outputs as RESPONSE_SCHEMA_OUTPUT_INVALID with a hard failure path.
  • Extend tests to cover invalid direct answers, invalid custom-agent finals, and the retry flow for schema-backed custom-agent output.

Testing

  • ./gradlew :app:test --tests ai.brokk.executor.jobs.JobRunnerResponseSchemaTest --tests ai.brokk.executor.agents.CustomAgentExecutorTest

@DavidBakerEffendi
DavidBakerEffendi marked this pull request as ready for review May 29, 2026 11:39
@DavidBakerEffendi DavidBakerEffendi self-assigned this May 29, 2026
@DavidBakerEffendi
DavidBakerEffendi merged commit 0e09d9b into master May 29, 2026
5 checks passed
@DavidBakerEffendi
DavidBakerEffendi deleted the dave/fix-headless-response-schema-enforcement branch May 29, 2026 11:56
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.

1 participant